Commit 49ffe0fb authored by hjk's avatar hjk

QmlProfiler: Disconnect some signals on shutdown

It's a workaround, not a proper solution (as indicated by the
SOFT ASSERT: "d->m_profilerState" in file qmlprofilerruncontrol.cpp,
line 144 triggering) The state manager (and possibly more)
is referenced from potentially running run controls, that are ramped
down after the plugin.

Task-number: QTCREATORBUG-18736
Change-Id: Ia20b168fe640c818276a777e1d23feab0cacd565
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent a0c26a92
...@@ -89,7 +89,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS ...@@ -89,7 +89,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
void QmlProfilerPlugin::extensionsInitialized() void QmlProfilerPlugin::extensionsInitialized()
{ {
(void) new QmlProfilerTool(this); m_profilerTool = new QmlProfilerTool(this);
addAutoReleasedObject(new QmlProfilerOptionsPage); addAutoReleasedObject(new QmlProfilerOptionsPage);
...@@ -111,6 +111,8 @@ void QmlProfilerPlugin::extensionsInitialized() ...@@ -111,6 +111,8 @@ void QmlProfilerPlugin::extensionsInitialized()
ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
{ {
delete m_profilerTool;
// Save settings. // Save settings.
// Disconnect from signals that are not needed during shutdown // Disconnect from signals that are not needed during shutdown
// Hide UI (if you add UI that is not in the main window directly) // Hide UI (if you add UI that is not in the main window directly)
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
namespace QmlProfiler { namespace QmlProfiler {
namespace Internal { namespace Internal {
class QmlProfilerTool;
class QmlProfilerPlugin : public ExtensionSystem::IPlugin class QmlProfilerPlugin : public ExtensionSystem::IPlugin
{ {
Q_OBJECT Q_OBJECT
...@@ -47,6 +49,9 @@ public: ...@@ -47,6 +49,9 @@ public:
static QmlProfilerSettings *globalSettings(); static QmlProfilerSettings *globalSettings();
QList<QObject *> createTestObjects() const override; QList<QObject *> createTestObjects() const override;
private:
QmlProfilerTool *m_profilerTool;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -64,7 +64,7 @@ static QString QmlServerUrl = "QmlServerUrl"; ...@@ -64,7 +64,7 @@ static QString QmlServerUrl = "QmlServerUrl";
class QmlProfilerRunner::QmlProfilerRunnerPrivate class QmlProfilerRunner::QmlProfilerRunnerPrivate
{ {
public: public:
QmlProfilerStateManager *m_profilerState = 0; QPointer<QmlProfilerStateManager> m_profilerState;
}; };
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment