diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake index be11fe5ae..074823325 100644 --- a/CMake/ParaViewClient.cmake +++ b/CMake/ParaViewClient.cmake @@ -285,7 +285,7 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") endif () include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL) - find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets) + find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Core Widgets) # CMake 3.13 started using Qt5's version variables to detect what version # of Qt's tools to run for autorcc. However, they are looked up using the @@ -294,8 +294,8 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") # Fix for 3.13.0–3.13.3. Does not work if `paraview_client_add` is called # from another function. - set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE) - set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE) + set(Qt${VTK_QT_VERSION}Core_VERSION_MAJOR "${Qt${VTK_QT_VERSION}Core_VERSION_MAJOR}" PARENT_SCOPE) + set(Qt${VTK_QT_VERSION}Core_VERSION_MINOR "${Qt${VTK_QT_VERSION}Core_VERSION_MINOR}" PARENT_SCOPE) # Fix for 3.13.4+. set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY @@ -375,12 +375,12 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") target_link_libraries("${_paraview_client_NAME}" PRIVATE ParaView::pqApplicationComponents - Qt5::Widgets + Qt${VTK_QT_VERSION}::Widgets VTK::vtksys) if (PARAVIEW_USE_QTWEBENGINE) - find_package(Qt5 REQUIRED QUIET COMPONENTS WebEngineWidgets) + find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS WebEngineWidgets) target_link_libraries("${_paraview_client_NAME}" - PRIVATE Qt5::WebEngineWidgets) + PRIVATE Qt${VTK_QT_VERSION}::WebEngineWidgets) endif () set(_paraview_client_export) @@ -517,7 +517,7 @@ function (paraview_client_documentation) endif () include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL) - find_program(qt_xmlpatterns_executable + find_program(qt_xmlpatterns_executable # this only exists in qt5 and the portfile deactivates xml docs NAMES xmlpatterns-qt5 xmlpatterns HINTS "${Qt5_DIR}/../../../bin" "${Qt5_DIR}/../../../libexec/qt5/bin" @@ -802,7 +802,7 @@ function (paraview_client_generate_help) endif () include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL) - find_package(Qt5 QUIET REQUIRED COMPONENTS Help) + find_package(Qt${VTK_QT_VERSION} QUIET REQUIRED COMPONENTS Help) set(_paraview_client_help_copy_sources) set(_paraview_client_help_copied_sources) @@ -843,7 +843,7 @@ function (paraview_client_generate_help) -P "${_ParaViewClient_script_file}" VERBATIM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} - $ + $ "${_paraview_client_help_qhp}" -s -o "${_paraview_client_help_output}" diff --git a/CMake/ParaViewPlugin.cmake b/CMake/ParaViewPlugin.cmake index f349f2cbf..13708a004 100644 --- a/CMake/ParaViewPlugin.cmake +++ b/CMake/ParaViewPlugin.cmake @@ -1331,16 +1331,16 @@ function (paraview_add_plugin name) list(APPEND _paraview_add_plugin_qt_extra_components Widgets) list(APPEND _paraview_add_plugin_required_libraries - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets) list(APPEND _paraview_add_plugin_ui_sources ${_paraview_add_plugin_UI_FILES}) endif () if (_paraview_add_plugin_with_ui OR _paraview_add_plugin_with_resources) include("${_ParaViewPlugin_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL) - find_package(Qt5 QUIET REQUIRED COMPONENTS Core ${_paraview_add_plugin_qt_extra_components}) + find_package(Qt${VTK_QT_VERSION} QUIET REQUIRED COMPONENTS Core ${_paraview_add_plugin_qt_extra_components}) list(APPEND _paraview_add_plugin_required_libraries - Qt5::Core) + Qt${VTK_QT_VERSION}::Core) if (_paraview_add_plugin_with_ui) list(APPEND _paraview_add_plugin_required_libraries ParaView::pqCore) @@ -1354,15 +1354,15 @@ function (paraview_add_plugin name) # Fix for 3.13.0–3.13.3. Does not work if `paraview_add_plugin` is called # from another function. - set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE) - set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE) + set(Qt${VTK_QT_VERSION}Core_VERSION_MAJOR "${Qt${VTK_QT_VERSION}Core_VERSION_MAJOR}" PARENT_SCOPE) + set(Qt${VTK_QT_VERSION}Core_VERSION_MINOR "${Qt${VTK_QT_VERSION}Core_VERSION_MINOR}" PARENT_SCOPE) # Fix for 3.13.4+. set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY - Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}") + Qt${VTK_QT_VERSION}Core_VERSION_MAJOR "${Qt${VTK_QT_VERSION}Core_VERSION_MAJOR}") set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY - Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MAJOR}") + Qt5Core_VERSION_MINOR "${Qt${VTK_QT_VERSION}Core_VERSION_MAJOR}") endif () set(_paraview_add_plugin_with_python 0) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37bd1965c..ef7e7d1eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -626,7 +626,7 @@ else () set(VTK_BUILD_QT_DESIGNER_PLUGIN OFF) set(VTK_INSTALL_PYTHON_EXES OFF) - set(VTK_QT_VERSION 5) + set(VTK_QT_VERSION 6) cmake_dependent_option(VTK_NO_PYTHON_THREADS "Disable Python Threads support" ON "PARAVIEW_USE_PYTHON" OFF) diff --git a/Clients/ParaView/CMakeLists.txt b/Clients/ParaView/CMakeLists.txt index f51fe395b..bc132c095 100644 --- a/Clients/ParaView/CMakeLists.txt +++ b/Clients/ParaView/CMakeLists.txt @@ -33,7 +33,7 @@ set(sources ParaViewMainWindow.h ParaViewMainWindow.ui) -find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Core Widgets) if (APPLE) # Enable high resolution when using Qt5 @@ -76,13 +76,13 @@ paraview_client_add( PLUGINS_TARGETS ParaView::paraview_plugins APPLICATION_XMLS ${xmls}) -find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Widgets) target_link_libraries(paraview PRIVATE ParaView::RemotingSettings - Qt5::Core - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Core + Qt${VTK_QT_VERSION}::Widgets) target_compile_definitions(paraview PRIVATE diff --git a/Clients/ParaView/Documentation/CMakeLists.txt b/Clients/ParaView/Documentation/CMakeLists.txt index c8d550f49..c4551367d 100644 --- a/Clients/ParaView/Documentation/CMakeLists.txt +++ b/Clients/ParaView/Documentation/CMakeLists.txt @@ -43,7 +43,7 @@ paraview_client_generate_help( set(CMAKE_AUTORCC 1) -find_package(Qt5 REQUIRED QUIET COMPONENTS Core) +find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Core) add_library(vtkParaViewDocumentation STATIC ParaViewDocumentationInitializer.cxx @@ -54,7 +54,7 @@ target_include_directories(vtkParaViewDocumentation "$") target_link_libraries(vtkParaViewDocumentation PRIVATE - Qt5::Core) + Qt${VTK_QT_VERSION}::Core) install( FILES "${paraview_qch}" diff --git a/Examples/CustomApplications/Demo0/CMakeLists.txt b/Examples/CustomApplications/Demo0/CMakeLists.txt index 9c276bcc6..5a2682577 100644 --- a/Examples/CustomApplications/Demo0/CMakeLists.txt +++ b/Examples/CustomApplications/Demo0/CMakeLists.txt @@ -16,10 +16,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -find_package(Qt5 REQUIRED COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Widgets) add_executable(DemoApp0 DemoApp0.cxx) target_link_libraries(DemoApp0 PRIVATE ParaView::pqCore - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets) diff --git a/Examples/CustomApplications/Demo1/CMakeLists.txt b/Examples/CustomApplications/Demo1/CMakeLists.txt index 4efa3df36..6579a769d 100644 --- a/Examples/CustomApplications/Demo1/CMakeLists.txt +++ b/Examples/CustomApplications/Demo1/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -find_package(Qt5 REQUIRED COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Widgets) set(CMAKE_AUTOMOC 1) set(CMAKE_AUTOUIC 1) @@ -30,4 +30,4 @@ add_executable(DemoApp1 DemoApp1.cxx ${sources}) target_link_libraries(DemoApp1 PRIVATE ParaView::pqApplicationComponents - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets) diff --git a/Examples/CustomApplications/Demo2/CMakeLists.txt b/Examples/CustomApplications/Demo2/CMakeLists.txt index ccb4d43b5..3d4ca862a 100644 --- a/Examples/CustomApplications/Demo2/CMakeLists.txt +++ b/Examples/CustomApplications/Demo2/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -find_package(Qt5 REQUIRED COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Widgets) set(CMAKE_AUTOMOC 1) set(CMAKE_AUTOUIC 1) @@ -30,6 +30,6 @@ add_executable(DemoApp2 DemoApp2.cxx ${sources}) target_link_libraries(DemoApp2 PRIVATE ParaView::pqApplicationComponents - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets) configure_file(ParaViewFilters.xml ${CMAKE_BINARY_DIR} COPYONLY) diff --git a/Examples/Plugins/DockWidget/Plugin/CMakeLists.txt b/Examples/Plugins/DockWidget/Plugin/CMakeLists.txt index d4c87afe1..96b5540ba 100644 --- a/Examples/Plugins/DockWidget/Plugin/CMakeLists.txt +++ b/Examples/Plugins/DockWidget/Plugin/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt5 REQUIRED COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Widgets) set(interfaces) set(sources @@ -29,4 +29,4 @@ paraview_add_plugin(ExampleDockPanel target_link_libraries(ExampleDockPanel PRIVATE - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets) diff --git a/Examples/Plugins/RepresentationBehavior/CMakeLists.txt b/Examples/Plugins/RepresentationBehavior/CMakeLists.txt index b4d65f22a..0dfee987e 100644 --- a/Examples/Plugins/RepresentationBehavior/CMakeLists.txt +++ b/Examples/Plugins/RepresentationBehavior/CMakeLists.txt @@ -17,7 +17,7 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH) set(CMAKE_MACOSX_RPATH 0) endif() -QT5_WRAP_CPP(MOC_SRCS +QT${VTK_QT_VERSION}_WRAP_CPP(MOC_SRCS pqRepresentationBehaviorStarter.h pqSurfaceRepresentationBehavior.h) diff --git a/Plugins/CAVEInteraction/CMakeLists.txt b/Plugins/CAVEInteraction/CMakeLists.txt index de862c006..ac214e9c4 100644 --- a/Plugins/CAVEInteraction/CMakeLists.txt +++ b/Plugins/CAVEInteraction/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt5 QUIET REQUIRED COMPONENTS Network) +find_package(Qt${VTK_QT_VERSION} QUIET REQUIRED COMPONENTS Network) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -8,7 +8,7 @@ mark_as_advanced(PARAVIEW_PLUGIN_CAVEInteraction_USE_VRPN) option(PARAVIEW_PLUGIN_CAVEInteraction_USE_VRUI "Build CAVEInteraction plugin with VRUI support" OFF) mark_as_advanced(PARAVIEW_PLUGIN_CAVEInteraction_USE_VRUI) -find_package(Qt5 REQUIRED COMPONENTS Network) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Network) # TODO: Should something be done with the files in samples/? @@ -132,7 +132,7 @@ target_link_libraries(CAVEInteraction VTK::CommonMath VTK::CommonTransforms VTK::RenderingCore - Qt5::Network) + Qt${VTK_QT_VERSION}::Network) target_compile_definitions(CAVEInteraction PRIVATE QT_NO_KEYWORDS) if (PARAVIEW_PLUGIN_CAVEInteraction_USE_VRPN) diff --git a/Plugins/LagrangianParticleTracker/pqIntegrationModelSeedHelperWidget.cxx b/Plugins/LagrangianParticleTracker/pqIntegrationModelSeedHelperWidget.cxx index 1b5134345..3660a5867 100644 --- a/Plugins/LagrangianParticleTracker/pqIntegrationModelSeedHelperWidget.cxx +++ b/Plugins/LagrangianParticleTracker/pqIntegrationModelSeedHelperWidget.cxx @@ -119,7 +119,7 @@ void pqIntegrationModelSeedHelperWidget::resetSeedWidget(bool force) // Create main layout QGridLayout* gridLayout = new QGridLayout(this); - gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); gridLayout->setColumnStretch(0, 0); @@ -143,7 +143,7 @@ void pqIntegrationModelSeedHelperWidget::resetSeedWidget(bool force) // Add a layout in each QGridLayout* gbLayout = new QGridLayout(gb); - gbLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + gbLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); gbLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); gbLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); gb->setLayout(gbLayout); diff --git a/Plugins/PythonQtPlugin/CMakeLists.txt b/Plugins/PythonQtPlugin/CMakeLists.txt index 928b48e14..c6e0d4c71 100644 --- a/Plugins/PythonQtPlugin/CMakeLists.txt +++ b/Plugins/PythonQtPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt5 QUIET REQUIRED COMPONENTS Widgets) +find_package(Qt${VTK_QT_VERSION} QUIET REQUIRED COMPONENTS Widgets) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/Plugins/XRInterface/Plugin/CMakeLists.txt b/Plugins/XRInterface/Plugin/CMakeLists.txt index b116e880c..4f1964d31 100644 --- a/Plugins/XRInterface/Plugin/CMakeLists.txt +++ b/Plugins/XRInterface/Plugin/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt5 REQUIRED COMPONENTS Widgets Network) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Widgets Network) set(required_modules "") set(openxr_support FALSE) diff --git a/Plugins/XRInterface/Plugin/Representations/CMakeLists.txt b/Plugins/XRInterface/Plugin/Representations/CMakeLists.txt index bd45f6142..f8336705b 100644 --- a/Plugins/XRInterface/Plugin/Representations/CMakeLists.txt +++ b/Plugins/XRInterface/Plugin/Representations/CMakeLists.txt @@ -6,13 +6,13 @@ set(sources) set(xrInterfaceXMLs XRInterfaceRepresentations.xml) if (TARGET VTK::RenderingFFMPEGOpenGL2) - find_package(Qt5 REQUIRED QUIET COMPONENTS Multimedia) + find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Multimedia) list(APPEND classes vtkSkyboxMovieRepresentation) list(APPEND xrInterfaceXMLs XRInterfaceSkyboxMovieRepresentation.xml) endif() if (PARAVIEW_USE_QTWEBENGINE) - find_package(Qt5 REQUIRED QUIET COMPONENTS WebEngineWidgets Multimedia) + find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS WebEngineWidgets Multimedia) list(APPEND sources vtkXRInterfaceWebView.ui) list(APPEND classes vtkXRInterfaceWebView diff --git a/Qt/ApplicationComponents/CMakeLists.txt b/Qt/ApplicationComponents/CMakeLists.txt index 6aa659fc6..3968b2951 100644 --- a/Qt/ApplicationComponents/CMakeLists.txt +++ b/Qt/ApplicationComponents/CMakeLists.txt @@ -320,7 +320,7 @@ if (PARAVIEW_USE_QTHELP) endif () vtk_module_find_package( - PACKAGE Qt5 + PACKAGE Qt${VTK_QT_VERSION} COMPONENTS ${qt_components}) source_group("Resources" FILES @@ -339,12 +339,12 @@ vtk_module_add_module(ParaView::pqApplicationComponents ${resource_files}) vtk_module_link(ParaView::pqApplicationComponents PRIVATE - Qt5::Widgets - Qt5::Svg - Qt5::Network) + Qt${VTK_QT_VERSION}::Widgets + Qt${VTK_QT_VERSION}::Svg + Qt${VTK_QT_VERSION}::Network) vtk_module_definitions(ParaView::pqApplicationComponents PRIVATE QT_NO_KEYWORDS) if (PARAVIEW_USE_QTHELP) vtk_module_link(ParaView::pqApplicationComponents PRIVATE - Qt5::Help) + Qt${VTK_QT_VERSION}::Help) endif () diff --git a/Qt/ApplicationComponents/pqBackgroundEditorWidget.cxx b/Qt/ApplicationComponents/pqBackgroundEditorWidget.cxx index 1175a05ec..a2c1ced09 100644 --- a/Qt/ApplicationComponents/pqBackgroundEditorWidget.cxx +++ b/Qt/ApplicationComponents/pqBackgroundEditorWidget.cxx @@ -83,12 +83,12 @@ public: : PreviousType(SINGLE_COLOR_TYPE) { this->setupUi(self); - this->mainLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->mainLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->mainLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); - this->page1Layout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->page1Layout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->page1Layout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->page1Layout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); - this->page3Layout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->page3Layout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->page3Layout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); } }; diff --git a/Qt/ApplicationComponents/pqCameraManipulatorWidget.cxx b/Qt/ApplicationComponents/pqCameraManipulatorWidget.cxx index 7652f666a..26234257d 100644 --- a/Qt/ApplicationComponents/pqCameraManipulatorWidget.cxx +++ b/Qt/ApplicationComponents/pqCameraManipulatorWidget.cxx @@ -120,7 +120,7 @@ pqCameraManipulatorWidget::pqCameraManipulatorWidget( ui.setupUi(this); ui.gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); ui.gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); - ui.gridLayout->setMargin(0); + ui.gridLayout->setContentsMargins(0,0,0,0); QPointer* boxes = this->Internals->Boxes; boxes[0] = ui.comboBox_1; diff --git a/Qt/ApplicationComponents/pqCheckableProperty.cxx b/Qt/ApplicationComponents/pqCheckableProperty.cxx index 800897b28..496bf09d6 100644 --- a/Qt/ApplicationComponents/pqCheckableProperty.cxx +++ b/Qt/ApplicationComponents/pqCheckableProperty.cxx @@ -75,7 +75,7 @@ pqCheckableProperty::pqCheckableProperty( this->setChangeAvailableAsChangeFinished(true); auto* layoutLocal = new QHBoxLayout; - layoutLocal->setMargin(pqPropertiesPanel::suggestedMargin()); + layoutLocal->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); layoutLocal->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->setLayout(layoutLocal); diff --git a/Qt/ApplicationComponents/pqColorAnnotationsWidget.cxx b/Qt/ApplicationComponents/pqColorAnnotationsWidget.cxx index df78e888a..8e99a70f7 100644 --- a/Qt/ApplicationComponents/pqColorAnnotationsWidget.cxx +++ b/Qt/ApplicationComponents/pqColorAnnotationsWidget.cxx @@ -218,10 +218,10 @@ public: { this->SetCurrentPresetName(""); this->Ui.setupUi(self); - this->Ui.gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); this->Ui.gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); - this->Ui.verticalLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.verticalLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.verticalLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); this->Model = new pqAnnotationsModel(self); diff --git a/Qt/ApplicationComponents/pqColorEditorPropertyWidget.cxx b/Qt/ApplicationComponents/pqColorEditorPropertyWidget.cxx index 8229bd33c..1ba99001c 100644 --- a/Qt/ApplicationComponents/pqColorEditorPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqColorEditorPropertyWidget.cxx @@ -62,7 +62,7 @@ pqColorEditorPropertyWidget::pqColorEditorPropertyWidget(vtkSMProxy* smProxy, QW Ui::ColorEditorPropertyWidget& Ui = this->Internals->Ui; Ui.setupUi(this); - Ui.gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + Ui.gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); Ui.gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); Ui.gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); diff --git a/Qt/ApplicationComponents/pqColorMapEditor.cxx b/Qt/ApplicationComponents/pqColorMapEditor.cxx index f3026bec2..8b518d781 100644 --- a/Qt/ApplicationComponents/pqColorMapEditor.cxx +++ b/Qt/ApplicationComponents/pqColorMapEditor.cxx @@ -79,7 +79,7 @@ public: this->Ui.setupUi(self); QVBoxLayout* vbox = new QVBoxLayout(this->Ui.PropertiesFrame); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(0); } diff --git a/Qt/ApplicationComponents/pqColorOpacityEditorWidget.cxx b/Qt/ApplicationComponents/pqColorOpacityEditorWidget.cxx index a14d8bd01..b082339dd 100644 --- a/Qt/ApplicationComponents/pqColorOpacityEditorWidget.cxx +++ b/Qt/ApplicationComponents/pqColorOpacityEditorWidget.cxx @@ -232,7 +232,7 @@ public: , SignalsBlocker(new pqSignalsBlocker(self)) { this->Ui.setupUi(self); - this->Ui.mainLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.mainLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Decorator = new pqColorOpacityEditorWidgetDecorator(nullptr, self); diff --git a/Qt/ApplicationComponents/pqColorPaletteSelectorWidget.cxx b/Qt/ApplicationComponents/pqColorPaletteSelectorWidget.cxx index abab44ca3..36d0a2adb 100644 --- a/Qt/ApplicationComponents/pqColorPaletteSelectorWidget.cxx +++ b/Qt/ApplicationComponents/pqColorPaletteSelectorWidget.cxx @@ -55,7 +55,7 @@ pqColorPaletteSelectorWidget::pqColorPaletteSelectorWidget( QVBoxLayout* vbox = new QVBoxLayout(this); vbox->setSpacing(0); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vtkSMSessionProxyManager* pxm = smproxy->GetSessionProxyManager(); vtkSMProxyDefinitionManager* pdmgr = pxm->GetProxyDefinitionManager(); @@ -91,7 +91,7 @@ pqColorPaletteSelectorWidget::pqColorPaletteSelectorWidget( if (std::find(mainPalettes.cbegin(), mainPalettes.cend(), iter->GetProxyName()) == mainPalettes.cend()) { - cbbox->addItem(prototype->GetXMLLabel(), prototype->GetXMLName()); + cbbox->addItem(prototype->GetXMLLabel(), QString(prototype->GetXMLName())); } } diff --git a/Qt/ApplicationComponents/pqColorSelectorPropertyWidget.cxx b/Qt/ApplicationComponents/pqColorSelectorPropertyWidget.cxx index 14b743090..448fe3c87 100644 --- a/Qt/ApplicationComponents/pqColorSelectorPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqColorSelectorPropertyWidget.cxx @@ -50,7 +50,7 @@ pqColorSelectorPropertyWidget::pqColorSelectorPropertyWidget( QVBoxLayout* vbox = new QVBoxLayout(this); vbox->setSpacing(0); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); if (useDocumentationForLabels) { diff --git a/Qt/ApplicationComponents/pqCommandButtonPropertyWidget.cxx b/Qt/ApplicationComponents/pqCommandButtonPropertyWidget.cxx index 12d36484b..eba09f8ab 100644 --- a/Qt/ApplicationComponents/pqCommandButtonPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqCommandButtonPropertyWidget.cxx @@ -48,7 +48,7 @@ pqCommandButtonPropertyWidget::pqCommandButtonPropertyWidget( { QVBoxLayout* l = new QVBoxLayout; l->setSpacing(0); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); QPushButton* button = new QPushButton(proxyProperty->GetXMLLabel()); connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked())); diff --git a/Qt/ApplicationComponents/pqCommandLineOptionsBehavior.cxx b/Qt/ApplicationComponents/pqCommandLineOptionsBehavior.cxx index 8801d1477..461da4bcf 100644 --- a/Qt/ApplicationComponents/pqCommandLineOptionsBehavior.cxx +++ b/Qt/ApplicationComponents/pqCommandLineOptionsBehavior.cxx @@ -67,7 +67,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include +#include #include #include @@ -152,7 +152,7 @@ void pqCommandLineOptionsBehavior::processServerConnection() if (serverURL.indexOf('|') != -1) { // We should connect multiple times - const QStringList urls = serverURL.split(QRegExp("\\|"), PV_QT_SKIP_EMPTY_PARTS); + const QStringList urls = serverURL.split(QRegularExpression("\\|"), PV_QT_SKIP_EMPTY_PARTS); for (const QString& url : urls) { if (!pqServerConnectReaction::connectToServer(pqServerResource(url), false)) diff --git a/Qt/ApplicationComponents/pqCustomizeShortcutsDialog.cxx b/Qt/ApplicationComponents/pqCustomizeShortcutsDialog.cxx index 74dfea1ec..f6cfa8f59 100644 --- a/Qt/ApplicationComponents/pqCustomizeShortcutsDialog.cxx +++ b/Qt/ApplicationComponents/pqCustomizeShortcutsDialog.cxx @@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include namespace { @@ -432,9 +433,9 @@ pqCustomizeShortcutsDialog::pqCustomizeShortcutsDialog(QWidget* parentObject) connect(this->Internals->Ui.recordButton, &QAbstractButton::clicked, this, [this]() { this->Internals->Ui.keySequenceEdit->setFocus(); }); connect(this->Internals->Ui.searchBox, &pqSearchBox::textChanged, this, [this]() { - QRegExp regex(this->Internals->Ui.searchBox->text(), Qt::CaseInsensitive); + QRegularExpression regex(this->Internals->Ui.searchBox->text(), QRegularExpression::CaseInsensitiveOption); - this->Internals->FilterModel->setFilterRegExp(regex); + this->Internals->FilterModel->setFilterRegularExpression(regex); this->Internals->Ui.treeView->expandAll(); }); this->setWindowTitle("Customize Shortcuts"); diff --git a/Qt/ApplicationComponents/pqDoubleRangeSliderPropertyWidget.cxx b/Qt/ApplicationComponents/pqDoubleRangeSliderPropertyWidget.cxx index 9f7d66617..307ad5a68 100644 --- a/Qt/ApplicationComponents/pqDoubleRangeSliderPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqDoubleRangeSliderPropertyWidget.cxx @@ -64,7 +64,7 @@ pqDoubleRangeSliderPropertyWidget::pqDoubleRangeSliderPropertyWidget( Ui::DoubleRangeSliderPropertyWidget& ui = this->Internals->Ui; ui.setupUi(this); - ui.gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + ui.gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); ui.gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); ui.gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); diff --git a/Qt/ApplicationComponents/pqEqualizerPropertyWidget.cxx b/Qt/ApplicationComponents/pqEqualizerPropertyWidget.cxx index 584f79db1..50ce1160a 100644 --- a/Qt/ApplicationComponents/pqEqualizerPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqEqualizerPropertyWidget.cxx @@ -66,7 +66,7 @@ pqEqualizerPropertyWidget::pqEqualizerPropertyWidget( // Setup GUI QGridLayout* layout = new QGridLayout(this); - layout->setMargin(pqPropertiesPanel::suggestedMargin()); + layout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); layout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); layout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); diff --git a/Qt/ApplicationComponents/pqFileNamePropertyWidget.cxx b/Qt/ApplicationComponents/pqFileNamePropertyWidget.cxx index 9acba56a2..5b4b344cb 100644 --- a/Qt/ApplicationComponents/pqFileNamePropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqFileNamePropertyWidget.cxx @@ -73,7 +73,7 @@ pqFileNamePropertyWidget::pqFileNamePropertyWidget( } QHBoxLayout* layoutLocal = new QHBoxLayout; - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); layoutLocal->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); QLineEdit* lineEdit = new pqLineEdit(this); diff --git a/Qt/ApplicationComponents/pqFindDataWidget.cxx b/Qt/ApplicationComponents/pqFindDataWidget.cxx index 1f4ec82d1..3f310489e 100644 --- a/Qt/ApplicationComponents/pqFindDataWidget.cxx +++ b/Qt/ApplicationComponents/pqFindDataWidget.cxx @@ -272,7 +272,7 @@ pqFindDataWidget::pqFindDataWidget(QWidget* parentObject) { auto& internals = (*this->Internals); internals.Ui.setupUi(this); - internals.Ui.verticalLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + internals.Ui.verticalLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); internals.Ui.verticalLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); // change the findData button palette so it is green when it is enabled. diff --git a/Qt/ApplicationComponents/pqFontPropertyWidget.cxx b/Qt/ApplicationComponents/pqFontPropertyWidget.cxx index 156e39160..5481e1d2d 100644 --- a/Qt/ApplicationComponents/pqFontPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqFontPropertyWidget.cxx @@ -50,7 +50,7 @@ public: pqInternals(pqFontPropertyWidget* self) { this->Ui.setupUi(self); - this->Ui.mainLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.mainLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.mainLayout->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); } diff --git a/Qt/ApplicationComponents/pqListPropertyWidget.cxx b/Qt/ApplicationComponents/pqListPropertyWidget.cxx index df1f8d616..c42d70e55 100644 --- a/Qt/ApplicationComponents/pqListPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqListPropertyWidget.cxx @@ -94,7 +94,7 @@ pqListPropertyWidget::pqListPropertyWidget( this->TableWidget->setHorizontalHeaderLabels(headerLabels); QHBoxLayout* hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(0); hbox->addWidget(this->TableWidget); diff --git a/Qt/ApplicationComponents/pqLoadDataReaction.cxx b/Qt/ApplicationComponents/pqLoadDataReaction.cxx index b9d348c62..b056c0888 100644 --- a/Qt/ApplicationComponents/pqLoadDataReaction.cxx +++ b/Qt/ApplicationComponents/pqLoadDataReaction.cxx @@ -55,6 +55,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/Qt/ApplicationComponents/pqLoadDataReaction.h b/Qt/ApplicationComponents/pqLoadDataReaction.h index 5a3f81fcc..0ac81f1ee 100644 --- a/Qt/ApplicationComponents/pqLoadDataReaction.h +++ b/Qt/ApplicationComponents/pqLoadDataReaction.h @@ -35,8 +35,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqReaction.h" #include +#include -class QStringList; class pqPipelineSource; class pqServer; class vtkSMReaderFactory; diff --git a/Qt/ApplicationComponents/pqMoleculePropertyWidget.cxx b/Qt/ApplicationComponents/pqMoleculePropertyWidget.cxx index 1f788de5f..c8a85d436 100644 --- a/Qt/ApplicationComponents/pqMoleculePropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqMoleculePropertyWidget.cxx @@ -57,7 +57,7 @@ public: , showAdvancedProperties(false) { this->Ui.setupUi(self); - this->Ui.wdgLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.wdgLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.wdgLayout->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); } }; diff --git a/Qt/ApplicationComponents/pqParaViewBehaviors.cxx b/Qt/ApplicationComponents/pqParaViewBehaviors.cxx index 70ca91c4c..51d56e098 100644 --- a/Qt/ApplicationComponents/pqParaViewBehaviors.cxx +++ b/Qt/ApplicationComponents/pqParaViewBehaviors.cxx @@ -312,7 +312,7 @@ pqParaViewBehaviors::pqParaViewBehaviors(QMainWindow* mainWindow, QObject* paren QShortcut* ctrlSpace = new QShortcut(Qt::CTRL + Qt::Key_Space, mainWindow); QObject::connect( ctrlSpace, SIGNAL(activated()), pqApplicationCore::instance(), SLOT(quickLaunch())); - QShortcut* ctrlShiftSpace = new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Space, mainWindow); + QShortcut* ctrlShiftSpace = new QShortcut(QKeySequence(Qt::CTRL,Qt::SHIFT,Qt::Key_Space), mainWindow); QObject::connect( ctrlShiftSpace, SIGNAL(activated()), pqApplicationCore::instance(), SLOT(quickLaunch())); QShortcut* altSpace = new QShortcut(Qt::ALT + Qt::Key_Space, mainWindow); diff --git a/Qt/ApplicationComponents/pqPauseLiveSourcePropertyWidget.cxx b/Qt/ApplicationComponents/pqPauseLiveSourcePropertyWidget.cxx index 7b47c2331..b9a527dd9 100644 --- a/Qt/ApplicationComponents/pqPauseLiveSourcePropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqPauseLiveSourcePropertyWidget.cxx @@ -43,7 +43,7 @@ pqPauseLiveSourcePropertyWidget::pqPauseLiveSourcePropertyWidget( { auto l = new QVBoxLayout(this); l->setSpacing(0); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); auto button = new QPushButton(smproperty->GetXMLLabel()); button->setCheckable(true); diff --git a/Qt/ApplicationComponents/pqPluginActionGroupBehavior.cxx b/Qt/ApplicationComponents/pqPluginActionGroupBehavior.cxx index 42d0df52e..1ae9d9edd 100644 --- a/Qt/ApplicationComponents/pqPluginActionGroupBehavior.cxx +++ b/Qt/ApplicationComponents/pqPluginActionGroupBehavior.cxx @@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include namespace { diff --git a/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.cxx b/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.cxx index f65f05bc1..0fa92649c 100644 --- a/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.cxx @@ -220,7 +220,7 @@ private: case COMMA_SEPARATED_VALUES: { auto vbox = new QVBoxLayout(this); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); auto edit = new pqLineEdit(this); this->LineEdits.push_back(edit); @@ -234,7 +234,7 @@ private: case RANGE_PAIR: { auto hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); auto editMin = new pqLineEdit(this); @@ -259,7 +259,7 @@ private: case LOCATION_WITH_TOLERANCE: { auto grid = new QGridLayout(this); - grid->setMargin(0); + grid->setContentsMargins(0,0,0,0); grid->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); grid->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); auto editX = new pqDoubleLineEdit(this); @@ -332,7 +332,7 @@ public: this->Operator->setSizeAdjustPolicy(QComboBox::AdjustToContents); auto hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); hbox->addWidget(this->Term, 0, Qt::AlignTop); hbox->addWidget(this->Operator, 0, Qt::AlignTop); @@ -620,7 +620,7 @@ class pqSelectionQueryPropertyWidget::pqInternals void insertQuery(int index, const QString& expr = QString()) { auto hbox = new QHBoxLayout(); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); auto wdg = new QueryWidgetType(this->Parent); @@ -704,7 +704,7 @@ public: : Parent(self) { auto vbox = new QVBoxLayout(self); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); } diff --git a/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.h b/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.h index 266c0dced..e992ef390 100644 --- a/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.h +++ b/Qt/ApplicationComponents/pqSelectionQueryPropertyWidget.h @@ -36,8 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqPropertyWidget.h" #include // for QScopedPointer. +#include -class QStringList; /** * @class pqSelectionQueryPropertyWidget diff --git a/Qt/ApplicationComponents/pqSeriesEditorPropertyWidget.cxx b/Qt/ApplicationComponents/pqSeriesEditorPropertyWidget.cxx index 01b7b5267..be270a60e 100644 --- a/Qt/ApplicationComponents/pqSeriesEditorPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqSeriesEditorPropertyWidget.cxx @@ -128,7 +128,7 @@ public: vtkSMPropertyHelper(lutProxy, "IndexedLookup").Set(1); this->Ui.setupUi(self); - this->Ui.wdgLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.wdgLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.wdgLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->Ui.wdgLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); diff --git a/Qt/ApplicationComponents/pqStandardViewFrameActionsImplementation.cxx b/Qt/ApplicationComponents/pqStandardViewFrameActionsImplementation.cxx index fe9a17ffb..359e88c71 100644 --- a/Qt/ApplicationComponents/pqStandardViewFrameActionsImplementation.cxx +++ b/Qt/ApplicationComponents/pqStandardViewFrameActionsImplementation.cxx @@ -76,6 +76,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include diff --git a/Qt/ApplicationComponents/pqTextLocationWidget.cxx b/Qt/ApplicationComponents/pqTextLocationWidget.cxx index eab16a74f..732b18174 100644 --- a/Qt/ApplicationComponents/pqTextLocationWidget.cxx +++ b/Qt/ApplicationComponents/pqTextLocationWidget.cxx @@ -50,7 +50,7 @@ public: pqInternals(pqTextLocationWidget* self) { this->Ui.setupUi(self); - this->Ui.gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.gridLayout->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); // Add location enum values to the buttons diff --git a/Qt/ApplicationComponents/pqViewResolutionPropertyWidget.cxx b/Qt/ApplicationComponents/pqViewResolutionPropertyWidget.cxx index bee6a033e..47314b3ab 100644 --- a/Qt/ApplicationComponents/pqViewResolutionPropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqViewResolutionPropertyWidget.cxx @@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include class pqViewResolutionPropertyWidget::pqInternals { diff --git a/Qt/ApplicationComponents/pqViewTypePropertyWidget.cxx b/Qt/ApplicationComponents/pqViewTypePropertyWidget.cxx index bd4efc988..e14fb95ca 100644 --- a/Qt/ApplicationComponents/pqViewTypePropertyWidget.cxx +++ b/Qt/ApplicationComponents/pqViewTypePropertyWidget.cxx @@ -49,7 +49,7 @@ pqViewTypePropertyWidget::pqViewTypePropertyWidget( this->ComboBox = new QComboBox(this); this->ComboBox->setObjectName("ComboBox"); QVBoxLayout* vbox = new QVBoxLayout(this); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->addWidget(this->ComboBox); this->ComboBox->addItem("None", QVariant("None")); diff --git a/Qt/Components/CMakeLists.txt b/Qt/Components/CMakeLists.txt index 1c4b9950a..4ccf4f75c 100644 --- a/Qt/Components/CMakeLists.txt +++ b/Qt/Components/CMakeLists.txt @@ -254,7 +254,7 @@ set(resource_files Resources/pqComponents.qrc) vtk_module_find_package( - PACKAGE Qt5 + PACKAGE Qt${VTK_QT_VERSION} COMPONENTS Network Widgets) source_group("Resources" FILES @@ -273,6 +273,6 @@ vtk_module_add_module(ParaView::pqComponents ${resource_files}) vtk_module_link(ParaView::pqComponents PRIVATE - Qt5::Network - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Network + Qt${VTK_QT_VERSION}::Widgets) vtk_module_definitions(ParaView::pqComponents PRIVATE QT_NO_KEYWORDS) diff --git a/Qt/Components/Resources/UI/pqAboutDialog.ui b/Qt/Components/Resources/UI/pqAboutDialog.ui index 387cfe4a7..cbea4be71 100644 --- a/Qt/Components/Resources/UI/pqAboutDialog.ui +++ b/Qt/Components/Resources/UI/pqAboutDialog.ui @@ -1,7 +1,14 @@ + + + pqAboutDialog + QDialog +
pqAboutDialog.h
+
+
pqAboutDialog - + 0 diff --git a/Qt/Components/Resources/UI/pqAboutDialog.ui b/Qt/Components/Resources/UI/pqAboutDialog.ui diff --git a/Qt/Components/Testing/Cxx/CMakeLists.txt b/Qt/Components/Testing/Cxx/CMakeLists.txt index 73430cd93..720041a1c 100644 --- a/Qt/Components/Testing/Cxx/CMakeLists.txt +++ b/Qt/Components/Testing/Cxx/CMakeLists.txt @@ -1,14 +1,14 @@ -find_package(Qt5 REQUIRED COMPONENTS Core Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Core Widgets) set(CMAKE_AUTOMOC 1) vtk_module_test_executable(pqPipelineApp FilteredPipelineBrowserApp.cxx FilteredPipelineBrowserApp.h) -target_link_libraries(pqPipelineApp PRIVATE Qt5::Core Qt5::Widgets) +target_link_libraries(pqPipelineApp PRIVATE Qt${VTK_QT_VERSION}::Core Qt${VTK_QT_VERSION}::Widgets) #ADD_TEST(pqPipelineApp "${EXECUTABLE_OUTPUT_PATH}/pqPipelineApp" -dr "--test-directory=${PARAVIEW_TEST_DIR}") set(tests_sources TabbedMultiViewWidgetFilteringApp.cxx) create_test_sourcelist(tests pqComponentsTest.cxx ${tests_sources}) vtk_module_test_executable(pqComponentsTest ${tests}) -target_link_libraries(pqComponentsTest PRIVATE Qt5::Core Qt5::Widgets) +target_link_libraries(pqComponentsTest PRIVATE Qt${VTK_QT_VERSION}::Core Qt${VTK_QT_VERSION}::Widgets) foreach(test_file IN LISTS tests_sources) get_filename_component(test "${test_file}" NAME_WE) diff --git a/Qt/Components/pqAnimationViewWidget.cxx b/Qt/Components/pqAnimationViewWidget.cxx index 1efa71732..d8f29afde 100644 --- a/Qt/Components/pqAnimationViewWidget.cxx +++ b/Qt/Components/pqAnimationViewWidget.cxx @@ -274,12 +274,12 @@ pqAnimationViewWidget::pqAnimationViewWidget(QWidget* _parent) { this->Internal = new pqAnimationViewWidget::pqInternal(); QVBoxLayout* vboxlayout = new QVBoxLayout(this); - vboxlayout->setMargin(2); + vboxlayout->setContentsMargins(2,2,2,2); vboxlayout->setSpacing(2); QHBoxLayout* hboxlayout = new QHBoxLayout; vboxlayout->addLayout(hboxlayout); - hboxlayout->setMargin(0); + hboxlayout->setContentsMargins(0,0,0,0); hboxlayout->setSpacing(2); hboxlayout->addWidget(new QLabel("Mode:", this)); @@ -343,7 +343,7 @@ pqAnimationViewWidget::pqAnimationViewWidget(QWidget* _parent) this->Internal->AnimationWidget->animationModel()->setTimePrecision( vtkPVGeneralSettings::GetInstance()->GetAnimationTimePrecision()); this->Internal->AnimationWidget->animationModel()->setTimeNotation( - vtkPVGeneralSettings::GetInstance()->GetAnimationTimeNotation()); + QChar(vtkPVGeneralSettings::GetInstance()->GetAnimationTimeNotation())); pqCoreUtilities::connect(vtkPVGeneralSettings::GetInstance(), vtkCommand::ModifiedEvent, this, SLOT(generalSettingsChanged())); @@ -359,7 +359,7 @@ pqAnimationViewWidget::pqAnimationViewWidget(QWidget* _parent) this->Internal->CreateSource->setSizeAdjustPolicy(QComboBox::AdjustToContents); this->Internal->CreateProperty->setSizeAdjustPolicy(QComboBox::AdjustToContents); QHBoxLayout* l = new QHBoxLayout(w); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); l->addSpacing(6); l->addWidget(this->Internal->CreateSource); l->addWidget(this->Internal->CreateProperty); @@ -1134,7 +1134,7 @@ void pqAnimationViewWidget::generalSettingsChanged() this->Internal->AnimationWidget->animationModel()->setTimePrecision( vtkPVGeneralSettings::GetInstance()->GetAnimationTimePrecision()); this->Internal->AnimationWidget->animationModel()->setTimeNotation( - vtkPVGeneralSettings::GetInstance()->GetAnimationTimeNotation()); + QChar(vtkPVGeneralSettings::GetInstance()->GetAnimationTimeNotation())); } //----------------------------------------------------------------------------- diff --git a/Qt/Components/pqArrayListWidget.cxx b/Qt/Components/pqArrayListWidget.cxx index 33a6e7202..e4aab913f 100644 --- a/Qt/Components/pqArrayListWidget.cxx +++ b/Qt/Components/pqArrayListWidget.cxx @@ -122,7 +122,7 @@ pqArrayListWidget::pqArrayListWidget(QWidget* parent) auto lay = new QVBoxLayout(this); this->TableView = new pqExpandableTableView(this); lay->addWidget(this->TableView); - lay->setMargin(0); + lay->setContentsMargins(0,0,0,0); lay->setSpacing(2); pqHeaderView* myheader = new pqHeaderView(Qt::Horizontal, this->TableView); diff --git a/Qt/Components/pqArraySelectorPropertyWidget.cxx b/Qt/Components/pqArraySelectorPropertyWidget.cxx index 94251e7ff..3da5f55c0 100644 --- a/Qt/Components/pqArraySelectorPropertyWidget.cxx +++ b/Qt/Components/pqArraySelectorPropertyWidget.cxx @@ -239,7 +239,7 @@ pqArraySelectorPropertyWidget::pqArraySelectorPropertyWidget( auto l = new QVBoxLayout(this); l->setSpacing(0); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); auto combobox = new QComboBox(this); combobox->setObjectName("ComboBox"); diff --git a/Qt/Components/pqArrayStatusPropertyWidget.cxx b/Qt/Components/pqArrayStatusPropertyWidget.cxx index 4958265a0..d5904de1d 100644 --- a/Qt/Components/pqArrayStatusPropertyWidget.cxx +++ b/Qt/Components/pqArrayStatusPropertyWidget.cxx @@ -136,7 +136,7 @@ pqArrayStatusPropertyWidget::pqArrayStatusPropertyWidget( QHBoxLayout* hbox = new QHBoxLayout(this); hbox->addWidget(selectorWidget); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(4); for (unsigned int cc = 0; cc < smgroup->GetNumberOfProperties(); cc++) @@ -210,7 +210,7 @@ pqArrayStatusPropertyWidget::pqArrayStatusPropertyWidget( QHBoxLayout* hbox = new QHBoxLayout(this); hbox->addWidget(selectorWidget); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(4); const char* property_name = smproxy->GetPropertyName(smproperty); diff --git a/Qt/Components/pqCameraKeyFrameWidget.cxx b/Qt/Components/pqCameraKeyFrameWidget.cxx index d5a635a10..d3e043045 100644 --- a/Qt/Components/pqCameraKeyFrameWidget.cxx +++ b/Qt/Components/pqCameraKeyFrameWidget.cxx @@ -197,7 +197,7 @@ pqCameraKeyFrameWidget::pqCameraKeyFrameWidget(QWidget* parentObject) this->Internal->PSplineWidget->filterWidgets(); (new QVBoxLayout(this->Internal->positionContainer))->addWidget(this->Internal->PSplineWidget); - this->Internal->positionContainer->layout()->setMargin(0); + this->Internal->positionContainer->layout()->setContentsMargins(0,0,0,0); this->Internal->FSplineProxy.TakeReference(pxm->NewProxy("parametric_functions", "Spline")); this->Internal->PSplineProxy->SetLocation(vtkPVSession::CLIENT); @@ -210,7 +210,7 @@ pqCameraKeyFrameWidget::pqCameraKeyFrameWidget(QWidget* parentObject) this->Internal->FSplineWidget->filterWidgets(); (new QVBoxLayout(this->Internal->focusContainer))->addWidget(this->Internal->FSplineWidget); - this->Internal->focusContainer->layout()->setMargin(0); + this->Internal->focusContainer->layout()->setContentsMargins(0,0,0,0); } //----------------------------------------------------------------------------- diff --git a/Qt/Components/pqComboBoxDomain.cxx b/Qt/Components/pqComboBoxDomain.cxx index bde1fc79d..d6091d01d 100644 --- a/Qt/Components/pqComboBoxDomain.cxx +++ b/Qt/Components/pqComboBoxDomain.cxx @@ -264,15 +264,15 @@ void pqComboBoxDomain::internalDomainChanged() QList proxies = pqSMAdaptor::getProxyPropertyDomain(this->Internal->Property); Q_FOREACH (vtkSMProxy* pxy, proxies) { - texts.append(pxy->GetXMLLabel()); - data.append(pxy->GetXMLLabel()); + texts.append(QString(pxy->GetXMLLabel())); + data.append(QString(pxy->GetXMLLabel())); infos.append(QString()); icons.append(QIcon()); } pqSMProxy cur_value = pqSMAdaptor::getProxyProperty(this->Internal->Property); if (cur_value) { - cur_property_value = cur_value->GetXMLLabel(); + cur_property_value = QString(cur_value->GetXMLLabel()); } } @@ -350,7 +350,7 @@ void pqComboBoxDomain::internalDomainChanged() pqSMProxy cur_value = pqSMAdaptor::getProxyProperty(this->Internal->Property); if (cur_value) { - cur_property_value = cur_value->GetXMLLabel(); + cur_property_value = QString(cur_value->GetXMLLabel()); } } break; diff --git a/Qt/Components/pqCommandPropertyWidget.cxx b/Qt/Components/pqCommandPropertyWidget.cxx index adbee9842..38a558450 100644 --- a/Qt/Components/pqCommandPropertyWidget.cxx +++ b/Qt/Components/pqCommandPropertyWidget.cxx @@ -54,7 +54,7 @@ pqCommandPropertyWidget::pqCommandPropertyWidget( QObject::connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked())); QHBoxLayout* layoutLocal = new QHBoxLayout(this); - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); layoutLocal->addWidget(button); layoutLocal->addStretch(); this->setShowLabel(false); diff --git a/Qt/Components/pqComparativeCueWidget.cxx b/Qt/Components/pqComparativeCueWidget.cxx index c0842e0e5..bfbb616db 100644 --- a/Qt/Components/pqComparativeCueWidget.cxx +++ b/Qt/Components/pqComparativeCueWidget.cxx @@ -32,7 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqComparativeCueWidget.h" #include "ui_pqComparativeParameterRangeDialog.h" -#include +#include +#include #include "pqQtDeprecated.h" #include "pqUndoStack.h" @@ -249,10 +250,10 @@ void pqComparativeCueWidget::editRange() ui.multivalueHint->setVisible(csv); ui.mode->setVisible(ranges[0].rowCount() > 1 && ranges[0].columnCount() > 1); - QRegExp floatNum = QRegExp("[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?"); - QRegExp csvFloatNum = QRegExp(QString("%1(,%1)*").arg(floatNum.pattern())); - ui.minValue->setValidator(new QRegExpValidator(csv ? csvFloatNum : floatNum, ui.minValue)); - ui.maxValue->setValidator(new QRegExpValidator(csv ? csvFloatNum : floatNum, ui.maxValue)); + QRegularExpression floatNum = QRegularExpression("[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?"); + QRegularExpression csvFloatNum = QRegularExpression(QString("%1(,%1)*").arg(floatNum.pattern())); + ui.minValue->setValidator(new QRegularExpressionValidator(csv ? csvFloatNum : floatNum, ui.minValue)); + ui.maxValue->setValidator(new QRegularExpressionValidator(csv ? csvFloatNum : floatNum, ui.maxValue)); if (dialog.exec() != QDialog::Accepted) { diff --git a/Qt/Components/pqCustomFilterManager.h b/Qt/Components/pqCustomFilterManager.h index 0d5f2b722..6d2900aad 100644 --- a/Qt/Components/pqCustomFilterManager.h +++ b/Qt/Components/pqCustomFilterManager.h @@ -40,11 +40,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqComponentsModule.h" #include +#include class pqCustomFilterManagerForm; class pqCustomFilterManagerModel; class QItemSelection; -class QStringList; /** * \class pqCustomFilterManager diff --git a/Qt/Components/pqDataInformationWidget.cxx b/Qt/Components/pqDataInformationWidget.cxx index 0a0d3db55..971f25b27 100644 --- a/Qt/Components/pqDataInformationWidget.cxx +++ b/Qt/Components/pqDataInformationWidget.cxx @@ -117,7 +117,7 @@ pqDataInformationWidget::pqDataInformationWidget(QWidget* _parent /*=0*/) QVBoxLayout* _layout = new QVBoxLayout(this); if (_layout) { - _layout->setMargin(0); + _layout->setContentsMargins(0,0,0,0); _layout->addWidget(this->View); } diff --git a/Qt/Components/pqDisplayColorWidget.cxx b/Qt/Components/pqDisplayColorWidget.cxx index 3e0e50bc7..b36119de1 100644 --- a/Qt/Components/pqDisplayColorWidget.cxx +++ b/Qt/Components/pqDisplayColorWidget.cxx @@ -253,7 +253,7 @@ pqDisplayColorWidget::pqDisplayColorWidget(QWidget* parentObject) this->SolidColorIcon = new QIcon(":/pqWidgets/Icons/pqSolidColor.svg"); QHBoxLayout* hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->Variables = new QComboBox(this); diff --git a/Qt/Components/pqDisplayPanelPropertyWidget.cxx b/Qt/Components/pqDisplayPanelPropertyWidget.cxx index 55336fa31..8baf05a87 100644 --- a/Qt/Components/pqDisplayPanelPropertyWidget.cxx +++ b/Qt/Components/pqDisplayPanelPropertyWidget.cxx @@ -41,7 +41,7 @@ pqDisplayPanelPropertyWidget::pqDisplayPanelPropertyWidget( this->DisplayPanel = panel; QVBoxLayout* layoutLocal = new QVBoxLayout; - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); layoutLocal->addWidget(panel); setLayout(layoutLocal); } diff --git a/Qt/Components/pqDisplayRepresentationWidget.cxx b/Qt/Components/pqDisplayRepresentationWidget.cxx index 2992dc873..037e34f11 100644 --- a/Qt/Components/pqDisplayRepresentationWidget.cxx +++ b/Qt/Components/pqDisplayRepresentationWidget.cxx @@ -252,7 +252,7 @@ pqDisplayRepresentationPropertyWidget::pqDisplayRepresentationPropertyWidget( : pqPropertyWidget(smProxy, parentObject) { QVBoxLayout* layoutLocal = new QVBoxLayout; - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); this->Widget = new pqDisplayRepresentationWidget(this); layoutLocal->addWidget(this->Widget); setLayout(layoutLocal); diff --git a/Qt/Components/pqDoubleVectorPropertyWidget.cxx b/Qt/Components/pqDoubleVectorPropertyWidget.cxx index 050c218c0..2e001af3f 100644 --- a/Qt/Components/pqDoubleVectorPropertyWidget.cxx +++ b/Qt/Components/pqDoubleVectorPropertyWidget.cxx @@ -102,7 +102,7 @@ pqDoubleVectorPropertyWidget::pqDoubleVectorPropertyWidget( } QHBoxLayout* layoutLocal = new QHBoxLayout; - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); layoutLocal->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->setLayout(layoutLocal); diff --git a/Qt/Components/pqExpressionsWidget.cxx b/Qt/Components/pqExpressionsWidget.cxx index d45369ca7..1b7119797 100644 --- a/Qt/Components/pqExpressionsWidget.cxx +++ b/Qt/Components/pqExpressionsWidget.cxx @@ -49,7 +49,7 @@ pqExpressionsWidget::pqExpressionsWidget(QWidget* parent, const QString& groupNa , OneLiner(nullptr) { QGridLayout* grid = new QGridLayout(this); - grid->setMargin(0); + grid->setContentsMargins(0,0,0,0); grid->setSpacing(0); if (!groupName.isEmpty()) @@ -60,6 +60,10 @@ pqExpressionsWidget::pqExpressionsWidget(QWidget* parent, const QString& groupNa this->setLayout(grid); } +void pqExpressionsWidget::clear() { + lineEdit()->clear(); +} + void pqExpressionsWidget::setupButtons(const QString& groupName) { auto grid = dynamic_cast(this->layout()); diff --git a/Qt/Components/pqExpressionsWidget.h b/Qt/Components/pqExpressionsWidget.h index 94d502a20..b3bf78f5b 100644 --- a/Qt/Components/pqExpressionsWidget.h +++ b/Qt/Components/pqExpressionsWidget.h @@ -60,7 +60,7 @@ public: * Set buttons up for "groupName" expressions group. */ void setupButtons(const QString& groupName); - + void clear(); private: Q_DISABLE_COPY(pqExpressionsWidget) diff --git a/Qt/Components/pqFavoritesDialog.cxx b/Qt/Components/pqFavoritesDialog.cxx index d59aa5965..8bd7fa6ef 100644 --- a/Qt/Components/pqFavoritesDialog.cxx +++ b/Qt/Components/pqFavoritesDialog.cxx @@ -41,6 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include +#include // pqCore #include "pqApplicationCore.h" diff --git a/Qt/Components/pqFileChooserWidget.cxx b/Qt/Components/pqFileChooserWidget.cxx index 434418559..d8e05c2cb 100644 --- a/Qt/Components/pqFileChooserWidget.cxx +++ b/Qt/Components/pqFileChooserWidget.cxx @@ -51,7 +51,7 @@ pqFileChooserWidget::pqFileChooserWidget(QWidget* p) this->AcceptAnyFile = false; QHBoxLayout* l = new QHBoxLayout(this); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); l->setSpacing(2); this->LineEdit = new QLineEdit(this); this->LineEdit->setObjectName("FileLineEdit"); diff --git a/Qt/Components/pqFindDataCurrentSelectionFrame.cxx b/Qt/Components/pqFindDataCurrentSelectionFrame.cxx index 3c81e4f92..8a7a96353 100644 --- a/Qt/Components/pqFindDataCurrentSelectionFrame.cxx +++ b/Qt/Components/pqFindDataCurrentSelectionFrame.cxx @@ -152,7 +152,7 @@ public: pqApplicationCore::instance()->manager("SELECTION_MANAGER")); this->Ui.setupUi(self); - this->Ui.gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); this->Ui.gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); diff --git a/Qt/Components/pqFindDataSelectionDisplayFrame.cxx b/Qt/Components/pqFindDataSelectionDisplayFrame.cxx index 79b60a34e..7a250d094 100644 --- a/Qt/Components/pqFindDataSelectionDisplayFrame.cxx +++ b/Qt/Components/pqFindDataSelectionDisplayFrame.cxx @@ -79,7 +79,7 @@ public: this->PointLabelsMenu.setObjectName("PointLabelsMenu"); this->Ui.setupUi(self); - this->Ui.mainLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.mainLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.mainLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); this->Ui.cellLabelsButton->setMenu(&this->CellLabelsMenu); diff --git a/Qt/Components/pqImageTip.cxx b/Qt/Components/pqImageTip.cxx index 4626e2134..0213021e2 100644 --- a/Qt/Components/pqImageTip.cxx +++ b/Qt/Components/pqImageTip.cxx @@ -38,7 +38,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include #include @@ -138,7 +137,7 @@ bool pqImageTip::eventFilter(QObject*, QEvent* e) return false; } -void pqImageTip::enterEvent(QEvent*) +void pqImageTip::enterEvent(QEnterEvent *) { hide(); } @@ -153,7 +152,7 @@ void pqImageTip::paintEvent(QPaintEvent* ev) { QStylePainter p(this); QStyleOptionFrame opt; - opt.init(this); + this->initStyleOption(&opt); p.drawPrimitive(QStyle::PE_PanelTipLabel, opt); p.end(); diff --git a/Qt/Components/pqImageTip.h b/Qt/Components/pqImageTip.h index d44f201d4..e10416f43 100644 --- a/Qt/Components/pqImageTip.h +++ b/Qt/Components/pqImageTip.h @@ -60,7 +60,7 @@ private: QBasicTimer* const hideTimer; bool eventFilter(QObject*, QEvent*) override; - void enterEvent(QEvent*) override; + void enterEvent(QEnterEvent *) override; void timerEvent(QTimerEvent* e) override; void paintEvent(QPaintEvent* e) override; }; diff --git a/Qt/Components/pqIndexSelectionWidget.cxx b/Qt/Components/pqIndexSelectionWidget.cxx index 9cae037d8..f274cd3c4 100644 --- a/Qt/Components/pqIndexSelectionWidget.cxx +++ b/Qt/Components/pqIndexSelectionWidget.cxx @@ -116,7 +116,7 @@ Widgets::Widgets(pqIndexSelectionWidget* parent, const QString& key, int current this->slider->setProperty(keyPropertyName, key); this->edit->setProperty(keyPropertyName, key); - this->layout->setMargin(0); + this->layout->setContentsMargins(0,0,0,0); this->layout->addWidget(this->slider); this->layout->addWidget(this->edit); @@ -244,10 +244,10 @@ pqIndexSelectionWidget::pqIndexSelectionWidget( this->GroupBox->setAlignment(Qt::AlignLeft); - this->VBox->setMargin(pqPropertiesPanel::suggestedMargin()); + this->VBox->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->VBox->addWidget(this->GroupBox); - this->Form->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Form->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Form->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); this->Form->setLabelAlignment(Qt::AlignLeft); diff --git a/Qt/Components/pqInputSelectorWidget.cxx b/Qt/Components/pqInputSelectorWidget.cxx index 8e13dd686..4049a1bb9 100644 --- a/Qt/Components/pqInputSelectorWidget.cxx +++ b/Qt/Components/pqInputSelectorWidget.cxx @@ -96,7 +96,7 @@ pqInputSelectorWidget::pqInputSelectorWidget( this->setProperty(smproperty); auto l = new QVBoxLayout(this); - l->setMargin(pqPropertiesPanel::suggestedMargin()); + l->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); l->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); l->addWidget(this->ComboBox); diff --git a/Qt/Components/pqIntMaskPropertyWidget.cxx b/Qt/Components/pqIntMaskPropertyWidget.cxx index e91a98f6f..335cee248 100644 --- a/Qt/Components/pqIntMaskPropertyWidget.cxx +++ b/Qt/Components/pqIntMaskPropertyWidget.cxx @@ -51,7 +51,7 @@ public: : Mask(0) { QHBoxLayout* hbox = new QHBoxLayout(self); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); this->Button = new QPushButton(self); hbox->addWidget(this->Button); diff --git a/Qt/Components/pqIntRangeWidget.cxx b/Qt/Components/pqIntRangeWidget.cxx index b6f0e5d32..a8cf6289b 100644 --- a/Qt/Components/pqIntRangeWidget.cxx +++ b/Qt/Components/pqIntRangeWidget.cxx @@ -57,7 +57,7 @@ pqIntRangeWidget::pqIntRangeWidget(QWidget* p) this->DeferredValueEdited = false; QHBoxLayout* l = new QHBoxLayout(this); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); this->Slider = new QSlider(Qt::Horizontal, this); this->Slider->setRange(0, 1); l->addWidget(this->Slider); diff --git a/Qt/Components/pqIntVectorPropertyWidget.cxx b/Qt/Components/pqIntVectorPropertyWidget.cxx index d54c5a304..7f783371e 100644 --- a/Qt/Components/pqIntVectorPropertyWidget.cxx +++ b/Qt/Components/pqIntVectorPropertyWidget.cxx @@ -94,7 +94,7 @@ pqIntVectorPropertyWidget::pqIntVectorPropertyWidget( } QHBoxLayout* layoutLocal = new QHBoxLayout; - layoutLocal->setMargin(0); + layoutLocal->setContentsMargins(0,0,0,0); if (vtkSMBooleanDomain::SafeDownCast(domain)) { @@ -135,7 +135,7 @@ pqIntVectorPropertyWidget::pqIntVectorPropertyWidget( treeWidget->setMaximumRowCountBeforeScrolling(smproperty); QTreeWidgetItem* header = new QTreeWidgetItem(); - header->setData(0, Qt::DisplayRole, smproperty->GetXMLLabel()); + header->setData(0, Qt::DisplayRole, QString(smproperty->GetXMLLabel())); treeWidget->setHeaderItem(header); // helper makes it easier to select multiple entries. diff --git a/Qt/Components/pqKeyFrameEditor.cxx b/Qt/Components/pqKeyFrameEditor.cxx index a2f59503a..d31cf6b4d 100644 --- a/Qt/Components/pqKeyFrameEditor.cxx +++ b/Qt/Components/pqKeyFrameEditor.cxx @@ -103,7 +103,7 @@ public: , Child(child) { QVBoxLayout* l = new QVBoxLayout(this); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); l->addWidget(this->Child); this->Child->show(); } @@ -156,7 +156,7 @@ public: : CamWidget(&this->Widget) { QVBoxLayout* l = new QVBoxLayout(&this->Widget); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); l->addWidget(&this->CamWidget); } diff --git a/Qt/Components/pqLiveInsituManager.h b/Qt/Components/pqLiveInsituManager.h index 30cd9f310..60376566f 100644 --- a/Qt/Components/pqLiveInsituManager.h +++ b/Qt/Components/pqLiveInsituManager.h @@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define pqLiveInsituManager_h #include "pqComponentsModule.h" +#include #include #include diff --git a/Qt/Components/pqLogViewerDialog.cxx b/Qt/Components/pqLogViewerDialog.cxx index 0eb023826..49f8f7618 100644 --- a/Qt/Components/pqLogViewerDialog.cxx +++ b/Qt/Components/pqLogViewerDialog.cxx @@ -307,7 +307,7 @@ void pqLogViewerDialog::recordRefTimes() this->LogRecorderProxies[i]->GatherInformation(refTimeInfo); auto startingLog = QString::fromStdString(refTimeInfo->GetStartingLogs()); bool isRawLog; - auto parts = pqLogViewerWidget::extractLogParts(&startingLog, isRawLog); + auto parts = pqLogViewerWidget::extractLogParts(startingLog, isRawLog); this->RefTimes[LogLocation(this->LogRecorderProxies[i], j)] = parts[0].replace('s', '0').toDouble(); } diff --git a/Qt/Components/pqMultiViewWidget.cxx b/Qt/Components/pqMultiViewWidget.cxx index 7a1bd1b22..c8dca2e92 100644 --- a/Qt/Components/pqMultiViewWidget.cxx +++ b/Qt/Components/pqMultiViewWidget.cxx @@ -128,7 +128,7 @@ public: }); QVBoxLayout* slayout = new QVBoxLayout(self); - slayout->setMargin(0); + slayout->setContentsMargins(0,0,0,0); slayout->addWidget(this->Container); this->PopoutPlaceholder.reset(new QWidget()); @@ -907,7 +907,7 @@ bool pqMultiViewWidget::togglePopout() Qt::WindowCloseButtonHint)); internals.PopoutWindow->setObjectName("PopoutWindow"); auto l = new QVBoxLayout(internals.PopoutWindow.data()); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); internals.PopoutWindow->resize(this->size()); } diff --git a/Qt/Components/pqPipelineTimeKeyFrameEditor.cxx b/Qt/Components/pqPipelineTimeKeyFrameEditor.cxx index 6b8082312..a9a289cb4 100644 --- a/Qt/Components/pqPipelineTimeKeyFrameEditor.cxx +++ b/Qt/Components/pqPipelineTimeKeyFrameEditor.cxx @@ -73,7 +73,7 @@ pqPipelineTimeKeyFrameEditor::pqPipelineTimeKeyFrameEditor( this->Internal->Editor = new pqKeyFrameEditor(scene, cue, QString(), this->Internal->Ui.container); QHBoxLayout* l = new QHBoxLayout(this->Internal->Ui.container); - l->setMargin(0); + l->setContentsMargins(0,0,0,0); l->addWidget(this->Internal->Editor); connect(this, SIGNAL(accepted()), this, SLOT(writeKeyFrameData())); diff --git a/Qt/Components/pqPluginTreeWidgetEventPlayer.cxx b/Qt/Components/pqPluginTreeWidgetEventPlayer.cxx index 05f2db061..8c9a10929 100644 --- a/Qt/Components/pqPluginTreeWidgetEventPlayer.cxx +++ b/Qt/Components/pqPluginTreeWidgetEventPlayer.cxx @@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include //----------------------------------------------------------------------------- pqPluginTreeWidgetEventPlayer::pqPluginTreeWidgetEventPlayer(QObject* parentObject) diff --git a/Qt/Components/pqPopOutWidget.cxx b/Qt/Components/pqPopOutWidget.cxx index 858fb3af9..f4deccc77 100644 --- a/Qt/Components/pqPopOutWidget.cxx +++ b/Qt/Components/pqPopOutWidget.cxx @@ -76,7 +76,7 @@ pqPopOutWidget::pqPopOutWidget(QWidget* widgetToPopOut, const QString& dialogTit { this->Internals->Title = dialogTitle; this->Internals->Layout = new QHBoxLayout(this); - this->Internals->Layout->setMargin(0); + this->Internals->Layout->setContentsMargins(0,0,0,0); this->Internals->Layout->setSpacing(0); this->Internals->WidgetToPopOut = widgetToPopOut; this->Internals->Layout->addWidget(this->Internals->WidgetToPopOut); diff --git a/Qt/Components/pqPropertiesPanel.cxx b/Qt/Components/pqPropertiesPanel.cxx index 757b8d7e1..ed5a948d4 100644 --- a/Qt/Components/pqPropertiesPanel.cxx +++ b/Qt/Components/pqPropertiesPanel.cxx @@ -121,7 +121,7 @@ public: delete parentWdg->layout(); QVBoxLayout* layout = new QVBoxLayout(parentWdg); - layout->setMargin(0); + layout->setContentsMargins(0,0,0,0); layout->setSpacing(0); this->Panel->setObjectName("ProxyPanel"); this->Panel->setParent(parentWdg); diff --git a/Qt/Components/pqPropertyWidget.cxx b/Qt/Components/pqPropertyWidget.cxx index 9d8d4c146..4dffa6c5d 100644 --- a/Qt/Components/pqPropertyWidget.cxx +++ b/Qt/Components/pqPropertyWidget.cxx @@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vtkSMDomain.h" #include "vtkSMProperty.h" +#include + //----------------------------------------------------------------------------- pqPropertyWidget::pqPropertyWidget(vtkSMProxy* smProxy, QWidget* parentObject) : QFrame(parentObject) @@ -112,7 +114,7 @@ QString pqPropertyWidget::getTooltip(vtkSMProperty* smproperty) { QString doc = pqProxy::rstToHtml(smproperty->GetDocumentation()->GetDescription()).c_str(); doc = doc.trimmed(); - doc = doc.replace(QRegExp("\\s+"), " "); + doc = doc.replace(QRegularExpression("\\s+"), " "); return QString("

