aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormae <qtc-committer@nokia.com>2008-12-15 13:43:49 +0100
committermae <qtc-committer@nokia.com>2008-12-15 13:43:49 +0100
commit1279bb5800c987fd116d1b66355a9ad31e0f932d (patch)
tree8d5b3576979ef703c3ccc5a443b77e245da6194f
parentffc082a3b3d17770530c281b9f647e88a2ac1665 (diff)
readd "Recent Projects" menu.
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index f9149786bea..6296b252171 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -406,16 +406,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
#endif
-#if 0
- // recent projects menu
- Core::IActionContainer *mrecent =
- am->createMenu(Constants::M_RECENTPROJECTS);
- mrecent->menu()->setTitle("Recent Projects");
- mfile->addMenu(mrecent, Core::Constants::G_FILE_PROJECT);
- connect(mfile->menu(), SIGNAL(aboutToShow()),
- this, SLOT(updateRecentProjectMenu()));
-#endif
-
// Default open action
m_openFileAction = new QAction(tr("Open File"), this);
cmd = am->registerAction(m_openFileAction, ProjectExplorer::Constants::OPENFILE,
@@ -425,6 +415,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
// Open With menu
mfilec->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN);
+ // recent projects menu
+ Core::IActionContainer *mrecent =
+ am->createMenu(Constants::M_RECENTPROJECTS);
+ mrecent->menu()->setTitle("Recent Projects");
+ mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN);
+ connect(mfile->menu(), SIGNAL(aboutToShow()),
+ this, SLOT(updateRecentProjectMenu()));
+
// unload action
m_unloadAction = new QAction(tr("Unload Project"), this);
cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext);
@@ -1498,8 +1496,7 @@ void ProjectExplorerPlugin::openRecentProject()
QAction *a = qobject_cast<QAction*>(sender());
if (m_recentProjectsActions.contains(a)) {
const QString fileName = m_recentProjectsActions.value(a);
- if (ProjectFileFactory *pf = findProjectFileFactory(fileName))
- pf->open(fileName);
+ openProject(fileName);
}
}