From: Pascal Obry Date: Mon, 20 May 2019 07:03:39 +0000 (+0200) Subject: WIP - This fixes the ParaVis compilation after deprecation of some ParaView API. X-Git-Tag: V9_4_0a1~7^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6064d37c28b71804453efefaa4b7f1e759c25f84;p=modules%2Fparavis.git WIP - This fixes the ParaVis compilation after deprecation of some ParaView API. The compilation is fixed, but the code is incomplete for sure! --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 566f29b3..6210acd0 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -108,7 +108,7 @@ #include #include #include -#include +//#include #include #include #include @@ -733,6 +733,19 @@ void PVGUI_Module::stopTrace() */ void PVGUI_Module::executeScript( const char* script ) { + // ??? + // Not sure this is the right fix, but the PYTHON_MANAGER has a function named + // executeScript() which seems to do what the runScript on pyShellDialog() class + // was doing. +#ifndef WNT + pqPythonManager* manager = + qobject_cast(pqApplicationCore::instance()->manager("PYTHON_MANAGER")); + + if ( manager ) { + manager->executeScript(script); + } +#endif + /* #ifndef WNT pqPythonManager* manager = qobject_cast( pqApplicationCore::instance()->manager( "PYTHON_MANAGER" ) ); @@ -743,6 +756,7 @@ void PVGUI_Module::executeScript( const char* script ) } } #endif + */ } ///** diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index fe4b7535..2825186a 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -67,7 +67,7 @@ #include #include #include -#include +//#include #include #include @@ -343,12 +343,17 @@ void PVGUI_Module::pvCreateActions() registerAction(TimerLogId, anAction); new pqTimerLogReaction(anAction << pqSetName("actionToolsTimerLog")); - // Python Shell + // Python Shell + // ??? + // No more pqPythonShellReaction class, but there is a pqPythonShell class. + // Is that equivalent? I don't know what to do at this stage. anAction = new QAction(tr("MEN_PYTHON_SHELL"), this); anAction->setToolTip(tr("TOP_PYTHON_SHELL")); anAction->setStatusTip(tr("STB_PYTHON_SHELL")); registerAction(PythonShellId, anAction); + /* new pqPythonShellReaction(anAction << pqSetName("actionToolsPythonShell")); + */ //Show Trace anAction = new QAction(tr("MEN_SHOW_TRACE"), this);