From a4f108239562738f1ace0613f8492996078d5d95 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 17 Apr 2019 02:09:15 -0400 Subject: [PATCH 1/2] COMP: Fix configuration of Widget library This commit fixes the following configuration error: RCC Parse Error: '/tmp/DiceComputation/DiceComputation/Resources/UI/qSlicerDiceComputationLabelMapSelectorWidget.ui' Line: 2 Column: 18 [unexpected tag: ui] --- DiceComputation/Widgets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiceComputation/Widgets/CMakeLists.txt b/DiceComputation/Widgets/CMakeLists.txt index dc70d05..f039c1b 100644 --- a/DiceComputation/Widgets/CMakeLists.txt +++ b/DiceComputation/Widgets/CMakeLists.txt @@ -21,7 +21,7 @@ set(${KIT}_UI_SRCS ) set(${KIT}_RESOURCES - ../Resources/UI/qSlicer${MODULE_NAME}LabelMapSelectorWidget.ui + ../Resources/qSlicer${MODULE_NAME}Module.qrc ) set(${KIT}_TARGET_LIBRARIES From 2e797761c1a54d83baa368ef9f115b06a8c4df88 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 17 Apr 2019 02:12:54 -0400 Subject: [PATCH 2/2] COMP: Update module to support Qt5 This commit fixes the following build error: /tmp/DiceComputation/DiceComputation/qSlicerDiceComputationModule.cxx:34:1: error: static assertion failed: Old plugin system used See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide#Qt5:_Update_loadable_modules_to_use_new_plugin_macros --- DiceComputation/qSlicerDiceComputationModule.cxx | 3 +++ DiceComputation/qSlicerDiceComputationModule.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/DiceComputation/qSlicerDiceComputationModule.cxx b/DiceComputation/qSlicerDiceComputationModule.cxx index 906a514..82b2b68 100644 --- a/DiceComputation/qSlicerDiceComputationModule.cxx +++ b/DiceComputation/qSlicerDiceComputationModule.cxx @@ -31,7 +31,10 @@ #include "qSlicerDiceComputationModuleWidget.h" //----------------------------------------------------------------------------- +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) +#include Q_EXPORT_PLUGIN2(qSlicerDiceComputationModule, qSlicerDiceComputationModule); +#endif //----------------------------------------------------------------------------- /// \ingroup Slicer_QtModules_ExtensionTemplate diff --git a/DiceComputation/qSlicerDiceComputationModule.h b/DiceComputation/qSlicerDiceComputationModule.h index e0f6906..ee5a95d 100644 --- a/DiceComputation/qSlicerDiceComputationModule.h +++ b/DiceComputation/qSlicerDiceComputationModule.h @@ -36,6 +36,9 @@ qSlicerDiceComputationModule : public qSlicerLoadableModule { Q_OBJECT +#ifdef Slicer_HAVE_QT5 + Q_PLUGIN_METADATA(IID "org.slicer.modules.loadable.qSlicerLoadableModule/1.0"); +#endif Q_INTERFACES(qSlicerLoadableModule); public: