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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/xmlgui
From:       Richard Lärkäng <richard () goteborg ! utfors ! se>
Date:       2007-04-12 21:06:09
Message-ID: 1176411969.922484.6117.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 653199 by larkang:

Make setting icons in the xml-file work.

In KDE 3.x, the KAction had a QString "icon"-property,
but in KDE 4.x, the "icon"-property of a QAction is a QIcon
so trying to set it to a string doesn't work


 M  +6 -0      kxmlguifactory.cpp  


--- trunk/KDE/kdelibs/kdeui/xmlgui/kxmlguifactory.cpp #653198:653199
@@ -523,6 +523,12 @@
     if ( attrName.toLower() == QLatin1String("name") )
         return;
 
+    if ( attrName.toLower() == QLatin1String("icon") )
+    {
+        action->setIcon( KIcon( attribute.value() ) );
+        return;
+    }
+
     QVariant propertyValue;
 
     QVariant::Type propertyType = action->property( attrName.toLatin1() ).type();
[prev in list] [next in list] [prev in thread] [next in thread] 

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