WelcomePage: Tag broken examples.

Tag examples without an existing .pro-file as "broken". That makes
it possible to search for those plugins in the examples page.

Change-Id: I211e7a53b395fa98fee6222a21ab5116718224c8
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
Tobias Hunger
2012-03-27 19:00:11 +02:00
committed by Daniel Molkentin
parent 82e0f27fd1
commit aa722e6a60

View File

@@ -135,8 +135,9 @@ QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader* reader, co
break;
case QXmlStreamReader::EndElement:
if (reader->name() == QLatin1String("example")) {
if (!item.projectPath.isEmpty() && QFileInfo(item.projectPath).exists())
examples.append(item);
if (item.projectPath.isEmpty() || !QFileInfo(item.projectPath).exists())
item.tags.append("broken");
examples.append(item);
} else if (reader->name() == QLatin1String("examples")) {
return examples;
}