Explorar o código

Fixed some Windows warnings and compiler errors.

Sascha Zelzer %!s(int64=13) %!d(string=hai) anos
pai
achega
a7ce940677

+ 1 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerProgressWidget.h

@@ -22,13 +22,13 @@
 #ifndef CTKCMDLINEMODULEEXPLORERPROGRESSWIDGET_H
 #ifndef CTKCMDLINEMODULEEXPLORERPROGRESSWIDGET_H
 #define CTKCMDLINEMODULEEXPLORERPROGRESSWIDGET_H
 #define CTKCMDLINEMODULEEXPLORERPROGRESSWIDGET_H
 
 
+#include "ctkCmdLineModuleResult.h"
 
 
 #include <QWidget>
 #include <QWidget>
 #include <QFutureWatcher>
 #include <QFutureWatcher>
 #include <QTimer>
 #include <QTimer>
 
 
 class ctkCmdLineModuleFuture;
 class ctkCmdLineModuleFuture;
-class ctkCmdLineModuleResult;
 
 
 namespace Ui {
 namespace Ui {
 class ctkCmdLineModuleExplorerProgressWidget;
 class ctkCmdLineModuleExplorerProgressWidget;

+ 1 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerTreeWidget.h

@@ -27,7 +27,7 @@
 #include <QTreeWidget>
 #include <QTreeWidget>
 
 
 class ctkCmdLineModuleFrontend;
 class ctkCmdLineModuleFrontend;
-class ctkCmdLineModuleFrontendFactory;
+struct ctkCmdLineModuleFrontendFactory;
 
 
 class ctkCmdLineModuleExplorerTreeWidget : public QTreeWidget
 class ctkCmdLineModuleExplorerTreeWidget : public QTreeWidget
 {
 {

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleCache_p.h

@@ -24,7 +24,7 @@
 
 
 #include <QScopedPointer>
 #include <QScopedPointer>
 
 
-class ctkCmdLineModuleCachePrivate;
+struct ctkCmdLineModuleCachePrivate;
 
 
 class QUrl;
 class QUrl;
 
 

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.h

@@ -84,7 +84,7 @@ public:
 private:
 private:
 
 
   friend class ctkCmdLineModuleXmlParser;
   friend class ctkCmdLineModuleXmlParser;
-  friend class ctkCmdLineModuleReferencePrivate;
+  friend struct ctkCmdLineModuleReferencePrivate;
 
 
   ctkCmdLineModuleDescription();
   ctkCmdLineModuleDescription();
 
 

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleFrontend.h

@@ -32,7 +32,7 @@ class QUrl;
 class ctkCmdLineModuleFuture;
 class ctkCmdLineModuleFuture;
 class ctkCmdLineModuleReference;
 class ctkCmdLineModuleReference;
 class ctkCmdLineModuleParameter;
 class ctkCmdLineModuleParameter;
-class ctkCmdLineModuleFrontendPrivate;
+struct ctkCmdLineModuleFrontendPrivate;
 
 
 /**
 /**
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.h

@@ -33,7 +33,7 @@ struct ctkCmdLineModuleFrontendFactory;
 class ctkCmdLineModuleFrontend;
 class ctkCmdLineModuleFrontend;
 class ctkCmdLineModuleFuture;
 class ctkCmdLineModuleFuture;
 
 
-class ctkCmdLineModuleManagerPrivate;
+struct ctkCmdLineModuleManagerPrivate;
 
 
 /**
 /**
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore

+ 2 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleParameter.h

@@ -28,7 +28,7 @@
 class QTextStream;
 class QTextStream;
 class QStringList;
 class QStringList;
 
 
-class ctkCmdLineModuleParameterPrivate;
+struct ctkCmdLineModuleParameterPrivate;
 
 
 /** 
 /** 
  *  \ingroup CommandLineModulesCore
  *  \ingroup CommandLineModulesCore
@@ -125,7 +125,7 @@ public:
 
 
 private:
 private:
 
 
-  friend class ctkCmdLineModuleParameterParser;
+  friend struct ctkCmdLineModuleParameterParser;
   friend class ctkCmdLineModuleXmlParser;
   friend class ctkCmdLineModuleXmlParser;
 
 
   ctkCmdLineModuleParameter();
   ctkCmdLineModuleParameter();

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroup.h

@@ -29,7 +29,7 @@
 class QTextStream;
 class QTextStream;
 
 
 class ctkCmdLineModuleParameter;
 class ctkCmdLineModuleParameter;
-class ctkCmdLineModuleParameterGroupPrivate;
+struct ctkCmdLineModuleParameterGroupPrivate;
 
 
 /** 
 /** 
  *  \ingroup CommandLineModulesCore
  *  \ingroup CommandLineModulesCore

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleReference.h

@@ -29,7 +29,7 @@
 
 
 struct ctkCmdLineModuleBackend;
 struct ctkCmdLineModuleBackend;
 class ctkCmdLineModuleDescription;
 class ctkCmdLineModuleDescription;
-class ctkCmdLineModuleReferencePrivate;
+struct ctkCmdLineModuleReferencePrivate;
 
 
 /**
 /**
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlParser_p.h

@@ -27,7 +27,7 @@
 
 
 class ctkCmdLineModuleDescription;
 class ctkCmdLineModuleDescription;
 class ctkCmdLineModuleParameter;
 class ctkCmdLineModuleParameter;
-class ctkCmdLineModuleParameterParser;
+struct ctkCmdLineModuleParameterParser;
 
 
 class QIODevice;
 class QIODevice;
 
 

+ 1 - 1
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendQtGui.cpp

@@ -132,7 +132,7 @@ QObject* ctkCmdLineModuleFrontendQtGui::guiHandle() const
   QString appPath = QCoreApplication::applicationDirPath();
   QString appPath = QCoreApplication::applicationDirPath();
   if (appPath.endsWith(CMAKE_INTDIR))
   if (appPath.endsWith(CMAKE_INTDIR))
   {
   {
-    uiLoader.addPluginPath(appPath + "/../designer");
+    uiLoader->addPluginPath(appPath + "/../designer");
   }
   }
 #endif
 #endif
   d->Widget = uiLoader->load(&uiForm);
   d->Widget = uiLoader->load(&uiForm);

+ 2 - 1
Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit.cpp

@@ -68,8 +68,9 @@ QObject* ctkCmdLineModuleFrontendQtWebKit::guiHandle() const
 }
 }
 
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-QVariant ctkCmdLineModuleFrontendQtWebKit::value(const QString &parameter) const
+QVariant ctkCmdLineModuleFrontendQtWebKit::value(const QString &parameter, int role) const
 {
 {
+  Q_UNUSED(role)
   QWebElement webElement = this->WebView->page()->currentFrame()->findFirstElement("input[name=" + parameter + "]");
   QWebElement webElement = this->WebView->page()->currentFrame()->findFirstElement("input[name=" + parameter + "]");
   if (webElement.isNull()) return QVariant();
   if (webElement.isNull()) return QVariant();
   // Work around bug https://bugs.webkit.org/show_bug.cgi?id=32865 for input elements
   // Work around bug https://bugs.webkit.org/show_bug.cgi?id=32865 for input elements

+ 1 - 1
Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit_p.h

@@ -37,7 +37,7 @@ public:
 
 
   virtual QObject* guiHandle() const;
   virtual QObject* guiHandle() const;
 
 
-  virtual QVariant value(const QString& parameter) const;
+  virtual QVariant value(const QString& parameter, int role = LocalResourceRole) const;
   virtual void setValue(const QString& parameter, const QVariant& value);
   virtual void setValue(const QString& parameter, const QVariant& value);
 
 
   //virtual QList<QString> parameterNames() const;
   //virtual QList<QString> parameterNames() const;

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

@@ -242,7 +242,7 @@ void ctkCmdLineModuleQtCustomizationTester::testCustomization()
 
 
   // run the module (function pointer) and check that is gets the tmp path
   // run the module (function pointer) and check that is gets the tmp path
   ctkCmdLineModuleFuture future = moduleManager.run(fpFrontend);
   ctkCmdLineModuleFuture future = moduleManager.run(fpFrontend);
-  sleep(1);
+  QTest::qSleep(500);
   QApplication::processEvents();
   QApplication::processEvents();
   future.waitForFinished();
   future.waitForFinished();