]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
Correction pour possibilité d'utilisation des pré-requis natifs
authorsalome <>
Tue, 3 May 2005 07:40:46 +0000 (07:40 +0000)
committersalome <>
Tue, 3 May 2005 07:40:46 +0000 (07:40 +0000)
src/TclQtNotifier/notifqtmodule.cpp
src/TclQtNotifier/setup.py.in

index 721ef37baf27a1895e6306d1c8f85b6dc4675dfd..46c3e3abde8fae2d8d431338b6861ce41c13467e 100644 (file)
@@ -6,14 +6,19 @@ using namespace std;
 #include <sys/time.h>
 #include <Python.h>
 #include <sip.h>
+#include <qglobal.h>
 
 /*
  * 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;
index b964c2ede76200c32dedd922da8618fd0be69f92..92cdf57ec4958baa2a117bc7b322a46f1340a2e5 100644 (file)
@@ -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,
                       )
                 ])