diff options
Diffstat (limited to 'src/plugins/autotest/itestframework.h')
-rw-r--r-- | src/plugins/autotest/itestframework.h | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/src/plugins/autotest/itestframework.h b/src/plugins/autotest/itestframework.h index 11bdfa31cc..eebb032617 100644 --- a/src/plugins/autotest/itestframework.h +++ b/src/plugins/autotest/itestframework.h @@ -28,8 +28,6 @@ #include "testtreeitem.h" #include "itestparser.h" -namespace Core { class IOptionsPage; } - namespace Autotest { class IFrameworkSettings; @@ -37,37 +35,19 @@ class IFrameworkSettings; class ITestFramework { public: - explicit ITestFramework(bool activeByDefault) : m_active(activeByDefault) {} - virtual ~ITestFramework() - { - delete m_rootNode; - delete m_testParser; - } + explicit ITestFramework(bool activeByDefault); + virtual ~ITestFramework(); virtual const char *name() const = 0; virtual unsigned priority() const = 0; // should this be modifyable? - virtual bool hasFrameworkSettings() const { return false; } - virtual IFrameworkSettings *createFrameworkSettings() const { return nullptr; } - virtual Core::IOptionsPage *createSettingsPage(QSharedPointer<IFrameworkSettings> settings) const - { - Q_UNUSED(settings) - return nullptr; - } - TestTreeItem *rootNode() - { if (!m_rootNode) - m_rootNode = createRootNode(); - return m_rootNode; - } + virtual IFrameworkSettings *frameworkSettings() { return nullptr; } - ITestParser *testParser() - { - if (!m_testParser) - m_testParser = createTestParser(); - return m_testParser; - } + TestTreeItem *rootNode(); + ITestParser *testParser(); - Core::Id settingsId() const; + Utils::Id settingsId() const; + Utils::Id id() const; bool active() const { return m_active; } void setActive(bool active) { m_active = active; } @@ -75,9 +55,12 @@ public: void setGrouping(bool group) { m_grouping = group; } // framework specific tool tip to be displayed on the general settings page virtual QString groupingToolTip() const { return QString(); } + + void resetRootNode(); + protected: - virtual ITestParser *createTestParser() const = 0; - virtual TestTreeItem *createRootNode() const = 0; + virtual ITestParser *createTestParser() = 0; + virtual TestTreeItem *createRootNode() = 0; private: TestTreeItem *m_rootNode = nullptr; @@ -86,4 +69,6 @@ private: bool m_grouping = false; }; +using TestFrameworks = QList<ITestFramework *>; + } // namespace Autotest |