forked from qt-creator/qt-creator
WelcomePage: Do not list examples that do not exist
Do not list examples that point to non-existing project files. Change-Id: I6b7fdff3831a5a1845cf8c8d8429287abb1f86ab Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
committed by
Daniel Molkentin
parent
177ed96b35
commit
82e0f27fd1
@@ -134,10 +134,12 @@ QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader* reader, co
|
||||
}
|
||||
break;
|
||||
case QXmlStreamReader::EndElement:
|
||||
if (reader->name() == QLatin1String("example"))
|
||||
if (reader->name() == QLatin1String("example")) {
|
||||
if (!item.projectPath.isEmpty() && QFileInfo(item.projectPath).exists())
|
||||
examples.append(item);
|
||||
else if (reader->name() == QLatin1String("examples"))
|
||||
} else if (reader->name() == QLatin1String("examples")) {
|
||||
return examples;
|
||||
}
|
||||
break;
|
||||
default: // nothing
|
||||
break;
|
||||
|
Reference in New Issue
Block a user