Salome HOME
0022856: EDF 9971 PARAVIS: Error message not displayed in Paravis
authorvsr <vsr@opencascade.com>
Fri, 19 Oct 2018 12:03:06 +0000 (15:03 +0300)
committervsr <vsr@opencascade.com>
Fri, 19 Oct 2018 12:03:06 +0000 (15:03 +0300)
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/PVGUI/PVGUI_Module_actions.cxx

index a97901b79b583a4112126bc0191223b83c707664..0372753d04edb3544fc5ce8c6747b98698a05103 100644 (file)
@@ -87,7 +87,6 @@
 #include <vtkProcessModule.h>
 #include <vtkPVSession.h>
 #include <vtkPVProgressHandler.h>
-#include <vtkOutputWindow.h>
 #include <vtkEventQtSlotConnect.h>
 #include <vtkNew.h>
 #include <vtkSMProxy.h>
@@ -270,7 +269,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
 
   // Initialize ParaView client and associated behaviors
   // and connect to externally launched pvserver
-  PVViewer_Core::ParaviewInitApp(aDesktop, anApp->logWindow());
+  PVViewer_Core::ParaviewInitApp(aDesktop);
   myGuiElements = PVViewer_GUIElements::GetInstance(aDesktop);
 
   // [ABN]: careful with the order of the GUI element creation, the loading of the configuration
@@ -479,7 +478,7 @@ void PVGUI_Module::showView( bool toShow )
   PVViewer_ViewManager* viewMgr =
     dynamic_cast<PVViewer_ViewManager*>( anApp->getViewManager( PVViewer_Viewer::Type(), false ) );
   if ( !viewMgr ) {
-    viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop(), anApp->logWindow() );
+    viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop() );
     anApp->addViewManager( viewMgr );
     connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
              anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) );
@@ -528,51 +527,7 @@ void PVGUI_Module::endWaitCursor()
 {
   QApplication::restoreOverrideCursor();
 }
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-/*!
-  \brief Handler method for the output of messages.
-*/
-static void ParavisMessageOutput(QtMsgType type, const char *msg)
-{
-  switch(type)
-    {
-  case QtDebugMsg:
-    vtkOutputWindow::GetInstance()->DisplayText(msg);
-    break;
-  case QtWarningMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
-    break;
-  case QtCriticalMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
-    break;
-  case QtFatalMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
-    break;
-    }
-}
-#else
-/*!
-  \brief Handler method for the output of messages.
-*/
-static void ParavisMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-{
-  switch(type)
-    {
-  case QtDebugMsg:
-    vtkOutputWindow::GetInstance()->DisplayText(msg.toLatin1().constData());
-    break;
-  case QtWarningMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
-    break;
-  case QtCriticalMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
-    break;
-  case QtFatalMsg:
-    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
-    break;
-    }
-}
-#endif
+
 /*!
   \brief Activate module.
   \param study current study
@@ -581,11 +536,6 @@ static void ParavisMessageOutput(QtMsgType type, const QMessageLogContext &conte
 */
 bool PVGUI_Module::activateModule( SUIT_Study* study )
 {
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-  myOldMsgHandler = qInstallMsgHandler(ParavisMessageOutput);
-#else
-  myOldMsgHandler = qInstallMessageHandler(ParavisMessageOutput);
-#endif  
   SUIT_ExceptionHandler::addCleanUpRoutine( paravisCleanUp );
 
   storeCommonWindowsState();
index f7646aad831eb251bbfad2f8f92dddf9ca9a37a2..2a9bc0533621119ed28e8b4c81aa8204aae845ef 100644 (file)
@@ -102,7 +102,6 @@ class PVGUI_Module: public LightApp_Module
     MaxWindowSizeId,
     CustomWindowSizeId,
     TimerLogId,
-    OutputWindowId,
     PythonShellId,
     ShowTraceId,
     RestartTraceId,
index caa470713c993f3b7e7cd54b1b579e59e7320836..b55cf237d8943f52f7c2520f849cfe0abb80d62e 100644 (file)
@@ -343,14 +343,6 @@ void PVGUI_Module::pvCreateActions()
   registerAction(TimerLogId, anAction);
   new pqTimerLogReaction(anAction << pqSetName("actionToolsTimerLog"));
 
-  // Output Window
-  anAction = new QAction(tr("MEN_OUTPUT_WINDOW"), this);
-  anAction->setToolTip(tr("TOP_OUTPUT_WINDOW"));
-  anAction->setStatusTip(tr("STB_OUTPUT_WINDOW"));
-  registerAction(OutputWindowId, anAction);
-  anAction << pqSetName("actionToolsOutputWindow");
-  connect(anAction, SIGNAL(triggered()), pqApplicationCore::instance(), SLOT(showOutputWindow()));
-  
  // Python Shell
   anAction = new QAction(tr("MEN_PYTHON_SHELL"), this);
   anAction->setToolTip(tr("TOP_PYTHON_SHELL"));
@@ -497,7 +489,6 @@ void PVGUI_Module::pvCreateMenus()
   createMenu( separator(), aToolsMnu );
 
   createMenu( TimerLogId, aToolsMnu );
-  createMenu( OutputWindowId, aToolsMnu );
   createMenu( separator(), aToolsMnu );
 
   createMenu( PythonShellId, aToolsMnu );