Salome HOME
WIP - This fixes the ParaVis compilation after deprecation of some ParaView API.
authorPascal Obry <pascal.obry@edf.fr>
Mon, 20 May 2019 07:03:39 +0000 (09:03 +0200)
committerPascal Obry <pascal.obry@edf.fr>
Thu, 23 May 2019 09:08:35 +0000 (11:08 +0200)
The compilation is fixed, but the code is incomplete for sure!

src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module_actions.cxx

index 566f29b3e4a640d3c0a1ff8c7df4068ca6ca7b7e..6210acd08bab24929237d9c78e44fa152a5d3a56 100644 (file)
 #include <pqActiveObjects.h>
 #include <pqHelpReaction.h>
 #include <pqPluginManager.h>
-#include <pqPythonDialog.h>
+//#include <pqPythonDialog.h>
 #include <pqPythonManager.h>
 #include <pqLoadDataReaction.h>
 #include <pqPythonScriptEditor.h>
@@ -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<pqPythonManager*>(pqApplicationCore::instance()->manager("PYTHON_MANAGER"));
+
+  if ( manager )  {
+    manager->executeScript(script);
+  }
+#endif
+  /*
 #ifndef WNT
   pqPythonManager* manager = qobject_cast<pqPythonManager*>(
                              pqApplicationCore::instance()->manager( "PYTHON_MANAGER" ) );
@@ -743,6 +756,7 @@ void PVGUI_Module::executeScript( const char* script )
     }
   }
 #endif
+  */
 }
 
 ///**
index fe4b75352cb92a98f8fcb380938130af189325ce..2825186a4bbbef9fc57001d90c11dde05754be08 100644 (file)
@@ -67,7 +67,7 @@
 #include <pqAboutDialogReaction.h>
 #include <pqHelpReaction.h>
 #include <pqDataQueryReaction.h>
-#include <pqPythonShellReaction.h>
+//#include <pqPythonShellReaction.h>
 
 #include <pqViewManager.h>
 #include <pqViewMenuManager.h>
@@ -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);