Commit b7ac243c authored by Ulf Hermann's avatar Ulf Hermann

WelcomeScreen: Avoid loading of invalid pictures

Apparently the QML engine also loads pictures for invisible Image
objects. The pictures icons for examples and tutorials on the welcome
screen thus always try to load an extra video icon, which always fails.
By setting the URL to an empty string if the example or tutorial being
loaded is no video we can avoid that.

Change-Id: Ibafc11ed233f386bbbf1e7a4830fcb34bc1cd55d
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent afb0f877
......@@ -47,8 +47,8 @@ GridView {
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
imageSource: isVideo ? "" : (model.imageSource === undefined ? helpSource : mockupSource)
videoSource: isVideo ? (model.imageSource === undefined ? model.imageUrl : mockupSource) : ""
caption: model.name;
description: model.description
......
Markdown is supported
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