From 5070014b3a42ccb0e81ca36689e17351b5faaf13 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 30 Oct 2011 02:25:57 +0100 Subject: [PATCH] Enable standard shortcuts for save and reload on Linux and Windows. F2/F3 will still work. --- src/mainwin.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mainwin.cc b/src/mainwin.cc index be82d263..f9c3ac6b 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -218,8 +218,12 @@ MainWindow::MainWindow(const QString &filename) connect(this->fileActionReload, SIGNAL(triggered()), this, SLOT(actionReload())); connect(this->fileActionQuit, SIGNAL(triggered()), this, SLOT(quit())); #ifndef __APPLE__ - this->fileActionSave->setShortcut(QKeySequence(Qt::Key_F2)); - this->fileActionReload->setShortcut(QKeySequence(Qt::Key_F3)); + QList shortcuts = this->fileActionSave->shortcuts(); + shortcuts.push_back(QKeySequence(Qt::Key_F2)); + this->fileActionSave->setShortcuts(shortcuts); + shortcuts = this->fileActionReload->shortcuts(); + shortcuts.push_back(QKeySequence(Qt::Key_F3)); + this->fileActionReload->setShortcuts(shortcuts); #endif // Open Recent for (int i = 0;i