forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -121,7 +121,7 @@ static bool isValidExampleOrDemo(ExampleItem &item)
|
|||||||
static QString invalidPrefix = QLatin1String("qthelp:////"); /* means that the qthelp url
|
static QString invalidPrefix = QLatin1String("qthelp:////"); /* means that the qthelp url
|
||||||
doesn't have any namespace */
|
doesn't have any namespace */
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
if (item.hasSourceCode && !QFileInfo(item.projectPath).exists())
|
if (!item.hasSourceCode || !QFileInfo(item.projectPath).exists())
|
||||||
ok = false;
|
ok = false;
|
||||||
else if (item.imageUrl.startsWith(invalidPrefix) || !QUrl(item.imageUrl).isValid())
|
else if (item.imageUrl.startsWith(invalidPrefix) || !QUrl(item.imageUrl).isValid())
|
||||||
ok = false;
|
ok = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user