Parcourir la source

Merge branch 'cli-module-support'

Sascha Zelzer il y a 12 ans
Parent
commit
5e68064f79

+ 4 - 0
Libs/CommandLineModules/Backend/FunctionPointer/ctkCmdLineModuleBackendFunctionPointer.cpp

@@ -35,6 +35,10 @@
 #include <QUrl>
 
 
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+extern int qHash(const QUrl& url);
+#endif
+
 namespace ctk {
 namespace CmdLineModuleBackendFunctionPointer {
 

+ 4 - 0
Libs/CommandLineModules/Core/Testing/Cpp/ctkCmdLineModuleManagerTest.cpp

@@ -32,6 +32,10 @@
 #include <QDataStream>
 #include <QDebug>
 
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+extern int qHash(const QUrl& url);
+#endif
+
 namespace {
 
 class BackendMockUp : public ctkCmdLineModuleBackend

+ 4 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -42,6 +42,10 @@
 
 #include <QFuture>
 
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+extern int qHash(const QUrl& url);
+#endif
+
 //----------------------------------------------------------------------------
 struct ctkCmdLineModuleManagerPrivate
 {

+ 9 - 0
Libs/CommandLineModules/Frontend/QtGui/Testing/Cpp/ctkCmdLineModuleFrontendQtGuiTest.cpp

@@ -22,6 +22,11 @@
 // Qt includes
 #include <QSpinBox>
 #include <QComboBox>
+#include <QVariant>
+
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+Q_DECLARE_METATYPE(QVariant)
+#endif
 
 // CTK includes
 #include "ctkCmdLineModuleManager.h"
@@ -33,6 +38,10 @@
 
 #include "ctkTest.h"
 
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+extern int qHash(const QUrl& url);
+#endif
+
 namespace {
 
 class BackendMockUp : public ctkCmdLineModuleBackend

+ 2 - 1
Libs/CommandLineModules/Testing/Cpp/ctkCmdLineModuleQtCustomizationTest.cpp

@@ -266,7 +266,8 @@ void ctkCmdLineModuleQtCustomizationTester::testCustomization()
   fpFrontend->guiHandle();
 
   QString expectedImageValue = "/path/to/image2";
-  QCOMPARE(fpFrontend->value("param0").toString(), expectedImageValue);
+  QString actualImageValue = fpFrontend->value("param0").toString();
+  QCOMPARE(actualImageValue, expectedImageValue);
 
   // get a custom QVariant value holding the custom widget
   QCOMPARE(fpFrontend->value("param0", ctkCmdLineModuleFrontend::UserRole).value<const MyImageData*>()->Path,