From: salome <> Date: Tue, 3 May 2005 07:40:46 +0000 (+0000) Subject: Correction pour possibilité d'utilisation des pré-requis natifs X-Git-Tag: CL_Pour_Eficas17~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c99a2caf95b14f1f80d83768a5bfc48c98c340cc;p=modules%2Feficas.git Correction pour possibilité d'utilisation des pré-requis natifs --- 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, ) ])