Project/AddDirectoryDialog.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 12
1d8dd9706f46
--- a/Project/AddDirectoryDialog.py	Mon Dec 28 18:31:37 2009 +0000
+++ b/Project/AddDirectoryDialog.py	Wed Dec 30 15:40:33 2009 +0000
@@ -44,32 +44,22 @@
         self.startdir = startdir
         self.on_filterComboBox_highlighted('(*.py)') # enable all dialog elements
         if filter == 'source':  # it is a source file
-            self.filterComboBox.addItem(self.trUtf8("Source Files"), 
-                                        QVariant("SOURCES"))
+            self.filterComboBox.addItem(self.trUtf8("Source Files"), "SOURCES")
         elif filter == 'form':
-            self.filterComboBox.addItem(self.trUtf8("Forms Files"), 
-                                        QVariant("FORMS"))
+            self.filterComboBox.addItem(self.trUtf8("Forms Files"), "FORMS")
         elif filter == 'resource':
-            self.filterComboBox.addItem(self.trUtf8("Resource Files"), 
-                                        QVariant("RESOURCES"))
+            self.filterComboBox.addItem(self.trUtf8("Resource Files"), "RESOURCES")
         elif filter == 'interface':
-            self.filterComboBox.addItem(self.trUtf8("Interface Files"), 
-                                        QVariant("INTERFACES"))
+            self.filterComboBox.addItem(self.trUtf8("Interface Files"), "INTERFACES")
         elif filter == 'others':
-            self.filterComboBox.addItem(self.trUtf8("Other Files (*)"), 
-                                        QVariant("OTHERS"))
+            self.filterComboBox.addItem(self.trUtf8("Other Files (*)"), "OTHERS")
             self.on_filterComboBox_highlighted('(*)')
         else:
-            self.filterComboBox.addItem(self.trUtf8("Source Files"), 
-                                        QVariant("SOURCES"))
-            self.filterComboBox.addItem(self.trUtf8("Forms Files"), 
-                                        QVariant("FORMS"))
-            self.filterComboBox.addItem(self.trUtf8("Resource Files"), 
-                                        QVariant("RESOURCES"))
-            self.filterComboBox.addItem(self.trUtf8("Interface Files"), 
-                                        QVariant("INTERFACES"))
-            self.filterComboBox.addItem(self.trUtf8("Other Files (*)"), 
-                                        QVariant("OTHERS"))
+            self.filterComboBox.addItem(self.trUtf8("Source Files"), "SOURCES")
+            self.filterComboBox.addItem(self.trUtf8("Forms Files"), "FORMS")
+            self.filterComboBox.addItem(self.trUtf8("Resource Files"), "RESOURCES")
+            self.filterComboBox.addItem(self.trUtf8("Interface Files"), "INTERFACES")
+            self.filterComboBox.addItem(self.trUtf8("Other Files (*)"), "OTHERS")
         self.filterComboBox.setCurrentIndex(0)
         
     @pyqtSlot(str)
@@ -148,7 +138,7 @@
             a flag indicating a recursive add
         """
         filetype = \
-            self.filterComboBox.itemData(self.filterComboBox.currentIndex()).toString()
+            self.filterComboBox.itemData(self.filterComboBox.currentIndex())
         return (filetype, self.sourceDirEdit.text(), 
             self.targetDirEdit.text(),
             self.recursiveCheckBox.isChecked())

eric ide

mercurial