From b7ac243c3b91557fc9c55894706a678eefe87265 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 3 Dec 2013 13:39:47 +0100 Subject: [PATCH] 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: Eike Ziller Reviewed-by: Thomas Hartmann --- share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml b/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml index 4317bd2f5d9..bbe6b031097 100644 --- a/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml +++ b/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml @@ -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