diff --git a/CMake/SlicerBlockFindQtAndCheckVersion.cmake b/CMake/SlicerBlockFindQtAndCheckVersion.cmake index 7f15549af2186432ebdc4a0f5bf2e0a8f1da11c5..76e9cfb8d351f74b64672d55419dcc9d26b61c3d 100644 --- a/CMake/SlicerBlockFindQtAndCheckVersion.cmake +++ b/CMake/SlicerBlockFindQtAndCheckVersion.cmake @@ -18,11 +18,6 @@ # ################################################################################ -# -# The CMake code used to find Qt4 has been factored out into this CMake script so that -# it can be used in both Slicer/CMakelists.txt and Slicer/UseSlicer.cmake -# - macro(__SlicerBlockFindQtAndCheckVersion_find_qt) find_package(Qt5 COMPONENTS ${Slicer_REQUIRED_QT_MODULES}) set(_found_var Qt5_FOUND) @@ -63,7 +58,7 @@ foreach(v ${expected_defined_vars}) endif() endforeach() -# Check QT_QMAKE_EXECUTABLE provided by VTK +# Check Qt5_DIR provided by CTK set(extra_error_message) if(DEFINED CTK_Qt5_DIR AND NOT EXISTS "${CTK_Qt5_DIR}") message(FATAL_ERROR "error: You should probably re-configure CTK. CTK_Qt5_DIR points to a nonexistent directory: ${CTK_Qt5_DIR}") diff --git a/CMake/SlicerConfig.cmake.in b/CMake/SlicerConfig.cmake.in index d1b7fa4cc730c48c380bf074faa8efac00136533..d080eda7601c5effa81db54be0210ae1b4901a73 100644 --- a/CMake/SlicerConfig.cmake.in +++ b/CMake/SlicerConfig.cmake.in @@ -516,7 +516,7 @@ endforeach() @Slicer_EP_USE_SYSTEM_VARS_CONFIG@ # This block should be added after VTK and CTK are found. -# Indeed, it will check if both VTK_QT_QMAKE_EXECUTABLE and CTK_QT_QMAKE_EXECUTABLE are valid. +# It will check if CTK_Qt5_DIR is valid. include(${Slicer_CMAKE_DIR}/SlicerBlockFindQtAndCheckVersion.cmake) # -------------------------------------------------------------------------- diff --git a/CMake/SlicerDashboardDriverScript.cmake b/CMake/SlicerDashboardDriverScript.cmake index dda134ab1faafb59ac4e66bb3764a6e2235c833b..6ee0a1edeb1870f343c490102c055ad48709a4d7 100644 --- a/CMake/SlicerDashboardDriverScript.cmake +++ b/CMake/SlicerDashboardDriverScript.cmake @@ -168,12 +168,8 @@ set(variables ${expected_variables}) #----------------------------------------------------------------------------- # Handle Qt configuration #----------------------------------------------------------------------------- -if(NOT DEFINED QT_QMAKE_EXECUTABLE AND NOT DEFINED Qt5_DIR) - message(FATAL_ERROR "Either QT_QMAKE_EXECUTABLE (for Qt4) or Qt5_DIR (for Qt5) should be defined in top-level script") -endif() -if(DEFINED QT_QMAKE_EXECUTABLE) - set(QT_CACHE_ENTRY "QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}") - list(APPEND variables QT_QMAKE_EXECUTABLE) +if(NOT DEFINED Qt5_DIR) + message(FATAL_ERROR "Qt5_DIR should be defined in top-level script") endif() if(DEFINED Qt5_DIR) set(QT_CACHE_ENTRY "Qt5_DIR:PATH=${Qt5_DIR}") diff --git a/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx b/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx index 46a63b80504bbcae1cffac5dbca4fb68d877bc28..07f1cd1955fdbdf6e123af3897dcfbde4be0f07a 100644 --- a/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx +++ b/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx @@ -38,10 +38,7 @@ bool checkViewArrangement(int line, qMRMLLayoutManager* layoutManager, // -------------------------------------------------------------------------- // Note: -// (1) Qt4 reports leaks in debug mode (LEAK: 88 WebCoreNode) on exit. -// This seems to be harmless and will be fixed in future Qt releases. -// More info: https://bugreports.qt.io/browse/QTBUG-29390 -// (2) Because of Qt5 issue #50160, we need to explicitly call the quit function. +// (1) Because of Qt5 issue #50160, we need to explicitly call the quit function. // This ensures that the workaround associated with qSlicerWebWidget, // qMRMLChartWidget, ... is applied. // See https://bugreports.qt.io/browse/QTBUG-50160#comment-305211 diff --git a/Modules/Scripted/DICOMLib/DICOMWidgets.py b/Modules/Scripted/DICOMLib/DICOMWidgets.py index 8f64ae731d83db28da948fa313620f0a3330184a..a2f6d2721f75d4559611a0f8131b71220a079738 100644 --- a/Modules/Scripted/DICOMLib/DICOMWidgets.py +++ b/Modules/Scripted/DICOMLib/DICOMWidgets.py @@ -525,14 +525,9 @@ class DICOMDetailsBase(VTKObservationMixin, SizePositionSettingsMixin): try: os.makedirs(databaseDirectory) except OSError: - try: - # Qt4 - documentsLocation = qt.QDesktopServices.DocumentsLocation - documents = qt.QDesktopServices.storageLocation(documentsLocation) - except AttributeError: - # Qt5 - documentsLocation = qt.QStandardPaths.DocumentsLocation - documents = qt.QStandardPaths.writableLocation(documentsLocation) + # Qt5 + documentsLocation = qt.QStandardPaths.DocumentsLocation + documents = qt.QStandardPaths.writableLocation(documentsLocation) databaseDirectory = os.path.join(documents, slicer.app.applicationName+"DICOMDatabase") if not os.path.exists(databaseDirectory): os.makedirs(databaseDirectory)