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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/icons
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2010-09-26 23:30:05
Message-ID: 20100926233005.D9D62AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1180089 by cfeck:

Fix crash when no icon group and size is specified

Re-add the kWarning() from 4.4 branch and fall back to
KIconLoader::Desktop size in this case.

The bug in kvpnc is in KVpnc::initAction(), first three lines:
The loadIcon() calls specify no group and size. One of them
must be passed so that the loader knows which size the result
pixmap should have. It is probably simplest to replace those
calls with KIcon("iconname") constructs.

CCBUG: 246016


 M  +6 -1      kiconloader.cpp  


--- trunk/KDE/kdelibs/kdeui/icons/kiconloader.cpp #1180088:1180089
@@ -753,8 +753,13 @@
     }
 
     // If size == 0, use default size for the specified group.
-    if (size == 0 && group != KIconLoader::User)
+    if (size == 0)
     {
+        if (group < 0)
+        {
+            kWarning(264) << "Neither size nor group specified!";
+            group = KIconLoader::Desktop;
+        }
         size = mpGroups[group].size;
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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