From 39d62978c35d5a3b3007cdecfc0689d490d79349 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 30 May 2019 15:10:05 +0300 Subject: [PATCH] Remove QT4 compatibility. --- CMakeLists.txt | 7 +------ src/PVGUI/PVGUI_Module.cxx | 5 +---- src/PVGUI/PVGUI_Module.h | 5 +---- .../ArrayRenamer/pqArraysEditorPropertyWidget.cxx | 13 +------------ .../ParaViewPlugin/VectBoolSpreadSheet.cxx | 6 +----- 5 files changed, 5 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61a5ffaf..aa3b7c26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,12 +129,7 @@ ENDIF() ## ## From GUI ## - -IF (NOT SALOME_GUI_BUILD_WITH_QT5) - FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtHelp) -ELSE() - FIND_PACKAGE(SalomeQt5 REQUIRED) -ENDIF() +FIND_PACKAGE(SalomeQt5 REQUIRED) ## ## Specific to ParaViS: diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index be201adf..05b370d3 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -645,11 +645,8 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study ) SUIT_ExceptionHandler::removeCleanUpRoutine( paravisCleanUp ); if (myOldMsgHandler) -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - qInstallMsgHandler(myOldMsgHandler); -#else qInstallMessageHandler(myOldMsgHandler); -#endif + restoreCommonWindowsState(); return LightApp_Module::deactivateModule( study ); diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 72062d54..3cdc4bb7 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -217,11 +217,8 @@ private: typedef QMap DockWindowMap; DockWindowMap myCommonMap; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QtMsgHandler myOldMsgHandler; -#else QtMessageHandler myOldMsgHandler; -#endif + vtkEventQtSlotConnect* VTKConnect; pqPythonScriptEditor* myTraceWindow; diff --git a/src/Plugins/ArrayRenamer/pqArraysEditorPropertyWidget.cxx b/src/Plugins/ArrayRenamer/pqArraysEditorPropertyWidget.cxx index 1f2bcaa3..2fac7fca 100644 --- a/src/Plugins/ArrayRenamer/pqArraysEditorPropertyWidget.cxx +++ b/src/Plugins/ArrayRenamer/pqArraysEditorPropertyWidget.cxx @@ -437,13 +437,9 @@ pqEditComponents::pqEditComponents( pqComponentsModel* model, QWidget* parent ) QTableView* componentsTable = new QTableView( this ); componentsTable->setModel( model ); aCompsLayout->addWidget( componentsTable ); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - componentsTable->horizontalHeader()->setResizeMode( pqComponentsModel::COMPONENT_NAME, QHeaderView::Stretch ); - componentsTable->horizontalHeader()->setResizeMode( pqComponentsModel::NEW_COMPONENT_NAME, QHeaderView::Stretch ); -#else componentsTable->horizontalHeader()->setSectionResizeMode( pqComponentsModel::COMPONENT_NAME, QHeaderView::Stretch ); componentsTable->horizontalHeader()->setSectionResizeMode( pqComponentsModel::NEW_COMPONENT_NAME, QHeaderView::Stretch ); -#endif + /// Parameters QVBoxLayout *aParamsLayout = new QVBoxLayout( aParams ); myRenameAllComps = new QCheckBox( "Rename all similar Components", aParams ); @@ -492,17 +488,10 @@ pqArraysEditorPropertyWidget::pqArraysEditorPropertyWidget( vtkSMProxy* smproxy, // Layout QVBoxLayout* lay = new QVBoxLayout(this); lay->addWidget(myArraysTable); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::PROCESSING, QHeaderView::ResizeToContents ); - myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::NAME, QHeaderView::Stretch); - myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::NEW_NAME, QHeaderView::Stretch ); - myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::COMPONENTS, QHeaderView::ResizeToContents ); -#else myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::PROCESSING, QHeaderView::ResizeToContents ); myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::NAME, QHeaderView::Stretch); myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::NEW_NAME, QHeaderView::Stretch ); myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::COMPONENTS, QHeaderView::ResizeToContents ); -#endif myArraysTable->resizeColumnsToContents(); // Connections diff --git a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx index d85fefcc..8b9ce5b5 100644 --- a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx +++ b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx @@ -217,13 +217,9 @@ void VectBoolSpreadSheet::init() this->verticalHeader()->setMinimumSectionSize(2); this->verticalHeader()->setDefaultSectionSize(2); this->setItemDelegate(_delegate); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - this->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); - this->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); -#else this->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); this->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif + this->resizeColumnsToContents(); this->resizeRowsToContents(); //this->verticalHeader()->hide(); -- 2.39.2