[PC-BSD Commits] r782 - in pcbsd: branches/1.4/kcmPBMsource trunk/kcmPBMsource

svn at pcbsd.org svn at pcbsd.org
Tue Oct 9 07:33:50 PDT 2007


Author: tim
Date: 2007-10-09 07:33:49 -0700 (Tue, 09 Oct 2007)
New Revision: 782

Modified:
   pcbsd/branches/1.4/kcmPBMsource/pbm.ui.h
   pcbsd/trunk/kcmPBMsource/pbm.ui.h
Log:
Fix problem created by earlier fix which resulted in the icon path being written to ProgList incorrectly

Modified: pcbsd/branches/1.4/kcmPBMsource/pbm.ui.h
===================================================================
--- pcbsd/branches/1.4/kcmPBMsource/pbm.ui.h	2007-10-05 16:53:27 UTC (rev 781)
+++ pcbsd/branches/1.4/kcmPBMsource/pbm.ui.h	2007-10-09 14:33:49 UTC (rev 782)
@@ -198,11 +198,12 @@
 	qDebug("Finding size of: " + progPath);
 	ProgSize[i] = getDirSize(progPath);
         
-        if (ProgIcon[i].isEmpty()) ProgIcon[i] = "/Programs/.config/application.png";
-        else ProgIcon[i] = "/Programs/" + ProgDirName + "/" + ProgIcon[i];
-        //QImage *Icon = new QImage(ProgIcon[i]);
+        QString iconPath = "";
+        if (ProgIcon[i].isEmpty()) iconPath = "/Programs/.config/application.png";
+        else iconPath = "/Programs/" + ProgDirName + "/" + ProgIcon[i];
+
         QPixmap PixmapIcon;
-        PixmapIcon.convertFromImage(QImage(ProgIcon[i]).smoothScale(40,40));
+        PixmapIcon.convertFromImage(QImage(iconPath).smoothScale(40,40));
         qDebug("Inserting " + ProgName[i] + " into ListBox");
         SoftwareListBox->insertItem(PixmapIcon, ProgName[i] + " " + ProgVer[i] + " (" + bytesToHumanReadable(ProgSize[i]) + ")");
         

Modified: pcbsd/trunk/kcmPBMsource/pbm.ui.h
===================================================================
--- pcbsd/trunk/kcmPBMsource/pbm.ui.h	2007-10-05 16:53:27 UTC (rev 781)
+++ pcbsd/trunk/kcmPBMsource/pbm.ui.h	2007-10-09 14:33:49 UTC (rev 782)
@@ -198,11 +198,12 @@
 	qDebug("Finding size of: " + progPath);
 	ProgSize[i] = getDirSize(progPath);
         
-        if (ProgIcon[i].isEmpty()) ProgIcon[i] = "/Programs/.config/application.png";
-        else ProgIcon[i] = "/Programs/" + ProgDirName + "/" + ProgIcon[i];
-        //QImage *Icon = new QImage(ProgIcon[i]);
+        QString iconPath = "";
+        if (ProgIcon[i].isEmpty()) iconPath = "/Programs/.config/application.png";
+        else iconPath = "/Programs/" + ProgDirName + "/" + ProgIcon[i];
+
         QPixmap PixmapIcon;
-        PixmapIcon.convertFromImage(QImage(ProgIcon[i]).smoothScale(40,40));
+        PixmapIcon.convertFromImage(QImage(iconPath).smoothScale(40,40));
         qDebug("Inserting " + ProgName[i] + " into ListBox");
         SoftwareListBox->insertItem(PixmapIcon, ProgName[i] + " " + ProgVer[i] + " (" + bytesToHumanReadable(ProgSize[i]) + ")");
         



More information about the Commits mailing list