diff --git a/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp b/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp index ec433997d93..dda136d68b2 100644 --- a/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp +++ b/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp @@ -36,7 +36,7 @@ namespace QmlProfiler { namespace Internal { -QmlProfilerOptionsPage::QmlProfilerOptionsPage() : m_widget(0) +QmlProfilerOptionsPage::QmlProfilerOptionsPage() { setId(Constants::SETTINGS); setDisplayName(tr("QML Profiler")); @@ -45,11 +45,6 @@ QmlProfilerOptionsPage::QmlProfilerOptionsPage() : m_widget(0) setCategoryIcon(QLatin1String(":/images/analyzer_category.png")); } -QmlProfilerOptionsPage::~QmlProfilerOptionsPage() -{ - delete m_widget; -} - QWidget *QmlProfilerOptionsPage::widget() { // We cannot parent the widget to the options page as it expects a QWidget as parent @@ -66,7 +61,6 @@ void QmlProfilerOptionsPage::apply() void QmlProfilerOptionsPage::finish() { delete m_widget; - m_widget = 0; } } // Internal diff --git a/src/plugins/qmlprofiler/qmlprofileroptionspage.h b/src/plugins/qmlprofiler/qmlprofileroptionspage.h index 02b621d21cc..5698902cd5f 100644 --- a/src/plugins/qmlprofiler/qmlprofileroptionspage.h +++ b/src/plugins/qmlprofiler/qmlprofileroptionspage.h @@ -32,6 +32,7 @@ #define QMLPROFILEROPTIONSPAGE_H #include +#include namespace QmlProfiler { namespace Internal { @@ -40,14 +41,13 @@ class QmlProfilerOptionsPage : public Core::IOptionsPage { public: QmlProfilerOptionsPage(); - ~QmlProfilerOptionsPage(); QWidget *widget(); void apply(); void finish(); private: - QWidget *m_widget; + QPointer m_widget; }; } // Internal