Not limit to 1000 the delta in KIconTheme::iconPath
Albert Astals Cid
aacid at kde.org
Sat Mar 13 12:35:51 GMT 2010
In KIconTheme::iconPath there is a hardcoded 1000 that is making the unit test
i recently added to kiconloader_unittest fail.
The attached patch fixes it.
I don't really really understand the code so a second opinion would be more
than welcome.
BTW this is causing Okular to crash as we ask for a non null pixmap to
KIconLoader and gives a null one and bad things happen after that.
Albert
Index: kicontheme.cpp
===================================================================
--- kicontheme.cpp (revision 1102726)
+++ kicontheme.cpp (working copy)
@@ -424,9 +424,9 @@
{
K3Icon icon;
QString path;
- int delta = -1000; // current icon size delta of 'icon'
- int dw = 1000; // icon size delta of current directory
- int dirSize = 1000; // directory size of 'icon'
+ int delta = -INT_MAX; // current icon size delta of 'icon'
+ int dw = INT_MAX; // icon size delta of current directory
+ int dirSize = INT_MAX; // directory size of 'icon'
KIconThemeDir *dir;
const int dirCount = d->mDirs.size();
More information about the kde-core-devel
mailing list