Commit 990ddf2c authored by Eike Ziller's avatar Eike Ziller
Browse files

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: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@digia.com>
parent 2b3bc1fa
...@@ -121,7 +121,7 @@ static bool isValidExampleOrDemo(ExampleItem &item) ...@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment