Commit dbff3332 authored by Thomas Hartmann's avatar Thomas Hartmann

WelcomePage: Fixing missing images and warnings

The property help source was always defined.

The actual reason for the warnings was that we did not check
if model.imageUrl is undefined and java script turns an undefined
value into the string "undefined".

Change-Id: Ifb433ff5cdc3142ff5e552ff1b01b04b1a859590
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 6e64b0bb
......@@ -52,16 +52,9 @@ GridView {
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: getImageSource()
function getImageSource() {
var value = delegate.isVideo ? "" : (model.imageSource === undefined ? delegate.helpSource : delegate.mockupSource)
if (value === undefined)
value = "";
}
property string helpSource: (model.imageUrl !== "" && model.imageUrl !== undefined) ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: isVideo ? "" : (model.imageSource === undefined ? delegate.helpSource : delegate.mockupSource)
videoSource: isVideo ? (model.imageSource === undefined ? model.imageUrl : mockupSource) : ""
......
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