forked from qt-creator/qt-creator
Prevent non-existing projects from showing on the welcome page.
Reviewed-by: dt <qtc-committer@nokia.com>
This commit is contained in:
@@ -602,6 +602,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
addAutoReleasedObject(new ProjectTreeWidgetFactory);
|
addAutoReleasedObject(new ProjectTreeWidgetFactory);
|
||||||
addAutoReleasedObject(new FolderNavigationWidgetFactory);
|
addAutoReleasedObject(new FolderNavigationWidgetFactory);
|
||||||
|
|
||||||
|
// > -- Creator 1.0 compatibility code
|
||||||
QStringList oldRecentProjects;
|
QStringList oldRecentProjects;
|
||||||
if (QSettings *s = core->settings())
|
if (QSettings *s = core->settings())
|
||||||
oldRecentProjects = s->value("ProjectExplorer/RecentProjects/Files", QStringList()).toStringList();
|
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) {
|
foreach(const QString &s, oldRecentProjects) {
|
||||||
m_recentProjects.append(qMakePair(s, QFileInfo(s).fileName()));
|
m_recentProjects.append(qMakePair(s, QFileInfo(s).fileName()));
|
||||||
}
|
}
|
||||||
|
// < -- Creator 1.0 compatibility code
|
||||||
|
|
||||||
// TODO restore recentProjects
|
// TODO restore recentProjects
|
||||||
if (QSettings *s = core->settings()) {
|
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();
|
const QStringList displayNames = s->value("ProjectExplorer/RecentProjects/DisplayNames").toStringList();
|
||||||
if (fileNames.size() == displayNames.size()) {
|
if (fileNames.size() == displayNames.size()) {
|
||||||
for (int i = 0; i < fileNames.size(); ++i) {
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user