Commit c3e027e5 authored by Thomas Hartmann's avatar Thomas Hartmann

WelcomePage: Fix warning if searching in examples

During search/filtering the model returns undefined values
for delegates.

Task-number: QTCREATORBUG-11579
Task-number: QTCREATORBUG-11847

Change-Id: Ia15acd54991373f5bdebe4407e4f4a39503f6966
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent d390f6e3
......@@ -54,7 +54,15 @@ GridView {
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: isVideo ? "" : (model.imageSource === undefined ? helpSource : mockupSource)
imageSource: getImageSource()
function getImageSource() {
var value = delegate.isVideo ? "" : (model.imageSource === undefined ? delegate.helpSource : delegate.mockupSource)
if (value === undefined)
value = "";
}
videoSource: isVideo ? (model.imageSource === undefined ? model.imageUrl : mockupSource) : ""
caption: model.name;
......
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