forked from qt-creator/qt-creator
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: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -54,7 +54,15 @@ GridView {
|
|||||||
property string mockupSource: model.imageSource
|
property string mockupSource: model.imageSource
|
||||||
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
|
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) : ""
|
videoSource: isVideo ? (model.imageSource === undefined ? model.imageUrl : mockupSource) : ""
|
||||||
|
|
||||||
caption: model.name;
|
caption: model.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user