AutoTest: Tie framework settings explicitly to ITestFramework instance

This leaves no doubts regarding lifetime and type.

Change-Id: I1fdd60427a469f32236ea0fa923ec9fa308c338e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-03-12 13:58:09 +01:00
parent ea8efe58c6
commit 2c79196ab5
19 changed files with 83 additions and 150 deletions

View File

@@ -27,6 +27,9 @@
#include "../itestframework.h"
#include "boosttestsettings.h"
#include "boosttestsettingspage.h"
namespace Autotest {
namespace Internal {
@@ -34,14 +37,16 @@ class BoostTestFramework : public ITestFramework
{
public:
BoostTestFramework() : ITestFramework(true) {}
private:
const char *name() const override;
unsigned priority() const override;
IFrameworkSettings *createFrameworkSettings() const override;
Core::IOptionsPage *createSettingsPage(QSharedPointer<IFrameworkSettings> settings) const override;
bool hasFrameworkSettings() const override;
protected:
IFrameworkSettings *frameworkSettings() override { return &m_settings; }
ITestParser *createTestParser() const override;
TestTreeItem *createRootNode() const override;
BoostTestSettings m_settings;
BoostTestSettingsPage m_settingsPage{&m_settings, settingsId()};
};
} // namespace Internal