From aef922b7be3754097b9cae28dbee31c794a2bf00 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 10 Nov 2009 06:49:36 +0000 Subject: [PATCH] Integrate patch from G.David (workaround the bug of sip 4.8) --- .../SALOME_PYQT_ModuleLight.cxx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx index 2bf1056cb..a985518c8 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx @@ -1185,7 +1185,13 @@ void SALOME_PYQT_ModuleLight::contextMenu( const QString& theContext, QMenu* the if ( myXmlHandler ) myXmlHandler->createPopup( thePopupMenu, aContext, aParent, aObject ); - PyObjWrapper sipPopup( sipBuildResult( 0, "M", thePopupMenu, sipClass_QMenu ) ); + PyObjWrapper sipPopup( sipBuildResult( 0, "D", thePopupMenu, +#if SIP_VERSION < 0x040800 + sipClass_QMenu +#else + sipType_QMenu +#endif + , NULL) ); // then call Python module's createPopupMenu() method (for new modules) if ( PyObject_HasAttrString( myModule, "createPopupMenu" ) ) { @@ -1397,7 +1403,13 @@ void SALOME_PYQT_ModuleLight::setWorkSpace() if ( aDesktop ) aWorkspace = aDesktop->workstack(); } - PyObjWrapper pyws( sipBuildResult( 0, "M", aWorkspace, sipClass_QWidget ) ); + PyObjWrapper pyws( sipBuildResult( 0, "D", aWorkspace, +#if SIP_VERSION < 0x040800 + sipClass_QWidget +#else + sipType_QWidget +#endif + , NULL) ); // ... and finally call Python module's setWorkspace() method (obsolete) if ( PyObject_HasAttrString( myModule, "setWorkSpace" ) ) { PyObjWrapper res( PyObject_CallMethod( myModule, (char*)"setWorkSpace", (char*)"O", pyws.get() ) ); @@ -2460,13 +2472,13 @@ void SALOME_PYQT_ModuleLight::openEvent(QStringList theListOfFiles, bool &opened return; QStringList* theList = new QStringList(theListOfFiles); - PyObjWrapper sipList( sipBuildResult( 0, "M", theList, + PyObjWrapper sipList( sipBuildResult( 0, "D", theList, #if SIP_VERSION < 0x040800 sipClass_QStringList #else sipType_QStringList #endif - ) ); + , NULL) ); if ( PyObject_HasAttrString(myModule , "openFiles") ) { PyObjWrapper res( PyObject_CallMethod( myModule, (char*)"openFiles", (char*)"O", sipList.get())); -- 2.39.2