aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-04-17 13:44:30 +0200
committerChristian Stenger <christian.stenger@qt.io>2020-04-17 14:11:12 +0000
commitce3306ccb3699c400fe2090c65b0f873625665a8 (patch)
treea2f01858f63fa57d4271766b399a85841748c19e /src/plugins/autotest
parent74a07f906f60913b52defebd3ed1db59b3239c94 (diff)
AutoTest: Do not inherit from another framework
Commit 91509727e062b6 had some unexpected side effect. Amend (or replace) this one by an explicit lookup which is still a hack, but at least safe to do. Change-Id: I8fd2e9bdcea18d062f6fc6dd74709c12c16f2cc5 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r--src/plugins/autotest/quick/quicktestframework.cpp11
-rw-r--r--src/plugins/autotest/quick/quicktestframework.h7
2 files changed, 15 insertions, 3 deletions
diff --git a/src/plugins/autotest/quick/quicktestframework.cpp b/src/plugins/autotest/quick/quicktestframework.cpp
index fc6b1e34d1..50d46c7e1e 100644
--- a/src/plugins/autotest/quick/quicktestframework.cpp
+++ b/src/plugins/autotest/quick/quicktestframework.cpp
@@ -27,6 +27,9 @@
#include "quicktestparser.h"
#include "quicktesttreeitem.h"
+#include "../testframeworkmanager.h"
+#include "../qtest/qttestconstants.h"
+
namespace Autotest {
namespace Internal {
@@ -51,5 +54,13 @@ unsigned QuickTestFramework::priority() const
return 5;
}
+IFrameworkSettings *QuickTestFramework::frameworkSettings()
+{
+ static const Core::Id id
+ = Core::Id(Constants::FRAMEWORK_PREFIX).withSuffix(QtTest::Constants::FRAMEWORK_NAME);
+ ITestFramework *qtTestFramework = TestFrameworkManager::frameworkForId(id);
+ return qtTestFramework->frameworkSettings();
+}
+
} // namespace Internal
} // namespace Autotest
diff --git a/src/plugins/autotest/quick/quicktestframework.h b/src/plugins/autotest/quick/quicktestframework.h
index deb3b499a2..a50b224c8d 100644
--- a/src/plugins/autotest/quick/quicktestframework.h
+++ b/src/plugins/autotest/quick/quicktestframework.h
@@ -25,7 +25,7 @@
#pragma once
-#include "../qtest/qttestframework.h"
+#include "../itestframework.h"
namespace Autotest {
namespace QuickTest {
@@ -38,12 +38,13 @@ const char FRAMEWORK_NAME[] = "QtQuickTest";
namespace Internal {
-class QuickTestFramework : public QtTestFramework
+class QuickTestFramework : public ITestFramework
{
public:
- QuickTestFramework() = default;
+ QuickTestFramework() : ITestFramework(true) {}
const char *name() const override;
unsigned priority() const override;
+ IFrameworkSettings *frameworkSettings() override;
protected:
ITestParser *createTestParser() override;