diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-04-17 11:48:50 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-04-17 11:48:50 +0200 |
commit | dd67f0857d0ee466c533854b487837164b2308b7 (patch) | |
tree | 6ef1bf1cb5a2c7a54282ad0b0bafe86864a05ea0 | |
parent | 55be2ea52f823a06e31319471fe51bd5ecdb688d (diff) |
Prevent non-existing projects from showing on the welcome page.
Reviewed-by: dt <qtc-committer@nokia.com>
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 56058e782b..06bf33a3e3 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -602,6 +602,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er addAutoReleasedObject(new ProjectTreeWidgetFactory); addAutoReleasedObject(new FolderNavigationWidgetFactory); + // > -- Creator 1.0 compatibility code QStringList oldRecentProjects; if (QSettings *s = core->settings()) oldRecentProjects = s->value("ProjectExplorer/RecentProjects/Files", QStringList()).toStringList(); @@ -616,6 +617,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er foreach(const QString &s, oldRecentProjects) { m_recentProjects.append(qMakePair(s, QFileInfo(s).fileName())); } + // < -- Creator 1.0 compatibility code // TODO restore recentProjects if (QSettings *s = core->settings()) { @@ -623,7 +625,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er const QStringList displayNames = s->value("ProjectExplorer/RecentProjects/DisplayNames").toStringList(); if (fileNames.size() == displayNames.size()) { for (int i = 0; i < fileNames.size(); ++i) { - m_recentProjects.append(qMakePair(fileNames.at(i), displayNames.at(i))); + if (QFileInfo(fileNames.at(i)).isFile()) + m_recentProjects.append(qMakePair(fileNames.at(i), displayNames.at(i))); } } } |