From f86e2a4f725f7aa292520dd5faa7653158863548 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Fri, 21 Jun 2013 16:36:24 +0200 Subject: [PATCH] QmlProfiler: fix potential crash Change-Id: I4d8c2ae3e14905fb997fc7a7537b8a979946aa7f Reviewed-by: Kai Koehne --- plugins/qmlprofiler/localqmlprofilerrunner.cpp | 5 +++++ plugins/qmlprofiler/localqmlprofilerrunner.h | 1 + 2 files changed, 6 insertions(+) diff --git a/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/plugins/qmlprofiler/localqmlprofilerrunner.cpp index d6b3dccf970..529514c390f 100644 --- a/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -41,6 +41,11 @@ LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuratio this, SIGNAL(appendMessage(QString,Utils::OutputFormat))); } +LocalQmlProfilerRunner::~LocalQmlProfilerRunner() +{ + disconnect(&m_launcher, SIGNAL(processExited(int)), this, SLOT(spontaneousStop(int))); +} + void LocalQmlProfilerRunner::start() { QString arguments = QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(m_configuration.port); diff --git a/plugins/qmlprofiler/localqmlprofilerrunner.h b/plugins/qmlprofiler/localqmlprofilerrunner.h index 042df146252..26a9b451618 100644 --- a/plugins/qmlprofiler/localqmlprofilerrunner.h +++ b/plugins/qmlprofiler/localqmlprofilerrunner.h @@ -52,6 +52,7 @@ public: }; explicit LocalQmlProfilerRunner(const Configuration &configuration, QObject *parent = 0); + ~LocalQmlProfilerRunner(); // AbstractQmlProfilerRunner virtual void start();