Enable standard shortcuts for save and reload on Linux and Windows. F2/F3 will still work.

stl_dim
Marius Kintel 2011-10-30 02:25:57 +01:00
parent 6b8fd15ff7
commit 5070014b3a
1 changed files with 6 additions and 2 deletions

View File

@ -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<QKeySequence> 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<maxRecentFiles; i++) {