]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CCAR: Modifiactions to make KERNEL compile with g++ 3.3 (standard ISO) CPP33PYQT311
authorcaremoli <caremoli>
Fri, 21 Jan 2005 14:09:19 +0000 (14:09 +0000)
committercaremoli <caremoli>
Fri, 21 Jan 2005 14:09:19 +0000 (14:09 +0000)
and to make Salome able to use PyQt 3.11 (+sip 3.10.1) as a prerequisite.
Modification to check_boost is not mandatory
Modification to QAD_FileDlg.h is already in the main trunk.

salome_adm/unix/config_files/check_boost.m4
salome_adm/unix/config_files/check_sip.m4
salome_adm/unix/make_commence.in
src/Logger/SALOME_Trace.hxx
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEGUI/QAD_FileDlg.h
src/SALOME_PYQT/Makefile.in

index 789167b4c1264a3d29860a04c96f3f492090f5bf..fd04b76d1033b9783e2dc94f1ce65e260c564fa3 100644 (file)
@@ -37,7 +37,7 @@ else
   AC_CHECKING(for boost/shared_ptr.hpp header file)
   dnl BOOST headers
   CPPFLAGS_old="${CPPFLAGS}"
-  BOOST_CPPFLAGS="-I${BOOSTDIR}"
+  BOOST_CPPFLAGS="-I${BOOSTDIR}/include"
   CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}"
 
   AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no)
index 48a025918c32991048b7c7714351e774a0ed44a8..84c2beaf73829cdb40eff8f552fb44e7bd698962 100644 (file)
@@ -21,42 +21,51 @@ else
     version=`sip -V`
     case "$version" in
          3.2*)
-           sip_vers=old ;;
+           SIP_VERS=old ;;
          3.3*)
-           sip_vers=old ;;
+           SIP_VERS=old ;;
          3.4*)
-           sip_vers=new ;;
+           SIP_VERS=new ;;
          3.5*)
-           sip_vers=new ;;
+           SIP_VERS=new ;;
          3.6*)
-           sip_vers=new ;;
+           SIP_VERS=new ;;
          3.7*)
-           sip_vers=new ;;
+           SIP_VERS=new ;;
          3.8*)
-           sip_vers=new ;;
+           SIP_VERS=new ;;
          3.9*)
-           sip_vers=new ;;
-           *)
-           sip_vers=no ;;
+           SIP_VERS=new ;;
+         3.10*)
+           SIP_VERS=new2 ;;
+         *)
+           AC_MSG_RESULT(sip version $version not supported)
+           SIP_VERS=no ;;
     esac
     sip_ok=no
 
-    if test "x$sip_vers" = "xold"
+    if test "x$SIP_VERS" = "xold"
     then
+        dnl old install : includes and libs are in python install or in SIPDIR
+        AC_MSG_RESULT(old install detected)
         sip_ok=yes
        SIP_ROOT="$SIPDIR"
        SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}"
        SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -L${SIPDIR} -lsip"
     fi
 
-    if test "x$sip_vers" = "xnew"
+    if test "x$SIP_VERS" = "xnew"
     then
        sip_ok=yes
        if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
+           AC_MSG_RESULT(new install with include dir detected)
+           dnl new install with include dir : includes and libs are in python install or in SIPDIR/include
           SIP_ROOT="$SIPDIR"
           SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}"
           SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
        else
+           dnl new install without include dir : includes and libs are in SIPDIR
+           AC_MSG_RESULT(new install without include dir detected)
           sip_ok=yes
           SIP_ROOT="$SIPDIR"
           SIP_INCLUDES="-I${SIPDIR}"
@@ -64,11 +73,22 @@ else
         fi
     fi
 
+    if test "x$SIP_VERS" = "xnew2"
+        then
+        dnl new2 install : includes and libs are in python install 
+        AC_MSG_RESULT(new2 install detected)
+       sip_ok=yes
+        AC_CHECK_FILE($PYTHON_PREFIX/include/python$PYTHON_VERSION/sip.h,sip_ok=$sip_ok,sip_ok=no)
+       SIP_INCLUDES="${PYTHON_INCLUDES}"
+        AC_CHECK_FILE($PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages/libsip.so,sip_ok=$sip_ok,sip_ok=no)
+       SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+    fi
 fi
 
 AC_SUBST(SIP)
 AC_SUBST(SIP_INCLUDES)
 AC_SUBST(SIP_LIBS)
+AC_SUBST(SIP_VERS)
 
 AC_MSG_RESULT(for sip: $sip_ok)
 
index 77747e2b817073799c45d4643c0246468f3cb02d..2fcfbfc7705df13b7274430fd61cef5e5ea6af6d 100644 (file)
@@ -88,6 +88,7 @@ QWT_LIBS=@QWT_LIBS@
 SIP = @SIP@
 SIP_INCLUDES = @SIP_INCLUDES@
 SIP_LIBS = @SIP_LIBS@
