From aa722e6a608d04a943267514f1f043e37b19e874 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Tue, 27 Mar 2012 19:00:11 +0200
Subject: [PATCH] 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>
---
 src/plugins/qtsupport/exampleslistmodel.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 68bd4682c06..47fb57bca8a 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -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;
             }
-- 
GitLab