[PyKDE] problems with current eric3 and PyQt snapshots on Qt3.0.5

Hans-Peter Jansen hpj at urpla.net
Sun Apr 13 16:36:00 BST 2003


[To Detlev: CCed you now, since I think, it's a PyQt problem]

Hi Phil,

it seems, like something is borken in current PyQt snapshot. 
This happens on SuSE8.1/Qt3.0.5 with qscintilla-20030407, 
sip-20030405, PyQt-20030407, and eric3-20030410 (at least).

Since Detlev is now working in a Qt3.1 env, he used some 3.1isms,
which I had to revert with these patches:

--- eric/QScintilla/Editor.py.orig   2003-04-12 20:28:49.000000000 +0200
+++ eric/QScintilla/Editor.py        2003-04-12 21:29:30.000000000 +0200
@@ -1192,11 +1192,11 @@
         """
         if self.focusBox:
             self.focusBox = 0
         elif self.fileInfo is not None and \
            event.reason() != QFocusEvent.Popup and \
-           self.fileInfo.lastModified().toTime_t() != self.lastModified.toTime_t():
+           self.fileInfo.lastModified().toString().compare(self.lastModified.toString()):
             msg = self.trUtf8("""The file <b>%1</b> has been changed while it was opened in"""
                     """ eric3.""").arg(self.fileName)
             if self.isModified():
                 msg.append(self.trUtf8("""<br><b>Warning:</b> You will loose"""
                     """ your changes upon reopening it."""))


--- eric/Preferences/PreferencesForm.ui.orig	2003-04-13 15:43:40.000000000 +0200
+++ eric/Preferences/PreferencesForm.ui	2003-04-13 15:44:01.000000000 +0200
@@ -1334,11 +1334,11 @@
                                 </property>
                                 <property name="enabled">
                                     <bool>false</bool>
                                 </property>
                                 <property name="frameShape">
-                                    <enum>GroupBoxPanel</enum>
+                                    <enum>NoFrame</enum>
                                 </property>
                                 <property name="frameShadow">
                                     <enum>Plain</enum>
                                 </property>
                                 <property name="lineWidth">
@@ -1514,11 +1514,11 @@
                                 </property>
                                 <property name="enabled">
                                     <bool>false</bool>
                                 </property>
                                 <property name="frameShape">
-                                    <enum>GroupBoxPanel</enum>
+                                    <enum>NoFrame</enum>
                                 </property>
                                 <property name="frameShadow">
                                     <enum>Plain</enum>
                                 </property>
                                 <property name="lineWidth">

I regenerated the forms with this script:

#!/bin/sh

for ui in $(find . -name \*.ui -type f)
do
    py=${ui%%.ui}.py
    echo "regenerate $py from $ui"
    [ -f "$ui" ] && pyuic -o "$py" $ui
done

Whenever I try to open the preference dialog, I got 
  File "/usr/lib/python2.2/site-packages/UI/UserInterface.py", line 1424, in handlePreferences
  File "/usr/lib/python2.2/site-packages/Preferences/PreferencesDialog.py", line 25, in __init__
  File "/usr/lib/python2.2/site-packages/eric3/Preferences/PreferencesForm.py", line 886, in __init__
    self.previewPixmap.setPixmap(image0)
NameError: global name 'image0' is not defined

Since I couldn't figure out the offending code path in pyuic3, I've
patched that piece by hand, but now, eric3 crashes opening the Prefs:

Fatal Python error: PyEval_SaveThread: NULL tstate
Abgebrochen

Any ideas on this one?

Cheers,
Pete




More information about the PyQt mailing list