Package: memaid-pyqt
Severity: important
Tags: patch
Version: 0.2.3-2

The most recent (3.14) version of PyQt (python-qt3 3.14.1-1) makes an
incompatible change to the arguments to the QSizePolicy constructor:
only enumerated values are allowed, and not the corresponding integer
values. Unfortunately, this breaks interfaces whose .py files were
generated automatically with pyuic from 3.13, since that version used
numeric values.

The symptom of the problem is an error message that looks like this:

Traceback (most recent call last):
  File "/usr/bin/memaid-pyqt", line 50, in ?
    w = MainDlg(filename, item_id)
  File "/usr/lib/python2.3/site-packages/pyqt_memaid/main_dlg.py", line 37, in 
__init__
    MainFrm.__init__(self,parent,name,fl)
  File "/usr/lib/python2.3/site-packages/pyqt_memaid/main_frm.py", line 943, in 
__init__
    
self.question_text.setSizePolicy(QSizePolicy(3,3,0,0,self.question_text.sizePolicy().hasHeightForWidth()))
TypeError: argument 1 of QSizePolicy() has an invalid type

I've appended a suitable patch; I suspect the changes could also be
made in-place in /usr/lib/python2.3/site-packages/pyqt_memaid/ to fix
a broken installation. (Though the easiest workaround is probably just
to downgrade PyQt).

 -- Stephen

--- pyqt_memaid/add_items_frm.py.orig   2005-02-10 12:20:15.000000000 -0500
+++ pyqt_memaid/add_items_frm.py        2005-04-03 10:46:02.160033702 -0400
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'add_items_frm.ui'
 #
-# Created: Thu Feb 10 18:20:15 2005
-#      by: The PyQt User Interface Compiler (pyuic) 3.13
+# Created: Sun Apr 3 10:46:02 2005
+#      by: The PyQt User Interface Compiler (pyuic) 3.14.1
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -29,7 +29,7 @@
         layout1.addWidget(self.textLabel1)
 
         self.categories = QComboBox(0,self,"categories")
-        
self.categories.setSizePolicy(QSizePolicy(3,0,0,0,self.categories.sizePolicy().hasHeightForWidth()))
+        
self.categories.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.Fixed,0,0,self.categories.sizePolicy().hasHeightForWidth()))
         self.categories.setEditable(1)
         self.categories.setAutoCompletion(1)
         self.categories.setDuplicatesEnabled(0)
@@ -52,7 +52,7 @@
         layout7.addWidget(self.addViceVersa)
 
         self.grades = QButtonGroup(self,"grades")
-        
self.grades.setSizePolicy(QSizePolicy(5,5,0,0,self.grades.sizePolicy().hasHeightForWidth()))
+        
self.grades.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Preferred,0,0,self.grades.sizePolicy().hasHeightForWidth()))
         self.grades.setAlignment(QButtonGroup.AlignVCenter | 
QButtonGroup.AlignLeft)
         self.grades.setRadioButtonExclusive(0)
         self.grades.setColumnLayout(0,Qt.Vertical)
--- pyqt_memaid/edit_item_frm.py.orig   2005-02-10 12:20:15.000000000 -0500
+++ pyqt_memaid/edit_item_frm.py        2005-04-03 10:45:37.259520186 -0400
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'edit_item_frm.ui'
 #
-# Created: Thu Feb 10 18:20:15 2005
-#      by: The PyQt User Interface Compiler (pyuic) 3.13
+# Created: Sun Apr 3 10:45:37 2005
+#      by: The PyQt User Interface Compiler (pyuic) 3.14.1
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -29,7 +29,7 @@
         layout1.addWidget(self.textLabel1)
 
         self.categories = QComboBox(0,self,"categories")
-        
self.categories.setSizePolicy(QSizePolicy(3,0,0,0,self.categories.sizePolicy().hasHeightForWidth()))
+        
self.categories.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.Fixed,0,0,self.categories.sizePolicy().hasHeightForWidth()))
         self.categories.setEditable(1)
         self.categories.setAutoCompletion(1)
         self.categories.setDuplicatesEnabled(0)
