kdeadmin (4:4.4.5-4) 04_system_config_printer_kde_pyqt4.7_issues.diff

Summary

 system-config-printer-kde/options.py                   |    8 ++++----
 system-config-printer-kde/system-config-printer-kde.py |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

    
download this patch

Patch contents

Subject: Fix issues with PyQt 4.7
Origin: backport, http://websvn.kde.org/?view=revision&revision=1099874
                  http://websvn.kde.org/?view=revision&revision=1156006
                  http://websvn.kde.org/?view=revision&revision=1167347
                  http://websvn.kde.org/?view=revision&revision=1170241
Applied-Upstream: 4.5.2

A bunch of PyQt 4.7 compatibility fixes from upstream. Squeeze will be released
with PyQt 4.7.3.

--- a/system-config-printer-kde/options.py
+++ b/system-config-printer-kde/options.py
@@ -133,7 +133,7 @@ class OptionAlwaysShown(OptionInterface)
                 self.widget.clear()
                 if type(supported) == list:
                     for each in supported:
-                        self.widget.addItem(each)
+                        self.widget.addItem(unicode(each))
                 else:
                     self.widget.addItem(supported)
             elif (type(self.widget) == QComboBox and
@@ -142,9 +142,9 @@ class OptionAlwaysShown(OptionInterface)
                 self.widget.clear()
                 if type(supported) == list:
                     for each in supported:
-                        self.widget.addItem(self.combobox_dict[each])
+                        self.widget.addItem(unicode(each))
                 else:
-                    self.widget.addItem(self.combobox_dict[supported])
+                    self.widget.addItem(supported)
         if original_value != None:
             self.original_value = self.ipp_type (original_value)
             self.set_widget_value (self.original_value)
@@ -318,7 +318,7 @@ class OptionSelectOne(Option):
     def __init__(self, name, value, supported, on_change):
         Option.__init__(self, name, value, supported, on_change)
 
-        self.selector = QComboBox(self)
+        self.selector = QComboBox()
 
         selected = None
         for nr, choice in enumerate(supported):
--- a/system-config-printer-kde/system-config-printer-kde.py
+++ b/system-config-printer-kde/system-config-printer-kde.py
@@ -95,7 +95,7 @@ class PyKcm(KCModule):
     def __init__(self, component_data, parent, gui):
         KCModule.__init__(self, component_data, parent)
 
-        uic.loadUi(APPDIR + "/" + "system-config-printer.ui", self)
+        uic.loadUi(unicode(APPDIR + "/" + "system-config-printer.ui"), self)
         self.setButtons(KCModule.Apply)
         self.gui = gui
         
@@ -2036,7 +2036,7 @@ class NewPrinterGUI(QDialog):
         self.WaitWindow = QMessageBox(self.mainapp)
         self.WaitWindow.setStandardButtons(QMessageBox.NoButton)
 
-        uic.loadUi(APPDIR + "/" + "new-printer.ui", self)
+        uic.loadUi(unicode(APPDIR + "/" + "new-printer.ui"), self)
 
         self.btnNPBack.setIcon(KIcon("go-previous"))
         self.btnNPForward.setIcon(KIcon("go-next"))