diff options
author | Eike Ziller <eike.ziller@digia.com> | 2012-12-12 13:16:42 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2012-12-12 13:37:23 +0100 |
commit | 990ddf2c71835b784e1b22f1ede9027ee82a447b (patch) | |
tree | 906877e80ab717b3136505493d395a36bd8d73b7 /src/plugins/qtsupport/exampleslistmodel.cpp | |
parent | 2b3bc1fa33003b208c94768413a5515176e13e5b (diff) | |
download | qt-creator-990ddf2c71835b784e1b22f1ede9027ee82a447b.tar.gz |
Do not show examples that do not have a projectPath associated.
Tutorials are handled differently, these can still only have
documentation or video.
Task-number: QTBUG-28396
Change-Id: Ief79756c44633b1d105357b385595a1267f730f4
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r-- | src/plugins/qtsupport/exampleslistmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index f83c49af38..159b0e84e5 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -121,7 +121,7 @@ static bool isValidExampleOrDemo(ExampleItem &item) static QString invalidPrefix = QLatin1String("qthelp:////"); /* means that the qthelp url doesn't have any namespace */ bool ok = true; - if (item.hasSourceCode && !QFileInfo(item.projectPath).exists()) + if (!item.hasSourceCode || !QFileInfo(item.projectPath).exists()) ok = false; else if (item.imageUrl.startsWith(invalidPrefix) || !QUrl(item.imageUrl).isValid()) ok = false; |