%1

").arg(doc); } return QString(); diff --git a/Qt/Components/pqProxiesWidget.cxx b/Qt/Components/pqProxiesWidget.cxx index 82bb44167..88d7b25ae 100644 --- a/Qt/Components/pqProxiesWidget.cxx +++ b/Qt/Components/pqProxiesWidget.cxx @@ -133,7 +133,7 @@ void pqProxiesWidget::updateLayout() internals.clearExpanders(); delete this->layout(); QVBoxLayout* vbox = new QVBoxLayout(this); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); // Don't add expander buttons if there's only 1 component and that components diff --git a/Qt/Components/pqProxyEditorPropertyWidget.cxx b/Qt/Components/pqProxyEditorPropertyWidget.cxx index f72610b50..c81513f84 100644 --- a/Qt/Components/pqProxyEditorPropertyWidget.cxx +++ b/Qt/Components/pqProxyEditorPropertyWidget.cxx @@ -71,7 +71,7 @@ pqProxyEditorPropertyWidget::pqProxyEditorPropertyWidget( } QHBoxLayout* hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); if (this->Checkbox) { diff --git a/Qt/Components/pqProxyPropertyWidget.cxx b/Qt/Components/pqProxyPropertyWidget.cxx index 54daa99c3..6c348829c 100644 --- a/Qt/Components/pqProxyPropertyWidget.cxx +++ b/Qt/Components/pqProxyPropertyWidget.cxx @@ -46,7 +46,7 @@ pqProxyPropertyWidget::pqProxyPropertyWidget( : pqPropertyWidget(smProxy, parentObject) { QVBoxLayout* vbox = new QVBoxLayout; - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(0); bool selection_input = diff --git a/Qt/Components/pqProxySelectionWidget.cxx b/Qt/Components/pqProxySelectionWidget.cxx index cbab05d8c..8b12c9e74 100644 --- a/Qt/Components/pqProxySelectionWidget.cxx +++ b/Qt/Components/pqProxySelectionWidget.cxx @@ -64,9 +64,9 @@ public: { this->Ui.setupUi(self); this->Ui.verticalLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); - this->Ui.verticalLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.verticalLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.horizontalLayout->setSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); - this->Ui.horizontalLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + this->Ui.horizontalLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); this->Ui.frameLayout->setSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); } diff --git a/Qt/Components/pqProxyWidget.cxx b/Qt/Components/pqProxyWidget.cxx index a3b722105..6f0adc74e 100644 --- a/Qt/Components/pqProxyWidget.cxx +++ b/Qt/Components/pqProxyWidget.cxx @@ -700,7 +700,7 @@ pqProxyWidget::pqProxyWidget(vtkSMProxy* smproxy, const QStringList& properties, this->connect(&internals.RequestUpdatePanel, SIGNAL(timeout()), SLOT(updatePanel())); QGridLayout* gridLayout = new QGridLayout(this); - gridLayout->setMargin(pqPropertiesPanel::suggestedMargin()); + gridLayout->setContentsMargins(pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin(),pqPropertiesPanel::suggestedMargin()); gridLayout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); gridLayout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); diff --git a/Qt/Components/pqServerLauncher.cxx b/Qt/Components/pqServerLauncher.cxx index e6fb5d542..9cd23a21e 100644 --- a/Qt/Components/pqServerLauncher.cxx +++ b/Qt/Components/pqServerLauncher.cxx @@ -66,6 +66,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/Qt/Components/pqSettingsDialog.cxx b/Qt/Components/pqSettingsDialog.cxx index 768a33c76..99c7b66c6 100644 --- a/Qt/Components/pqSettingsDialog.cxx +++ b/Qt/Components/pqSettingsDialog.cxx @@ -134,7 +134,7 @@ pqSettingsDialog::pqSettingsDialog( container->setContentsMargins(6, 0, 6, 0); QVBoxLayout* vbox = new QVBoxLayout(container); - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(0); pqProxyWidget* widget = new pqProxyWidget(proxy, container); diff --git a/Qt/Components/pqShaderReplacementsSelectorPropertyWidget.cxx b/Qt/Components/pqShaderReplacementsSelectorPropertyWidget.cxx index 33b7588b3..f90e3c781 100644 --- a/Qt/Components/pqShaderReplacementsSelectorPropertyWidget.cxx +++ b/Qt/Components/pqShaderReplacementsSelectorPropertyWidget.cxx @@ -78,7 +78,7 @@ pqShaderReplacementsSelectorPropertyWidget::pqShaderReplacementsSelectorProperty this->Internal = new pqInternal(vtkSMStringVectorProperty::SafeDownCast(smProperty)); QVBoxLayout* l = new QVBoxLayout; - l->setMargin(0); + l->setContentsMargins(0,0,0,0); QGridLayout* gridLayout = new QGridLayout; gridLayout->setColumnStretch(0, 0); diff --git a/Qt/Components/pqStringVectorPropertyWidget.cxx b/Qt/Components/pqStringVectorPropertyWidget.cxx index 44efe7560..903488705 100644 --- a/Qt/Components/pqStringVectorPropertyWidget.cxx +++ b/Qt/Components/pqStringVectorPropertyWidget.cxx @@ -77,7 +77,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include +#include #include #include #include @@ -159,7 +159,7 @@ pqStringVectorPropertyWidget::pqStringVectorPropertyWidget( domainIter->Delete(); QVBoxLayout* vbox = new QVBoxLayout; - vbox->setMargin(0); + vbox->setContentsMargins(0,0,0,0); vbox->setSpacing(0); if (fileListDomain) @@ -313,7 +313,7 @@ pqStringVectorPropertyWidget::pqStringVectorPropertyWidget( QWidget* w = new QWidget(this); QHBoxLayout* hbox = new QHBoxLayout(this); - hbox->setMargin(0); + hbox->setContentsMargins(0,0,0,0); hbox->setSpacing(0); QLabel* label = new QLabel(smProperty->GetXMLLabel(), w); hbox->addWidget(label); @@ -489,7 +489,7 @@ void pqStringVectorPropertyWidget::processFileChooserHints(vtkPVXMLElement* hint else { QStringList lextensions = - QString(extensions).split(QRegExp("\\s+"), PV_QT_SKIP_EMPTY_PARTS); + QString(extensions).split(QRegularExpression("\\s+"), PV_QT_SKIP_EMPTY_PARTS); supportedExtensions.push_back( QString("%1 (*.%2)").arg(file_description).arg(lextensions.join(" *."))); } diff --git a/Qt/Components/pqTabbedMultiViewWidget.cxx b/Qt/Components/pqTabbedMultiViewWidget.cxx index b1a2eec94..a371fa676 100644 --- a/Qt/Components/pqTabbedMultiViewWidget.cxx +++ b/Qt/Components/pqTabbedMultiViewWidget.cxx @@ -459,7 +459,7 @@ pqTabbedMultiViewWidget::pqTabbedMultiViewWidget(QWidget* parentObject) this, SLOT(contextMenuRequested(const QPoint&))); QGridLayout* glayout = new QGridLayout(this); - glayout->setMargin(0); + glayout->setContentsMargins(0,0,0,0); glayout->setSpacing(0); glayout->addWidget(this->Internals->TabWidget, 0, 0); @@ -544,7 +544,7 @@ void pqTabbedMultiViewWidget::toggleFullScreen() QGridLayout* glayout = new QGridLayout(fullScreenWindow); glayout->setSpacing(0); - glayout->setMargin(0); + glayout->setContentsMargins(0,0,0,0); glayout->addWidget(internals.TabWidget, 0, 0); fullScreenWindow->showFullScreen(); fullScreenWindow->show(); diff --git a/Qt/Components/pqTextureSelectorPropertyWidget.cxx b/Qt/Components/pqTextureSelectorPropertyWidget.cxx index d0b0a5e37..94f73c2f3 100644 --- a/Qt/Components/pqTextureSelectorPropertyWidget.cxx +++ b/Qt/Components/pqTextureSelectorPropertyWidget.cxx @@ -60,7 +60,7 @@ pqTextureSelectorPropertyWidget::pqTextureSelectorPropertyWidget( this->setToolTip("Select/Load texture to apply."); QVBoxLayout* l = new QVBoxLayout; - l->setMargin(0); + l->setContentsMargins(0,0,0,0); // Create the combobox selector and set its value auto* domain = smProperty->FindDomain(); diff --git a/Qt/Components/pqTransferFunction2DWidget.cxx b/Qt/Components/pqTransferFunction2DWidget.cxx index f5427eede..4a74ded94 100644 --- a/Qt/Components/pqTransferFunction2DWidget.cxx +++ b/Qt/Components/pqTransferFunction2DWidget.cxx @@ -88,7 +88,7 @@ public: this->Widget->setParent(editor); QVBoxLayout* layout = new QVBoxLayout(editor); - layout->setMargin(0); + layout->setContentsMargins(0,0,0,0); layout->addWidget(this->Widget); this->Chart->SetAutoSize(true); diff --git a/Qt/Components/pqTransferFunctionWidget.cxx b/Qt/Components/pqTransferFunctionWidget.cxx index 64958588a..1b1e5ee0e 100644 --- a/Qt/Components/pqTransferFunctionWidget.cxx +++ b/Qt/Components/pqTransferFunctionWidget.cxx @@ -246,7 +246,7 @@ public: this->Widget->setParent(editor); QVBoxLayout* layout = new QVBoxLayout(editor); - layout->setMargin(0); + layout->setContentsMargins(0,0,0,0); layout->addWidget(this->Widget); this->ChartXY->SetAutoAxes(false); diff --git a/Qt/Core/CMakeLists.txt b/Qt/Core/CMakeLists.txt index ae1b8bd36..dcaa7471d 100644 --- a/Qt/Core/CMakeLists.txt +++ b/Qt/Core/CMakeLists.txt @@ -166,7 +166,7 @@ if (PARAVIEW_USE_PYTHON) endif () set(qt_components - Widgets) + Widgets Core5Compat) if (PARAVIEW_USE_QTHELP) list(APPEND qt_components @@ -174,9 +174,9 @@ if (PARAVIEW_USE_QTHELP) endif () vtk_module_find_package( - PACKAGE Qt5 + PACKAGE Qt${VTK_QT_VERSION} COMPONENTS ${qt_components} - VERSION 5.12 + VERSION 6.2 FORWARD_VERSION_REQ MINOR) set(CMAKE_AUTOMOC 1) @@ -195,11 +195,11 @@ vtk_module_add_module(ParaView::pqCore HEADERS ${headers}) vtk_module_link(ParaView::pqCore PRIVATE - Qt5::Widgets) + Qt${VTK_QT_VERSION}::Widgets Qt${VTK_QT_VERSION}::Core5Compat) if (PARAVIEW_USE_QTHELP) vtk_module_link(ParaView::pqCore PRIVATE - Qt5::Help) + Qt${VTK_QT_VERSION}::Help) endif () vtk_module_definitions(ParaView::pqCore PRIVATE QT_NO_KEYWORDS) diff --git a/Qt/Core/Testing/Cxx/CMakeLists.txt b/Qt/Core/Testing/Cxx/CMakeLists.txt index 7518832d8..f75e7267c 100644 --- a/Qt/Core/Testing/Cxx/CMakeLists.txt +++ b/Qt/Core/Testing/Cxx/CMakeLists.txt @@ -1,7 +1,7 @@ -find_package(Qt5 REQUIRED COMPONENTS Core Widgets Test) +find_package(Qt${VTK_QT_VERSION} REQUIRED COMPONENTS Core Widgets Test) set(CMAKE_AUTOMOC 1) vtk_module_test_executable(pqCoreBasicApp BasicApp.cxx BasicApp.h) -target_link_libraries(pqCoreBasicApp PRIVATE Qt5::Core Qt5::Widgets) +target_link_libraries(pqCoreBasicApp PRIVATE Qt${VTK_QT_VERSION}::Core Qt${VTK_QT_VERSION}::Widgets) ExternalData_add_test("${_vtk_build_TEST_DATA_TARGET}" NAME pqCoreBasicApp COMMAND pqCoreBasicApp @@ -24,7 +24,7 @@ set(MocSources create_test_sourcelist(Tests pqCoreTest.cxx ${MyTests}) vtk_module_test_executable(pqCoreTest ${Tests}) -target_link_libraries(pqCoreTest PRIVATE Qt5::Core Qt5::Widgets Qt5::Test) +target_link_libraries(pqCoreTest PRIVATE Qt${VTK_QT_VERSION}::Core Qt${VTK_QT_VERSION}::Widgets Qt${VTK_QT_VERSION}::Test) foreach(test_file ${MyTests}) get_filename_component(test "${test_file}" NAME_WE) diff --git a/Qt/Core/Testing/Cxx/KeySequences.cxx b/Qt/Core/Testing/Cxx/KeySequences.cxx index c59c4b6c4..127ef21da 100644 --- a/Qt/Core/Testing/Cxx/KeySequences.cxx +++ b/Qt/Core/Testing/Cxx/KeySequences.cxx @@ -69,7 +69,7 @@ KeySequencesWidget::KeySequencesWidget(const std::string& label, const std::stri auto* hl = new QHBoxLayout(this); hl->addWidget(m_label); hl->addWidget(m_button); - hl->setMargin(1); + hl->setContentsMargins(1,1,1,1); m_shortcut = pqKeySequences::instance().addModalShortcut(shortcut, m_action, this); m_shortcut->setObjectName(label.c_str()); QObject::connect( @@ -203,7 +203,7 @@ void KeySequencesTester::basic() auto* widget = new QWidget(window); window->setCentralWidget(widget); auto* layout = new QVBoxLayout(widget); - layout->setMargin(1); + layout->setContentsMargins(1,1,1,1); layout->setSpacing(1); auto* w1 = new KeySequencesWidget("Thing 1", "1", QKeySequence(tr("Ctrl+A")), widget); diff --git a/Qt/Core/Testing/Python/CMakeLists.txt b/Qt/Core/Testing/Python/CMakeLists.txt index f7d6e6262..46f4b57fd 100644 --- a/Qt/Core/Testing/Python/CMakeLists.txt +++ b/Qt/Core/Testing/Python/CMakeLists.txt @@ -1,8 +1,8 @@ -find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets) +find_package(Qt${VTK_QT_VERSION} REQUIRED QUIET COMPONENTS Core Widgets) set(CMAKE_AUTOMOC 1) vtk_module_test_executable(pqFileDialogTest pqFileDialogTest.cxx pqFileDialogTest.h) -target_link_libraries(pqFileDialogTest LINK_PRIVATE Qt5::Core Qt5::Widgets) +target_link_libraries(pqFileDialogTest LINK_PRIVATE Qt${VTK_QT_VERSION}::Core Qt${VTK_QT_VERSION}::Widgets) add_test( NAME pqFileDialogTest diff --git a/Qt/Core/pqAnnotationsModel.cxx b/Qt/Core/pqAnnotationsModel.cxx index c00bd5df3..69b2a0dac 100644 --- a/Qt/Core/pqAnnotationsModel.cxx +++ b/Qt/Core/pqAnnotationsModel.cxx @@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "vtkSMStringListDomain.h" diff --git a/Qt/Core/pqApplicationCore.cxx b/Qt/Core/pqApplicationCore.cxx index b63cd8ae4..3388d884e 100644 --- a/Qt/Core/pqApplicationCore.cxx +++ b/Qt/Core/pqApplicationCore.cxx @@ -49,6 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include // ParaView includes. #include "pqAnimationScene.h" @@ -506,7 +507,7 @@ void pqApplicationCore::onStateSaved(vtkPVXMLElement* root) if (!QApplication::applicationName().isEmpty()) { // Change root element to match the application name. - QString valid_name = QApplication::applicationName().replace(QRegExp("\\W"), "_"); + QString valid_name = QApplication::applicationName().replace(QRegularExpression("\\W"), "_"); root->SetName(valid_name.toUtf8().data()); } Q_EMIT this->stateSaved(root); diff --git a/Qt/Core/pqApplicationCore.h b/Qt/Core/pqApplicationCore.h index d8d594fcb..784551dbd 100644 --- a/Qt/Core/pqApplicationCore.h +++ b/Qt/Core/pqApplicationCore.h @@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vtkSmartPointer.h" // for vtkSmartPointer #include #include +#include #include // for std::exception class pqInterfaceTracker; @@ -58,7 +59,6 @@ class pqTestUtility; class pqUndoStack; class QApplication; class QHelpEngine; -class QStringList; class vtkPVXMLElement; class vtkSMProxyLocator; class vtkSMStateLoader; diff --git a/Qt/Core/pqComparativeContextView.cxx b/Qt/Core/pqComparativeContextView.cxx index 8b05173b9..7b66cb9cc 100644 --- a/Qt/Core/pqComparativeContextView.cxx +++ b/Qt/Core/pqComparativeContextView.cxx @@ -206,7 +206,7 @@ void pqComparativeContextView::updateViewWidgets() QGridLayout* layout = new QGridLayout(wdg); layout->setHorizontalSpacing(vtkSMPropertyHelper(compView, "Spacing").GetAsInt(0)); layout->setVerticalSpacing(vtkSMPropertyHelper(compView, "Spacing").GetAsInt(1)); - layout->setMargin(0); + layout->setContentsMargins(0,0,0,0); for (int x = 0; x < dimensions[0]; ++x) { for (int y = 0; y < dimensions[1]; ++y) diff --git a/Qt/Core/pqComparativeRenderView.cxx b/Qt/Core/pqComparativeRenderView.cxx index 6500f0f8a..2fcc8deb0 100644 --- a/Qt/Core/pqComparativeRenderView.cxx +++ b/Qt/Core/pqComparativeRenderView.cxx @@ -194,7 +194,7 @@ void pqComparativeRenderView::updateViewWidgets(QWidget* container /*=nullptr*/) QGridLayout* layout = new QGridLayout(container); layout->setHorizontalSpacing(vtkSMPropertyHelper(compView, "Spacing").GetAsInt(0)); layout->setVerticalSpacing(vtkSMPropertyHelper(compView, "Spacing").GetAsInt(1)); - layout->setMargin(0); + layout->setContentsMargins(0,0,0,0); for (int x = 0; x < dimensions[0]; x++) { for (int y = 0; y < dimensions[1]; y++) diff --git a/Qt/Core/pqFileDialog.cxx b/Qt/Core/pqFileDialog.cxx index 715d97327..5d23d34e0 100644 --- a/Qt/Core/pqFileDialog.cxx +++ b/Qt/Core/pqFileDialog.cxx @@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include @@ -113,7 +114,7 @@ QStringList GetWildCardsFromFilter(const QString& filter) } // separated by spaces or semi-colons - QStringList fs = f.split(QRegExp("[\\s+;]"), PV_QT_SKIP_EMPTY_PARTS); + QStringList fs = f.split(QRegularExpression("[\\s+;]"), PV_QT_SKIP_EMPTY_PARTS); // add a *.ext.* for every *.ext we get to support file groups QStringList ret = fs; @@ -626,7 +627,7 @@ void pqFileDialog::RemoveDirectoryFromFavorites(QString const& directory) //----------------------------------------------------------------------------- void pqFileDialog::FilterDirectoryFromFavorites(const QString& filter) { - this->Implementation->proxyFavoriteModel->setFilterRegExp(filter); + this->Implementation->proxyFavoriteModel->setFilterRegularExpression(filter); } //----------------------------------------------------------------------------- diff --git a/Qt/Core/pqFileDialogFilter.cxx b/Qt/Core/pqFileDialogFilter.cxx index 9acdb2bb1..4daeea158 100644 --- a/Qt/Core/pqFileDialogFilter.cxx +++ b/Qt/Core/pqFileDialogFilter.cxx @@ -36,6 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "pqFileDialogModel.h" @@ -75,7 +76,7 @@ void pqFileDialogFilter::setFilter(const QString& filter) f = f.trimmed(); // convert all spaces into | - f.replace(QRegExp("[\\s+;]+"), "|"); + f.replace(QRegularExpression ("[\\s+;]+"), "|"); QStringList strings = f.split("|"); QStringList extensions_list, filepatterns_list; diff --git a/Qt/Core/pqFileDialogModel.cxx b/Qt/Core/pqFileDialogModel.cxx index 95f6c31e6..f6b909f6f 100644 --- a/Qt/Core/pqFileDialogModel.cxx +++ b/Qt/Core/pqFileDialogModel.cxx @@ -150,12 +150,12 @@ public: QString modificationTimeString() const { return QLocale::system().toString( - QDateTime::fromTime_t(this->ModificationTime), QLocale::ShortFormat); + QDateTime::fromSecsSinceEpoch(this->ModificationTime), QLocale::ShortFormat); } qulonglong size() const { return static_cast(this->Size); } - QDateTime modificationTime() const { return QDateTime::fromTime_t(this->ModificationTime); } + QDateTime modificationTime() const { return QDateTime::fromSecsSinceEpoch(this->ModificationTime); } private: QString Label; diff --git a/Qt/Core/pqLogViewerWidget.cxx b/Qt/Core/pqLogViewerWidget.cxx index 644e70077..480e61b77 100644 --- a/Qt/Core/pqLogViewerWidget.cxx +++ b/Qt/Core/pqLogViewerWidget.cxx @@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include "pqCoreUtilities.h" @@ -71,7 +72,7 @@ public: this->Ui.details->setText(tr("")); } - void addLines(const QVector& lines) + void addLines(const QStringList& lines) { QRegularExpression scopeBegin(R"==(^\s*{ (?