Skip to content
Snippets Groups Projects
Commit 82e0f27f authored by Tobias Hunger's avatar Tobias Hunger Committed by Daniel Molkentin
Browse files

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: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent 177ed96b
No related branches found
No related tags found
No related merge requests found
......@@ -134,10 +134,12 @@ QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader* reader, co
}
break;
case QXmlStreamReader::EndElement:
if (reader->name() == QLatin1String("example"))
examples.append(item);
else if (reader->name() == QLatin1String("examples"))
if (reader->name() == QLatin1String("example")) {
if (!item.projectPath.isEmpty() && QFileInfo(item.projectPath).exists())
examples.append(item);
} else if (reader->name() == QLatin1String("examples")) {
return examples;
}
break;
default: // nothing
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment