diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-03 15:28:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-03 15:30:27 -0700 |
commit | 49053e86aa61a359a15eda0e67b4fa2c293122e0 (patch) | |
tree | a5111d6868fba2eb7738923e46ad4764f986d7e5 /qt-ui/mainwindow.cpp | |
parent | 2cfa7fead0b1ea351b5c738785ce5c54248a4888 (diff) | |
download | subsurface-49053e86aa61a359a15eda0e67b4fa2c293122e0.tar.gz |
Make most of the shortcuts widget specific
Having the window specific means that you can't have a key do different
things on different widgets.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d94ec8561..cda6e349d 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -502,11 +502,11 @@ void MainWindow::on_actionYearlyStatistics_triggered() yearlyStats->setMinimumWidth(600); yearlyStats->setWindowTitle(tr("Yearly Statistics")); yearlyStats->setWindowIcon(QIcon(":subsurface-icon")); - QShortcut *closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), yearlyStats); + QShortcut *closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), yearlyStats, 0, 0, Qt::WidgetShortcut); connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close())); - closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), yearlyStats); + closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), yearlyStats, 0, 0, Qt::WidgetShortcut); connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close())); - QShortcut *quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), yearlyStats); + QShortcut *quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), yearlyStats, 0, 0, Qt::WidgetShortcut); connect(quitKey, SIGNAL(activated()), this, SLOT(close())); } /* problem here is that without more MainWindow variables or a separate YearlyStatistics |