From 049dd7c98bf9cfdc07368655248e9b6ed16432e2 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 9 Jul 2008 05:49:59 +0000 Subject: [PATCH] Merge from BR_Dev_For_4_0 (4.1.1) 07.07.08 --- adm_local/unix/config_files/check_opengl.m4 | 35 +++++++++++++++++++++ src/PyConsole/PyConsole_Interp.cxx | 10 ++++++ src/QDS/QDS_ComboBox.cxx | 2 ++ src/QDS/QDS_RadioBox.cxx | 2 +- src/Session/SALOME_Session_Server.cxx | 19 ++++++----- 5 files changed, 60 insertions(+), 8 deletions(-) diff --git a/adm_local/unix/config_files/check_opengl.m4 b/adm_local/unix/config_files/check_opengl.m4 index 8a56e0f54..a1eb48ee2 100644 --- a/adm_local/unix/config_files/check_opengl.m4 +++ b/adm_local/unix/config_files/check_opengl.m4 @@ -162,6 +162,40 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then break fi done + + # workaround a problem with libGL library location + for idir in $dirs; do + if test -r "${idir}/libGLU.la"; then + GLU_LA_PATH="${idir}/libGLU.la" + GL_LA_PATH_TO_CHECK=`cat ${GLU_LA_PATH} | awk '{ for(i=1;i0) print $i } }'` + if test -z ${GL_LA_PATH_TO_CHECK} || test -r ${GL_LA_PATH_TO_CHECK}; then + # nothing to do + break + fi + for jdir in $dirs; do + if test -r "${jdir}/libGL.la"; then + GL_LA_PATH="${jdir}/libGL.la" + # copy the libGLU.la file and set correct libGL.la path in it + NEW_GLU_LA_PATH=${ROOT_BUILDDIR} + NEW_GLU_LA_FILE="${NEW_GLU_LA_PATH}/libGLU.la" + sed -e "s%${GL_LA_PATH_TO_CHECK}%${GL_LA_PATH}%" ${GLU_LA_PATH} > "${NEW_GLU_LA_FILE}" + chmod -f --reference=${GLU_LA_PATH} "${NEW_GLU_LA_FILE}" + # set a new libGLU.la path + GLU_LIB_PATH="-L${NEW_GLU_LA_PATH}" + # create a simbolic link to libGLU.so + for kdir in $dirs; do + if test -r "${kdir}/libGLU.so"; then + cp -fs "${kdir}/libGLU.so" "${NEW_GLU_LA_PATH}/libGLU.so" + break + fi + done + break + fi + done + break + fi + done + LDFLAGS_old="${LDFLAGS}" LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}" AC_CHECK_LIB([GLU], @@ -193,3 +227,4 @@ AC_SUBST(OGL_LIBS) AC_LANG_RESTORE ])dnl + diff --git a/src/PyConsole/PyConsole_Interp.cxx b/src/PyConsole/PyConsole_Interp.cxx index 234e55973..003d59f39 100644 --- a/src/PyConsole/PyConsole_Interp.cxx +++ b/src/PyConsole/PyConsole_Interp.cxx @@ -93,6 +93,16 @@ bool PyConsole_Interp::initState() _tstate = Py_NewInterpreter(); // create an interpreter and save current state PySys_SetArgv(PyInterp_Interp::_argc,PyInterp_Interp::_argv); // initialize sys.argv + if(!builtinmodule) // PAL18041: deepcopy function don't work in Salome + { + //builtinmodule is static member of PyInterp class + //If it is not NULL (initialized to the builtin module of the main interpreter + //all the sub interpreters will have the same builtin + //_interp is a static member and is the main interpreter + //The first time we initialized it to the builtin of main interpreter + builtinmodule=PyDict_GetItemString(_interp->modules, "__builtin__"); + } + //If builtinmodule has been initialized all the sub interpreters // will have the same __builtin__ module if(builtinmodule){ diff --git a/src/QDS/QDS_ComboBox.cxx b/src/QDS/QDS_ComboBox.cxx index 163e25631..f7131aada 100644 --- a/src/QDS/QDS_ComboBox.cxx +++ b/src/QDS/QDS_ComboBox.cxx @@ -298,6 +298,8 @@ void QDS_ComboBox::setValues( const QList& ids, const QStringList& names ) myUserIds = ids; myUserNames = names; + + unitSystemChanged( "" ); } /*! diff --git a/src/QDS/QDS_RadioBox.cxx b/src/QDS/QDS_RadioBox.cxx index 390a234f5..4e1851e49 100644 --- a/src/QDS/QDS_RadioBox.cxx +++ b/src/QDS/QDS_RadioBox.cxx @@ -469,8 +469,8 @@ void QDS_RadioBox::updateRadioBox() if ( curId != bg->checkedId() ) { onParamChanged(); - emit paramChanged(); QString str = getString(); + emit paramChanged(); emit paramChanged( str ); } } diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 72a74fd3e..8f28b4ab3 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -341,7 +341,8 @@ void killOmniNames() cmd += QString("[ m.update(i) for i in pids ]; "); cmd += QString("pids=filter(lambda a: 'notifd' in m[a], m.keys()); "); cmd += QString("[ os.kill(pid, 9) for pid in pids ]; "); - cmd = QString("python -c \"%1\"").arg(cmd); + cmd += QString("os.remove(filedict); "); + cmd = QString("python -c \"%1\" > /dev/null").arg(cmd); system( cmd.toLatin1().data() ); } @@ -662,10 +663,8 @@ int main( int argc, char **argv ) // unlock Session mutex _SessionMutex.unlock(); - if ( shutdown ) { + if ( shutdown ) shutdownServers( _NS ); - killOmniNames(); - } if ( myServerLauncher ) myServerLauncher->KillAll(); // kill embedded servers @@ -682,11 +681,17 @@ int main( int argc, char **argv ) orb->destroy(); } catch (...) { - std::cerr << "Caught unexpected exception on destroy : ignored !!" << std::endl; + ////////////////////////////////////////////////////////////// + // VSR: silently skip exception: + // CORBA.BAD_INV_ORDER.BAD_INV_ORDER_ORBHasShutdown + // exception is raised when orb->destroy() is called and + // cpp continer is launched in the embedded mode + ////////////////////////////////////////////////////////////// + // std::cerr << "Caught unexpected exception on destroy : ignored !!" << std::endl; } - // if ( shutdown ) - // killOmniNames(); + if ( shutdown ) + killOmniNames(); return result; } -- 2.39.2