+SIP_VERS = @SIP_VERS@
 
 # PYQT
 PYQT_SIPS = @PYQT_SIPS@
index e0019a1f5c57023376268c5bc35e99e692743b30..31c870b8395e124dd64e3ded5d8ef5e3a41f8460 100644 (file)
@@ -11,7 +11,8 @@
 #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)
 #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_
 
-#include <strstream.h>
+// CCAR : g++ 3.3 #include <strstream.h>
+#include <strstream>
 #include "Logger.hh"
 
 //these declarations for files don't using OCC includes (for example HDF)
index 62b2f3d89077cb89cae6c7ab19454368010d7fdb..92f45b1a9e0662fb36dfb8f6e3b619e13bcf4c4c 100644 (file)
@@ -188,7 +188,8 @@ namespace SALOMEDS{
     TAttrID2FunMap::const_iterator anEnd = __AttrID2FunMap__.end();
     for(; anIter != anEnd; anIter++){
       const TAttrID2FunMap::key_type& aKey = anIter->first;
-      const TAttrID2FunMap::data_type& aValue = anIter->second;
+      const TAttrID2FunMap::mapped_type& aValue = anIter->second;
+      //const TAttrID2FunMap::data_type& aValue = anIter->second;
       __GUID2AttrIDMap__[aValue.myGetGUID()] = aKey;
     };
 
@@ -223,7 +224,8 @@ namespace SALOMEDS{
   {
     TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType);
     if(anIter != __AttrID2FunMap__.end()){
-      const TAttrID2FunMap::data_type& aValue = anIter->second;
+      const TAttrID2FunMap::mapped_type& aValue = anIter->second;
+      //const TAttrID2FunMap::data_type& aValue = anIter->second;
       return aValue.myGetGUID();
     }
     // create tree node GUID by name
@@ -567,7 +569,8 @@ SALOMEDS_SObject_i::_CreateGenAttribute(const Handle(TDF_Attribute)& theAttr,
   
   TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType);
   if(anIter != __AttrID2FunMap__.end()){
-    const TAttrID2FunMap::data_type& aValue = anIter->second;
+    const TAttrID2FunMap::mapped_type& aValue = anIter->second;
+    //const TAttrID2FunMap::data_type& aValue = anIter->second;
     
     if(aValue.myIsCheckLockedStudy())
       _study->CheckLocked();
@@ -646,7 +649,8 @@ Handle(TDF_Attribute)
   Handle(TDF_Attribute) anAttr;
   TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType);
   if(anIter != __AttrID2FunMap__.end()){
-    const TAttrID2FunMap::data_type& aValue = anIter->second;
+    const TAttrID2FunMap::mapped_type& aValue = anIter->second;
+    //const TAttrID2FunMap::data_type& aValue = anIter->second;
     
     if(aValue.myIsCheckLockedStudy())
       _study->CheckLocked();
index a604596a592a666b927d4bcc097619513db44c03..e7180753ef29d6fe167ee918450d7af1c45766cf 100644 (file)
 
 #include <qcombobox.h>
 
+// VSR (18/01/2005): use patched QFileDialog only for the official 3.0.5 version of Qt
+#if QT_VERSION == 0x030005
 #include <qfiledialogP.h>
+#else
+#include <qfiledialog.h>
+#define QFileDialogP QFileDialog
+#endif
+
 #include "QAD.h"
 #include "QAD_FileValidator.h"
 
index 7c1de51a1d385650d549891ef80a05b961d98177..15a0704bcc007215e6a1ba424b6872ed69016e87 100644 (file)
@@ -34,12 +34,18 @@ SIP_SRC=$(CURDIR)/SalomePyQtcmodule.cc \
        $(CURDIR)/sipSalomePyQtSalomePyQt.cc \
        $(CURDIR)/sipSalomePyQtSALOME_Selection.cc
 
+ifeq ($(SIP_VERS),new2)
+MOC_SRC = SalomePyQtcmodule_moc.cxx
+MOC_H = SalomePyQtcmodule.h
+else
+MOC_SRC = sipSalomePyQtProxySalomePyQt_moc.cxx
+MOC_H = sipSalomePyQtProxySalomePyQt.h
+endif
+
 # Libraries targets
 
 LIB = libSalomePyQtcmodule.la
 
-MOC_SRC = sipSalomePyQtProxySalomePyQt_moc.cxx
-
 LIB_SRC += SalomePyQt.cxx SALOME_PYQT_GUI.cxx $(SIP_SRC) $(MOC_SRC) 
 LIB_MOC = SALOME_PYQT_GUI.h
 
@@ -59,7 +65,7 @@ LDFLAGS+= -lSalomeGUI -lqtcmodule
 $(SIP_SRC): $(SIP_FILES)
        $(SIP) $(SIP_FLAGS) $<
 
-$(MOC_SRC): sipSalomePyQtProxySalomePyQt.h
+$(MOC_SRC): $(MOC_H)
        $(MOC) $< -o $@
 
 @CONCLUDE@