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:
con
2011-06-20 11:01:23 +02:00
committed by Eike Ziller
parent 78f98c1741
commit 49ea170692
5 changed files with 37 additions and 2 deletions

View File

@@ -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()