AutoTest: Remove back reference

There is no need for holding the q-pointer anymore.

Change-Id: I9de19238b0cf0d59cd1e88590b7b2dfaf28ff285
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-03-05 08:35:01 +01:00
parent 0e4c09bd17
commit 9471bd581e

View File

@@ -86,11 +86,9 @@ class AutotestPluginPrivate : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AutotestPluginPrivate(AutotestPlugin *parent); AutotestPluginPrivate();
~AutotestPluginPrivate() override; ~AutotestPluginPrivate() override;
AutotestPlugin *q = nullptr;
TestFrameworkManager *m_frameworkManager = nullptr; TestFrameworkManager *m_frameworkManager = nullptr;
TestNavigationWidgetFactory *m_navigationWidgetFactory = nullptr; TestNavigationWidgetFactory *m_navigationWidgetFactory = nullptr;
TestResultsPane *m_resultsPane = nullptr; TestResultsPane *m_resultsPane = nullptr;
@@ -122,8 +120,7 @@ AutotestPlugin::~AutotestPlugin()
delete dd; delete dd;
} }
AutotestPluginPrivate::AutotestPluginPrivate(AutotestPlugin *parent) AutotestPluginPrivate::AutotestPluginPrivate()
: q(parent)
{ {
dd = this; // Needed as the code below access it via the static plugin interface dd = this; // Needed as the code below access it via the static plugin interface
m_frameworkManager = TestFrameworkManager::instance(); m_frameworkManager = TestFrameworkManager::instance();
@@ -258,7 +255,7 @@ bool AutotestPlugin::initialize(const QStringList &arguments, QString *errorStri
Q_UNUSED(arguments) Q_UNUSED(arguments)
Q_UNUSED(errorString) Q_UNUSED(errorString)
dd = new AutotestPluginPrivate(this); dd = new AutotestPluginPrivate;
return true; return true;
} }