forked from qt-creator/qt-creator
Add menu item to clear the recent projects/files menus.
Task-number: QTCREATORBUG-5136 Change-Id: I27d5c86832277be9525d95fd1e38a3b86f620974 Reviewed-on: http://codereview.qt.nokia.com/496 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -1317,6 +1317,13 @@ void MainWindow::aboutToShowRecentFiles()
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(openRecentFile()));
|
||||
}
|
||||
aci->menu()->setEnabled(hasRecentFiles);
|
||||
|
||||
// add the Clear Menu item
|
||||
if (hasRecentFiles) {
|
||||
aci->menu()->addSeparator();
|
||||
QAction *action = aci->menu()->addAction(tr(QT_TRANSLATE_NOOP("Core::MainWindow", "Clear Menu")));
|
||||
connect(action, SIGNAL(triggered()), m_fileManager, SLOT(clearRecentFiles()));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::openRecentFile()
|
||||
|
||||
Reference in New Issue
Block a user