--- pyqt_memaid/learning_mode_frm.py.orig       2005-02-10 12:20:15.000000000 
-0500
+++ pyqt_memaid/learning_mode_frm.py    2005-04-03 10:44:54.688642240 -0400
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'learning_mode_frm.ui'
 #
-# Created: Thu Feb 10 18:20:15 2005
-#      by: The PyQt User Interface Compiler (pyuic) 3.13
+# Created: Sun Apr 3 10:44:54 2005
+#      by: The PyQt User Interface Compiler (pyuic) 3.14.1
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -24,7 +24,7 @@
         layout9 = QVBoxLayout(None,0,6,"layout9")
 
         self.buttonGroup1 = QButtonGroup(self,"buttonGroup1")
-        
self.buttonGroup1.setSizePolicy(QSizePolicy(3,3,0,0,self.buttonGroup1.sizePolicy().hasHeightForWidth()))
+        
self.buttonGroup1.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.MinimumExpanding,0,0,self.buttonGroup1.sizePolicy().hasHeightForWidth()))
         self.buttonGroup1.setColumnLayout(0,Qt.Vertical)
         self.buttonGroup1.layout().setSpacing(6)
         self.buttonGroup1.layout().setMargin(11)
@@ -48,7 +48,7 @@
         layout1.addWidget(self.textLabel2)
 
         self.threshold = QSpinBox(self,"threshold")
-        
self.threshold.setSizePolicy(QSizePolicy(0,0,0,0,self.threshold.sizePolicy().hasHeightForWidth()))
+        
self.threshold.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.threshold.sizePolicy().hasHeightForWidth()))
         self.threshold.setMaxValue(5)
         self.threshold.setValue(3)
         layout1.addWidget(self.threshold)
--- pyqt_memaid/main_frm.py.orig        2005-02-10 12:20:15.000000000 -0500
+++ pyqt_memaid/main_frm.py     2005-04-03 10:21:20.308714864 -0400
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'main_frm.ui'
 #
-# Created: Thu Feb 10 18:20:15 2005
-#      by: The PyQt User Interface Compiler (pyuic) 3.13
+# Created: Sun Apr 3 10:21:20 2005
+#      by: The PyQt User Interface Compiler (pyuic) 3.14.1
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -940,7 +940,7 @@
         layout8.addWidget(self.question_label)
 
         self.question_text = QLabel(self.centralWidget(),"question_text")
-        
self.question_text.setSizePolicy(QSizePolicy(3,3,0,0,self.question_text.sizePolicy().hasHeightForWidth()))
+        
self.question_text.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.MinimumExpanding,0,0,self.question_text.sizePolicy().hasHeightForWidth()))
         self.question_text.setPaletteBackgroundColor(QColor(255,255,255))
         self.question_text.setFrameShape(QLabel.LineEditPanel)
         self.question_text.setFrameShadow(QLabel.Sunken)
@@ -954,7 +954,7 @@
         layout8.addWidget(self.textLabel2_2)
 
         self.answer_text = QLabel(self.centralWidget(),"answer_text")
-        
self.answer_text.setSizePolicy(QSizePolicy(3,3,0,0,self.answer_text.sizePolicy().hasHeightForWidth()))
+        
self.answer_text.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.MinimumExpanding,0,0,self.answer_text.sizePolicy().hasHeightForWidth()))
         self.answer_text.setPaletteBackgroundColor(QColor(255,255,255))
         self.answer_text.setFrameShape(QLabel.LineEditPanel)
         self.answer_text.setFrameShadow(QLabel.Sunken)
@@ -969,7 +969,7 @@
 
         self.grades = QButtonGroup(self.centralWidget(),"grades")
         self.grades.setEnabled(0)
-        
self.grades.setSizePolicy(QSizePolicy(5,5,0,0,self.grades.sizePolicy().hasHeightForWidth()))
+        
self.grades.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Preferred,0,0,self.grades.sizePolicy().hasHeightForWidth()))
         self.grades.setAlignment(QButtonGroup.AlignVCenter | 
QButtonGroup.AlignLeft)
         self.grades.setRadioButtonExclusive(0)
         self.grades.setColumnLayout(0,Qt.Vertical)




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to