On Monday 02 August 2004 10:23, Phil Thompson wrote:
> On Monday 02 August 2004 3:56 pm, Gilbert Ramirez wrote:
> > A few days ago I posted a patch to build sip-4.0.1 with support for
> > qte-mt. Now I have an update for the PyQT snapshot (20040719) that I
> > pulled down.
> >
> > I have included it here inline because I want to explain the problems I
> > had; the patch is not intended to be applied directly to the source
> > because I'm not sure what the proper changes should be. I just hacked it
> > up to work on my system.
>
> [snip]
>
> The short answer is that PyQt does not support Qt/E v3 - never has done.
> The existing Qt/E support was for the Zaurus - based on Qt/E v2 - because
> Sharp were kind enough to give me one. The main reason I no longer support
> PyQt on the Zaurus myself is that I don't use it.
>
> I'm happy to accept patches, or I'm happy to accept payment to add the
> support.

Fair enough. I've been using PyQT with Qt/E v3 for over a year now on a home 
project --- a little Linux jukebox, video player, and karaoke machine that I 
put together.  The only reason I'm using Qt-Embedded is because I wanted to 
use the framebuffer device instead of X11; the issue of resource usage hasn't 
come up because the box has plenty of resources.

Attached is a better patch for PyQt-x11-gpl-snapshot-20040719 to build with 
libqte-mt. The changes to configure.py and build.py were straightforward. I 
made changes to 2 sip files, trying to do it cleanly to support QWS and 
non-QWS platforms. Please let me know if the style of those changes in 
unacceptable.

I have similar patches to enable support for qte-mt for PyQt-x11-gpl-3.5 and 
sip-x11-gpl-3.5, which I had been using until recently.  Are you interested 
in patches for those versions of PyQT and sip?

--gilbert
diff -ur orig/PyQt-x11-gpl-snapshot-20040719/build.py PyQt-x11-gpl-snapshot-20040719/build.py
--- orig/PyQt-x11-gpl-snapshot-20040719/build.py	2004-07-19 21:30:22.000000000 -0500
+++ PyQt-x11-gpl-snapshot-20040719/build.py	2004-08-04 13:26:22.000000000 -0500
@@ -597,7 +597,7 @@
 
     # Work out the platform and Qt version tags to pass to SIP to generate the
     # code we need.
-    if config.qt_lib == "qte":
+    if config.qt_lib == "qte" or config.qt_lib == "qte-mt":
         plattag = "WS_QWS"
     elif sys.platform == "win32":
         plattag = "WS_WIN"
diff -ur orig/PyQt-x11-gpl-snapshot-20040719/configure.py PyQt-x11-gpl-snapshot-20040719/configure.py
--- orig/PyQt-x11-gpl-snapshot-20040719/configure.py	2004-07-19 21:30:22.000000000 -0500
+++ PyQt-x11-gpl-snapshot-20040719/configure.py	2004-08-04 09:27:43.000000000 -0500
@@ -462,7 +462,7 @@
     qt_sip_flags.extend(get_feature_flags())
 
     # Handle the platform tag.
-    if opt_qtpetag:
+    if opt_qtpetag or sipcfg.qt_lib == "qte" or sipcfg.qt_lib == "qte-mt":
         plattag = "WS_QWS"
     elif sys.platform == "win32":
         plattag = "WS_WIN"
diff -ur orig/PyQt-x11-gpl-snapshot-20040719/sip/qt/qfont.sip PyQt-x11-gpl-snapshot-20040719/sip/qt/qfont.sip
--- orig/PyQt-x11-gpl-snapshot-20040719/sip/qt/qfont.sip	2004-07-19 21:30:28.000000000 -0500
+++ PyQt-x11-gpl-snapshot-20040719/sip/qt/qfont.sip	2004-08-04 10:06:41.000000000 -0500
@@ -340,7 +340,9 @@
 
 	static void initialize();
 	static void cleanup();
+%If (!WS_QWS)
 	static void cacheStatistics();
+%End
 
 %If (Qt_3_0_0 -)
 	enum Script {
diff -ur orig/PyQt-x11-gpl-snapshot-20040719/sip/qt/qthread.sip PyQt-x11-gpl-snapshot-20040719/sip/qt/qthread.sip
--- orig/PyQt-x11-gpl-snapshot-20040719/sip/qt/qthread.sip	2004-07-19 21:30:28.000000000 -0500
+++ PyQt-x11-gpl-snapshot-20040719/sip/qt/qthread.sip	2004-08-04 10:07:15.000000000 -0500
@@ -43,8 +43,13 @@
 	static HANDLE currentThread();
 %End
 %If (Qt_3_0_0 -)
+%If (WS_QWS)
+	static HANDLE currentThread();
+%End
+%If (!WS_QWS)
 	static Qt::HANDLE currentThread();
 %End
+%End
 	static void postEvent(QObject *,QEvent * /Transfer/);
 %If (Qt_3_0_0 -)
 	static void initialize();

Reply via email to