[PC-BSD Commits] r13944 - pcbsd/current/src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Wed Nov 16 08:40:45 PST 2011


Author: kris
Date: 2011-11-16 08:40:45 -0800 (Wed, 16 Nov 2011)
New Revision: 13944

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
Log:

Match PBI names case insensitve by default




Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2011-11-16 16:40:03 UTC (rev 13943)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2011-11-16 16:40:45 UTC (rev 13944)
@@ -376,10 +376,16 @@
 // Function which checks if we already have a PBI with this name in the Tree
 bool PBM::checkPBILoaded(QString name)
 {
+  QString tmp, tmp2;
+  tmp = name.toUpper();
+  tmp = tmp.replace(" ", "");
+
   QTreeWidgetItemIterator it(SoftwareListBox);
   while (*it) {
     PBI *item = dynamic_cast<PBI*>(*it);
-    if ( item->getName() == name )
+    tmp2 = item->getName().toUpper();
+    tmp2 = tmp2.replace(" ", "");
+    if ( tmp == tmp2 )
        return true; 
     ++it;
   }



More information about the Commits mailing list