forked from qt-creator/qt-creator
AutoTest: Do not inherit from another framework
Commit 91509727e0
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>
This commit is contained in:
@@ -27,6 +27,9 @@
|
|||||||
#include "quicktestparser.h"
|
#include "quicktestparser.h"
|
||||||
#include "quicktesttreeitem.h"
|
#include "quicktesttreeitem.h"
|
||||||
|
|
||||||
|
#include "../testframeworkmanager.h"
|
||||||
|
#include "../qtest/qttestconstants.h"
|
||||||
|
|
||||||
namespace Autotest {
|
namespace Autotest {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -51,5 +54,13 @@ unsigned QuickTestFramework::priority() const
|
|||||||
return 5;
|
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 Internal
|
||||||
} // namespace Autotest
|
} // namespace Autotest
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../qtest/qttestframework.h"
|
#include "../itestframework.h"
|
||||||
|
|
||||||
namespace Autotest {
|
namespace Autotest {
|
||||||
namespace QuickTest {
|
namespace QuickTest {
|
||||||
@@ -38,12 +38,13 @@ const char FRAMEWORK_NAME[] = "QtQuickTest";
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QuickTestFramework : public QtTestFramework
|
class QuickTestFramework : public ITestFramework
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QuickTestFramework() = default;
|
QuickTestFramework() : ITestFramework(true) {}
|
||||||
const char *name() const override;
|
const char *name() const override;
|
||||||
unsigned priority() const override;
|
unsigned priority() const override;
|
||||||
|
IFrameworkSettings *frameworkSettings() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ITestParser *createTestParser() override;
|
ITestParser *createTestParser() override;
|
||||||
|
Reference in New Issue
Block a user