From c99a2caf95b14f1f80d83768a5bfc48c98c340cc Mon Sep 17 00:00:00 2001 From: salome <> Date: Tue, 3 May 2005 07:40:46 +0000 Subject: [PATCH] =?utf8?q?Correction=20pour=20possibilit=C3=A9=20d'utilisa?= =?utf8?q?tion=20des=20pr=C3=A9-requis=20natifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/TclQtNotifier/notifqtmodule.cpp | 12 ++++++++---- src/TclQtNotifier/setup.py.in | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/TclQtNotifier/notifqtmodule.cpp b/src/TclQtNotifier/notifqtmodule.cpp index 721ef37b..46c3e3ab 100644 --- a/src/TclQtNotifier/notifqtmodule.cpp +++ b/src/TclQtNotifier/notifqtmodule.cpp @@ -6,14 +6,19 @@ using namespace std; #include #include #include +#include /* * With Qt version 3.0, we must use this horrible hack : #define private public * With Qt version > 3.0, this no more needed * So commentarize #define QT30, with Qt version > 3.0 */ -#undef QT32 +#if (QT_VERSION >= 0x030200) +#define QT32 +#else #define QT30 +#endif + #ifdef QT30 #define private public /* We need to use processNextEvent(), therefore we need @@ -285,8 +290,7 @@ static void DoEvents() PyObject *res=PyObject_CallMethod(tkinter,"dooneevent","i",2); if(!res){ PyErr_Print(); - SIP_UNBLOCK_THREADS - return; + break; } ret= PyInt_AsLong(res); SCRUTE(ret); @@ -296,7 +300,7 @@ static void DoEvents() } Py_DECREF(tkinter); - SCRUTE(tkinter->ob_refcnt); + //SCRUTE(tkinter->ob_refcnt); SIP_UNBLOCK_THREADS MESSAGE("end of DoEvents"); return; diff --git a/src/TclQtNotifier/setup.py.in b/src/TclQtNotifier/setup.py.in index b964c2ed..92cdf57e 100644 --- a/src/TclQtNotifier/setup.py.in +++ b/src/TclQtNotifier/setup.py.in @@ -31,6 +31,7 @@ TIXLIB=os.path.join(TIXHOME,"lib") QT_INCLUDES="@QT_INCLUDES@".split() SIP_INCLUDES="@SIP_INCLUDES@".split() QT_LIBS="@QT_MT_LIBS@".split() +SIP_LIBS="@SIP_LIBS@".split() PYQT_LIBS="@PYQT_LIBS@".split() PYDIR=sys.prefix @@ -127,7 +128,7 @@ setup(name="notifqt", version="1.0", libraries=libs_tk, extra_compile_args= SIP_INCLUDES + QT_INCLUDES, extra_objects=[], - extra_link_args=QT_LIBS + PYQT_LIBS , + extra_link_args=QT_LIBS + PYQT_LIBS + SIP_LIBS, ) ]) -- 2.39.2