From: vsr Date: Fri, 19 Oct 2018 12:03:06 +0000 (+0300) Subject: 0022856: EDF 9971 PARAVIS: Error message not displayed in Paravis X-Git-Tag: V9_2_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d0b43bff1ae873ee8bc4b0ef490ff260d31bfa9b;p=modules%2Fparavis.git 0022856: EDF 9971 PARAVIS: Error message not displayed in Paravis --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index a97901b7..0372753d 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -87,7 +87,6 @@ #include #include #include -#include #include #include #include @@ -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( 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(); diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index f7646aad..2a9bc053 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -102,7 +102,6 @@ class PVGUI_Module: public LightApp_Module MaxWindowSizeId, CustomWindowSizeId, TimerLogId, - OutputWindowId, PythonShellId, ShowTraceId, RestartTraceId, diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index caa47071..b55cf237 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -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 );