瀏覽代碼

Cleaned up APIs for existing frontends and backends.

Sascha Zelzer 12 年之前
父節點
當前提交
a03a6136ac

+ 3 - 0
Libs/CommandLineModules/Backend/LocalProcess/CMakeLists.txt

@@ -16,11 +16,14 @@ set(KIT_export_directive "CTK_CMDLINEMODULEBACKENDLP_EXPORT")
 set(KIT_SRCS
   ctkCmdLineModuleBackendLocalProcess.cpp
   ctkCmdLineModuleProcessTask.cpp
+  ctkCmdLineModuleProcessWatcher.cpp
+  ctkCmdLineModuleProcessWatcher_p.h
 )
 
 # Headers that should run through moc
 set(KIT_MOC_SRCS
   ctkCmdLineModuleProcessTask.h
+  ctkCmdLineModuleProcessWatcher_p.h
 )
 
 # UI files

+ 14 - 116
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessTask.cpp

@@ -20,6 +20,7 @@
 =============================================================================*/
 
 #include "ctkCmdLineModuleProcessTask.h"
+#include "ctkCmdLineModuleProcessWatcher_p.h"
 #include "ctkCmdLineModuleRunException.h"
 #include "ctkCmdLineModuleXmlProgressWatcher.h"
 #include "ctkCmdLineModuleFuture.h"
@@ -29,124 +30,21 @@
 #include <QThreadPool>
 #include <QProcess>
 
-#ifdef Q_OS_UNIX
-#include <signal.h>
-#endif
-
-//----------------------------------------------------------------------------
-ctkCmdLineModuleProcessWatcher::ctkCmdLineModuleProcessWatcher(QProcess& process, const QString& location,
-                                                               ctkCmdLineModuleFutureInterface &futureInterface)
-  : process(process), location(location), futureInterface(futureInterface), processXmlWatcher(&process),
-    processPaused(false), progressValue(0)
-{
-  futureInterface.setProgressRange(0, 1000);
-
-  connect(&processXmlWatcher, SIGNAL(filterStarted(QString,QString)), SLOT(filterStarted(QString,QString)));
-  connect(&processXmlWatcher, SIGNAL(filterProgress(float)), SLOT(filterProgress(float)));
-  connect(&processXmlWatcher, SIGNAL(filterFinished(QString)), SLOT(filterFinished(QString)));
-  connect(&processXmlWatcher, SIGNAL(filterXmlError(QString)), SLOT(filterXmlError(QString)));
-
-  connect(&futureWatcher, SIGNAL(canceled()), SLOT(cancelProcess()));
-#ifdef Q_OS_UNIX
-  connect(&futureWatcher, SIGNAL(resumed()), SLOT(resumeProcess()));
-  // Due to Qt bug 12152, we cannot listen to the "paused" signal because it is
-  // not emitted directly when the QFuture is paused. Instead, it is emitted after
-  // resuming the future, after the "resume" signal has been emitted...
-  //connect(&futureWatcher, SIGNAL(paused()), SLOT(pauseProcess()));
-  connect(&pollPauseTimer, SIGNAL(timeout()), this, SLOT(pauseProcess()));
-  pollPauseTimer.start(500);
-#endif
-  futureWatcher.setFuture(futureInterface.future());
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::filterStarted(const QString& name, const QString& comment)
-{
-  Q_UNUSED(comment)
-  futureInterface.setProgressValueAndText(incrementProgress(), name);
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::filterProgress(float progress)
-{
-  futureInterface.setProgressValue(updateProgress(progress));
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::filterFinished(const QString& name)
-{
-  futureInterface.setProgressValueAndText(incrementProgress(), "Finished: " + name);
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::filterXmlError(const QString &error)
-{
-  qDebug().nospace() << "[Module " << location << "]: " << error;
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::pauseProcess()
-{
-  if (processPaused || !futureInterface.isPaused()) return;
-
-#ifdef Q_OS_UNIX
-  if (::kill(process.pid(), SIGSTOP))
-  {
-    // error
-    futureInterface.setPaused(false);
-  }
-  else
-  {
-    processPaused = true;
-  }
-#endif
-}
-
-//----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::resumeProcess()
-{
-  if (!processPaused) return;
-
-#ifdef Q_OS_UNIX
-  if(::kill(process.pid(), SIGCONT))
-  {
-    // error
-    futureInterface.setPaused(true);
-  }
-  else
-  {
-    processPaused = false;
-  }
-#endif
-}
-
 //----------------------------------------------------------------------------
-void ctkCmdLineModuleProcessWatcher::cancelProcess()
+struct ctkCmdLineModuleProcessTaskPrivate
 {
-  process.terminate();
-}
-
-int ctkCmdLineModuleProcessWatcher::updateProgress(float progress)
-{
-  progressValue = static_cast<int>(progress * 1000.0f);
-  // normalize the value to lie between 0 and 1000.
-  // 0 is reported when the process starts and 1000 is reserved for
-  // reporting completion + standard output text
-  if (progressValue < 1) progressValue = 1;
-  if (progressValue > 999) progressValue = 999;
-  return progressValue;
-}
+  ctkCmdLineModuleProcessTaskPrivate(const QString& location, const QStringList& args)
+    : Location(location)
+    , Args(args)
+  {}
 
-//----------------------------------------------------------------------------
-int ctkCmdLineModuleProcessWatcher::incrementProgress()
-{
-  if (++progressValue > 999) progressValue = 999;
-  return progressValue;
-}
+  const QString Location;
+  const QStringList Args;
+};
 
 //----------------------------------------------------------------------------
 ctkCmdLineModuleProcessTask::ctkCmdLineModuleProcessTask(const QString& location, const QStringList& args)
-  : location(location), args(args)
+  : d(new ctkCmdLineModuleProcessTaskPrivate(location, args))
 {
   this->setCanCancel(true);
 #ifdef Q_OS_UNIX
@@ -185,20 +83,20 @@ void ctkCmdLineModuleProcessTask::run()
   QObject::connect(&process, SIGNAL(finished(int)), &localLoop, SLOT(quit()));
   QObject::connect(&process, SIGNAL(error(QProcess::ProcessError)), &localLoop, SLOT(quit()));
 
-  process.start(location, args);
+  process.start(d->Location, d->Args);
 
-  ctkCmdLineModuleProcessWatcher progressWatcher(process, location, *this);
+  ctkCmdLineModuleProcessWatcher progressWatcher(process, d->Location, *this);
   Q_UNUSED(progressWatcher)
 
   localLoop.exec();
 
   if (process.error() != QProcess::UnknownError)
   {
-    this->reportException(ctkCmdLineModuleRunException(location, process.exitCode(), process.errorString()));
+    this->reportException(ctkCmdLineModuleRunException(d->Location, process.exitCode(), process.errorString()));
   }
   else if (process.exitCode() != 0)
   {
-    this->reportException(ctkCmdLineModuleRunException(location, process.exitCode(), process.readAllStandardError()));
+    this->reportException(ctkCmdLineModuleRunException(d->Location, process.exitCode(), process.readAllStandardError()));
   }
 
   this->setProgressValueAndText(1000, process.readAllStandardError());

+ 7 - 38
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessTask.h

@@ -22,9 +22,10 @@
 #ifndef CTKCMDLINEMODULEPROCESSTASK_H
 #define CTKCMDLINEMODULEPROCESSTASK_H
 
-#include "ctkCmdLineModuleXmlProgressWatcher.h"
 #include "ctkCmdLineModuleFutureInterface.h"
 
+#include "ctkCommandLineModulesBackendLocalProcessExport.h"
+
 #include <QObject>
 #include <QRunnable>
 #include <QStringList>
@@ -34,7 +35,10 @@
 
 class QProcess;
 
-class ctkCmdLineModuleProcessTask : public ctkCmdLineModuleFutureInterface, public QRunnable
+struct ctkCmdLineModuleProcessTaskPrivate;
+
+class CTK_CMDLINEMODULEBACKENDLP_EXPORT ctkCmdLineModuleProcessTask
+    : public ctkCmdLineModuleFutureInterface, public QRunnable
 {
 
 public:
@@ -48,45 +52,10 @@ public:
 
 private:
 
-  const QString location;
-  const QStringList args;
+  QScopedPointer<ctkCmdLineModuleProcessTaskPrivate> d;
 
 };
 
-class ctkCmdLineModuleProcessWatcher : public QObject
-{
-  Q_OBJECT
-
-public:
-
-  ctkCmdLineModuleProcessWatcher(QProcess& process, const QString& location,
-                                 ctkCmdLineModuleFutureInterface& futureInterface);
-
-protected Q_SLOTS:
 
-  void filterStarted(const QString& name, const QString& comment);
-  void filterProgress(float progress);
-  void filterFinished(const QString& name);
-
-  void filterXmlError(const QString& error);
-
-  void pauseProcess();
-  void resumeProcess();
-  void cancelProcess();
-
-private:
-
-  int updateProgress(float progress);
-  int incrementProgress();
-
-  QProcess& process;
-  QString location;
-  ctkCmdLineModuleFutureInterface& futureInterface;
-  ctkCmdLineModuleXmlProgressWatcher processXmlWatcher;
-  QFutureWatcher<ctkCmdLineModuleResult> futureWatcher;
-  QTimer pollPauseTimer;
-  bool processPaused;
-  int progressValue;
-};
 
 #endif // CTKCMDLINEMODULEPROCESSTASK_H

+ 141 - 0
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessWatcher.cpp

@@ -0,0 +1,141 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+#include "ctkCmdLineModuleProcessWatcher_p.h"
+
+#include "ctkCmdLineModuleFuture.h"
+
+#include <QProcess>
+
+#ifdef Q_OS_UNIX
+#include <signal.h>
+#endif
+
+//----------------------------------------------------------------------------
+ctkCmdLineModuleProcessWatcher::ctkCmdLineModuleProcessWatcher(QProcess& process, const QString& location,
+                                                               ctkCmdLineModuleFutureInterface &futureInterface)
+  : process(process), location(location), futureInterface(futureInterface), processXmlWatcher(&process),
+    processPaused(false), progressValue(0)
+{
+  futureInterface.setProgressRange(0, 1000);
+
+  connect(&processXmlWatcher, SIGNAL(filterStarted(QString,QString)), SLOT(filterStarted(QString,QString)));
+  connect(&processXmlWatcher, SIGNAL(filterProgress(float)), SLOT(filterProgress(float)));
+  connect(&processXmlWatcher, SIGNAL(filterFinished(QString)), SLOT(filterFinished(QString)));
+  connect(&processXmlWatcher, SIGNAL(filterXmlError(QString)), SLOT(filterXmlError(QString)));
+
+  connect(&futureWatcher, SIGNAL(canceled()), SLOT(cancelProcess()));
+#ifdef Q_OS_UNIX
+  connect(&futureWatcher, SIGNAL(resumed()), SLOT(resumeProcess()));
+  // Due to Qt bug 12152, we cannot listen to the "paused" signal because it is
+  // not emitted directly when the QFuture is paused. Instead, it is emitted after
+  // resuming the future, after the "resume" signal has been emitted...
+  //connect(&futureWatcher, SIGNAL(paused()), SLOT(pauseProcess()));
+  connect(&pollPauseTimer, SIGNAL(timeout()), this, SLOT(pauseProcess()));
+  pollPauseTimer.start(500);
+#endif
+  futureWatcher.setFuture(futureInterface.future());
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::filterStarted(const QString& name, const QString& comment)
+{
+  Q_UNUSED(comment)
+  futureInterface.setProgressValueAndText(incrementProgress(), name);
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::filterProgress(float progress)
+{
+  futureInterface.setProgressValue(updateProgress(progress));
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::filterFinished(const QString& name)
+{
+  futureInterface.setProgressValueAndText(incrementProgress(), "Finished: " + name);
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::filterXmlError(const QString &error)
+{
+  qDebug().nospace() << "[Module " << location << "]: " << error;
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::pauseProcess()
+{
+  if (processPaused || !futureInterface.isPaused()) return;
+
+#ifdef Q_OS_UNIX
+  if (::kill(process.pid(), SIGSTOP))
+  {
+    // error
+    futureInterface.setPaused(false);
+  }
+  else
+  {
+    processPaused = true;
+  }
+#endif
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::resumeProcess()
+{
+  if (!processPaused) return;
+
+#ifdef Q_OS_UNIX
+  if(::kill(process.pid(), SIGCONT))
+  {
+    // error
+    futureInterface.setPaused(true);
+  }
+  else
+  {
+    processPaused = false;
+  }
+#endif
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleProcessWatcher::cancelProcess()
+{
+  process.terminate();
+}
+
+int ctkCmdLineModuleProcessWatcher::updateProgress(float progress)
+{
+  progressValue = static_cast<int>(progress * 1000.0f);
+  // normalize the value to lie between 0 and 1000.
+  // 0 is reported when the process starts and 1000 is reserved for
+  // reporting completion + standard output text
+  if (progressValue < 1) progressValue = 1;
+  if (progressValue > 999) progressValue = 999;
+  return progressValue;
+}
+
+//----------------------------------------------------------------------------
+int ctkCmdLineModuleProcessWatcher::incrementProgress()
+{
+  if (++progressValue > 999) progressValue = 999;
+  return progressValue;
+}

+ 72 - 0
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessWatcher_p.h

@@ -0,0 +1,72 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+#ifndef CTKCMDLINEMODULEPROCESSWATCHER_P_H
+#define CTKCMDLINEMODULEPROCESSWATCHER_P_H
+
+#include "ctkCmdLineModuleXmlProgressWatcher.h"
+#include "ctkCmdLineModuleFutureInterface.h"
+
+#include <QObject>
+#include <QFutureWatcher>
+#include <QTimer>
+
+class ctkCmdLineModuleResult;
+
+class QProcess;
+
+class ctkCmdLineModuleProcessWatcher : public QObject
+{
+  Q_OBJECT
+
+public:
+
+  ctkCmdLineModuleProcessWatcher(QProcess& process, const QString& location,
+                                 ctkCmdLineModuleFutureInterface& futureInterface);
+
+protected Q_SLOTS:
+
+  void filterStarted(const QString& name, const QString& comment);
+  void filterProgress(float progress);
+  void filterFinished(const QString& name);
+
+  void filterXmlError(const QString& error);
+
+  void pauseProcess();
+  void resumeProcess();
+  void cancelProcess();
+
+private:
+
+  int updateProgress(float progress);
+  int incrementProgress();
+
+  QProcess& process;
+  QString location;
+  ctkCmdLineModuleFutureInterface& futureInterface;
+  ctkCmdLineModuleXmlProgressWatcher processXmlWatcher;
+  QFutureWatcher<ctkCmdLineModuleResult> futureWatcher;
+  QTimer pollPauseTimer;
+  bool processPaused;
+  int progressValue;
+};
+
+#endif // CTKCMDLINEMODULEPROCESSWATCHER_P_H

+ 42 - 23
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendQtGui.cpp

@@ -35,11 +35,32 @@
 #include <QDebug>
 
 //-----------------------------------------------------------------------------
+struct ctkCmdLineModuleFrontendQtGuiPrivate
+{
+  ctkCmdLineModuleFrontendQtGuiPrivate()
+    : Loader(NULL)
+    , Transform(NULL)
+    , Widget(NULL)
+  {}
+
+  ~ctkCmdLineModuleFrontendQtGuiPrivate()
+  {
+    delete Loader;
+    delete Transform;
+  }
+
+  mutable QUiLoader* Loader;
+  mutable ctkCmdLineModuleXslTransform* Transform;
+  mutable QWidget* Widget;
+
+  // Cache the list of parameter names
+  mutable QList<QString> ParameterNames;
+};
+
+//-----------------------------------------------------------------------------
 ctkCmdLineModuleFrontendQtGui::ctkCmdLineModuleFrontendQtGui(const ctkCmdLineModuleReference& moduleRef)
   : ctkCmdLineModuleFrontend(moduleRef),
-    Loader(NULL),
-    Transform(NULL),
-    Widget(NULL)
+    d(new ctkCmdLineModuleFrontendQtGuiPrivate)
 {
 }
 
@@ -47,37 +68,35 @@ ctkCmdLineModuleFrontendQtGui::ctkCmdLineModuleFrontendQtGui(const ctkCmdLineMod
 //-----------------------------------------------------------------------------
 ctkCmdLineModuleFrontendQtGui::~ctkCmdLineModuleFrontendQtGui()
 {
-  delete this->Loader;
-  delete this->Transform;
 }
 
 
 //-----------------------------------------------------------------------------
 QUiLoader* ctkCmdLineModuleFrontendQtGui::uiLoader() const
 {
-  if (this->Loader == NULL)
+  if (d->Loader == NULL)
   {
-    this->Loader = new QUiLoader();
+    d->Loader = new QUiLoader();
   }
-  return this->Loader;
+  return d->Loader;
 }
 
 
 //-----------------------------------------------------------------------------
 ctkCmdLineModuleXslTransform* ctkCmdLineModuleFrontendQtGui::xslTransform() const
 {
-  if (this->Transform == NULL)
+  if (d->Transform == NULL)
   {
-    this->Transform = new ctkCmdLineModuleXslTransform();
+    d->Transform = new ctkCmdLineModuleXslTransform();
   }
-  return this->Transform;
+  return d->Transform;
 }
 
 
 //-----------------------------------------------------------------------------
 QObject* ctkCmdLineModuleFrontendQtGui::guiHandle() const
 {
-  if (Widget) return Widget;
+  if (d->Widget) return d->Widget;
 
   QBuffer input;
   input.setData(moduleReference().rawXmlDescription());
@@ -106,17 +125,17 @@ QObject* ctkCmdLineModuleFrontendQtGui::guiHandle() const
     uiLoader.addPluginPath(appPath + "/../designer");
   }
 #endif
-  this->Widget = uiLoader->load(&uiForm);
-  return this->Widget;
+  d->Widget = uiLoader->load(&uiForm);
+  return d->Widget;
 }
 
 
 //-----------------------------------------------------------------------------
 QVariant ctkCmdLineModuleFrontendQtGui::value(const QString &parameter) const
 {
-  if (!this->Widget) return QVariant();
+  if (!d->Widget) return QVariant();
 
-  ctkCmdLineModuleObjectTreeWalker reader(this->Widget);
+  ctkCmdLineModuleObjectTreeWalker reader(d->Widget);
   while(reader.readNextParameter())
   {
     if(reader.name() == parameter)
@@ -131,9 +150,9 @@ QVariant ctkCmdLineModuleFrontendQtGui::value(const QString &parameter) const
 //-----------------------------------------------------------------------------
 void ctkCmdLineModuleFrontendQtGui::setValue(const QString &parameter, const QVariant &value)
 {
-  if (!this->Widget) return;
+  if (!d->Widget) return;
 
-  ctkCmdLineModuleObjectTreeWalker walker(this->Widget);
+  ctkCmdLineModuleObjectTreeWalker walker(d->Widget);
   while(walker.readNextParameter())
   {
     if(walker.name() == parameter && walker.value() != value)
@@ -148,18 +167,18 @@ void ctkCmdLineModuleFrontendQtGui::setValue(const QString &parameter, const QVa
 //-----------------------------------------------------------------------------
 QList<QString> ctkCmdLineModuleFrontendQtGui::parameterNames() const
 {
-  if (!ParameterNames.empty()) return ParameterNames;
+  if (!d->ParameterNames.empty()) return d->ParameterNames;
 
   // Compute the list of parameter names using the widget hierarchy
   // if it has already created (otherwise fall back to the superclass
   // implementation.
   // This avoids creating a ctkCmdLineModuleDescription instance.
-  if (this->Widget == 0) return ctkCmdLineModuleFrontend::parameterNames();
+  if (d->Widget == 0) return ctkCmdLineModuleFrontend::parameterNames();
 
-  ctkCmdLineModuleObjectTreeWalker walker(this->Widget);
+  ctkCmdLineModuleObjectTreeWalker walker(d->Widget);
   while(walker.readNextParameter())
   {
-    ParameterNames.push_back(walker.name());
+    d->ParameterNames.push_back(walker.name());
   }
-  return ParameterNames;
+  return d->ParameterNames;
 }

+ 7 - 7
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendQtGui.h

@@ -22,7 +22,9 @@
 #ifndef CTKCMDLINEMODULEFRONTENDQTGUI_H
 #define CTKCMDLINEMODULEFRONTENDQTGUI_H
 
-#include <ctkCmdLineModuleFrontend.h>
+#include "ctkCmdLineModuleFrontend.h"
+
+#include "ctkCommandLineModulesFrontendQtGuiExport.h"
 
 class ctkCmdLineModuleReference;
 class ctkCmdLineModuleXslTransform;
@@ -30,7 +32,9 @@ class ctkCmdLineModuleXslTransform;
 class QUiLoader;
 class QWidget;
 
-class ctkCmdLineModuleFrontendQtGui : public ctkCmdLineModuleFrontend
+struct ctkCmdLineModuleFrontendQtGuiPrivate;
+
+class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendQtGui : public ctkCmdLineModuleFrontend
 {
 
 public:
@@ -54,12 +58,8 @@ protected:
 
 private:
 
-  mutable QUiLoader* Loader;
-  mutable ctkCmdLineModuleXslTransform* Transform;
-  mutable QWidget* Widget;
+  QScopedPointer<ctkCmdLineModuleFrontendQtGuiPrivate> d;
 
-  // Cache the list of parameter names
-  mutable QList<QString> ParameterNames;
 };
 
 #endif // CTKCMDLINEMODULEFRONTENDQTGUI_H

+ 1 - 0
Libs/CommandLineModules/Frontend/QtWebKit/CMakeLists.txt

@@ -16,6 +16,7 @@ set(KIT_export_directive "CTK_CMDLINEMODULEQTWEBKIT_EXPORT")
 set(KIT_SRCS
   ctkCmdLineModuleFrontendFactoryQtWebKit.cpp
   ctkCmdLineModuleFrontendQtWebKit.cpp
+  ctkCmdLineModuleFrontendQtWebKit_p.h
 )
 
 # Headers that should run through moc

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

@@ -21,9 +21,10 @@
 
 #include "ctkCmdLineModuleFrontendFactoryQtWebKit.h"
 
+#include "ctkCmdLineModuleFrontendQtWebKit_p.h"
 
 //----------------------------------------------------------------------------
-ctkCmdLineModuleFrontendQtWebKit *ctkCmdLineModuleFrontendFactoryQtWebKit::create(const ctkCmdLineModuleReference &moduleRef)
+ctkCmdLineModuleFrontend* ctkCmdLineModuleFrontendFactoryQtWebKit::create(const ctkCmdLineModuleReference &moduleRef)
 {
   return new ctkCmdLineModuleFrontendQtWebKit(moduleRef);
 }

+ 1 - 2
Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendFactoryQtWebKit.h

@@ -25,7 +25,6 @@
 #include "ctkCommandLineModulesFrontendQtWebKitExport.h"
 
 #include "ctkCmdLineModuleFrontendFactory.h"
-#include "ctkCmdLineModuleFrontendQtWebKit.h"
 
 class CTK_CMDLINEMODULEQTWEBKIT_EXPORT ctkCmdLineModuleFrontendFactoryQtWebKit : public ctkCmdLineModuleFrontendFactory
 {
@@ -35,7 +34,7 @@ public:
   virtual QString name() const;
   virtual QString description() const;
 
-  virtual ctkCmdLineModuleFrontendQtWebKit* create(const ctkCmdLineModuleReference& moduleRef);
+  virtual ctkCmdLineModuleFrontend* create(const ctkCmdLineModuleReference& moduleRef);
 };
 
 #endif // CTKCMDLINEMODULEFRONTENDFACTORYQTWEBKIT_H

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

@@ -19,7 +19,7 @@
 
 =============================================================================*/
 
-#include "ctkCmdLineModuleFrontendQtWebKit.h"
+#include "ctkCmdLineModuleFrontendQtWebKit_p.h"
 
 #include "ctkCmdLineModuleXslTransform.h"
 #include "ctkCmdLineModuleReference.h"

Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit.h → Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit_p.h