[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevplatform/veritas
From:       Manuel Breugelmans <mbr.nxi () gmail ! com>
Date:       2008-10-02 22:35:34
Message-ID: 1222986934.479067.21423.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 867148 by mbreugel:

Adapt to single test-config module.

 M  +27 -1     itestframework.h  
 M  +1 -0      testtoolviewfactory.cpp  


--- trunk/KDE/kdevplatform/veritas/itestframework.h #867147:867148
@@ -22,10 +22,15 @@
 #define VERITAS_ITESTFRAMEWORK_H
 
 #include <interfaces/iextension.h>
+#include <QVariantList>
 #include "veritasexport.h"
 
+
+namespace KDevelop { class ProjectConfigSkeleton; }
+
 namespace Veritas
 {
+
 class ITestRunner;
 
 /*! An extension interface for (xUnit) test frameworks. Plugins that implement this
@@ -43,16 +48,37 @@
     /*! Single word that describes the framework. eg 'QTest', 'CppUnit' */
     virtual QString name() const = 0;
 
-    /*! Factory method that constructs a test runner. To be implemented
+    /*! Factory method which constructs a test runner. To be implemented
      *  by concrete frameworks. @see Veritas::ITestRunner */
     virtual ITestRunner* createRunner() = 0;
 
+    /*! Factory method which constructs a configuration widget for this framework.
+     *  Implementations should both create the widget and set the current \
configuration +     *  values in this widget. If null is returned, no extra config \
widget is present. +     *  Caller takes ownership. */
+    virtual QWidget* createConfigWidget() { return 0; }
+
+    /*! Framework specific configuration. */
+    virtual KDevelop::ProjectConfigSkeleton* configSkeleton(const QVariantList& \
args) { Q_UNUSED(args); return 0; } +
 private:
     ITestFrameworkPrivate* const d;
 };
 
+/*! Initialize a ProjectConfigSkeleton [the template parameter] */
+template <typename T>
+void initializeProjectConfig(const QVariantList& args) {
+    // NOTE does not quite belong here.
+    Q_ASSERT( args.count() > 3 );
+    T::instance( args.at(0).toString() );
+    T::self()->setDeveloperTempFile( args.at(0).toString() );
+    T::self()->setProjectTempFile( args.at(1).toString() );
+    T::self()->setProjectFileUrl( args.at(2).toString() );
+    T::self()->setDeveloperFileUrl( args.at(3).toString() );
 }
 
+}
+
 KDEV_DECLARE_EXTENSION_INTERFACE_NS( Veritas, ITestFramework, \
"org.kdevelop.ITestFramework")  Q_DECLARE_INTERFACE( Veritas::ITestFramework, \
"org.kdevelop.ITestFramework")  
--- trunk/KDE/kdevplatform/veritas/testtoolviewfactory.cpp #867147:867148
@@ -52,6 +52,7 @@
 
 QWidget* TestToolViewFactory::create(QWidget *parent)
 {
+    Q_UNUSED(parent);
     ITestRunner* runner = d->framework->createRunner();
     QWidget* runnerWidget = runner->runnerWidget();
     QObject::connect(runnerWidget, SIGNAL(destroyed(QObject*)),


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic