[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libkdegames] declarativeimports/qml: Suppress the ugly QML undefined errors
From:       Viranch Mehta <viranch.mehta () gmail ! com>
Date:       2013-04-06 0:52:29
Message-ID: 20130406005229.1DA1FA6059 () git ! kde ! org
[Download RAW message or body]

Git commit 34884d5f47dc9eb0dc285fb3c7a980f2579fa35c by Viranch Mehta.
Committed on 06/04/2013 at 02:51.
Pushed by viranch into branch 'master'.

Suppress the ugly QML undefined errors

M  +2    -2    declarativeimports/qml/KgItem.qml

http://commits.kde.org/libkdegames/34884d5f47dc9eb0dc285fb3c7a980f2579fa35c

diff --git a/declarativeimports/qml/KgItem.qml b/declarativeimports/qml/KgItem.qml
index c2eb91a..8996837 100644
--- a/declarativeimports/qml/KgItem.qml
+++ b/declarativeimports/qml/KgItem.qml
@@ -30,8 +30,8 @@ Image {
         // backend sprite: triggers requests for new sprite
 
         property alias prov: frontend.provider
-        property string provName: prov.name
-        property string theme: prov.currentThemeName
+        property string provName: prov==undefined ? "" : prov.name
+        property string theme: prov==undefined ? "" : prov.currentThemeName
         property alias key: frontend.spriteKey
         property string size: Math.round(width)+"x"+Math.round(height)
         property string sourceUrl: "image://"+provName+"/"+theme+"/"+key+"/"+size

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic