QmlProfiler: Initialize pointer to QmlProfilerConfigWidget

Change-Id: I4c7f1456f3cc35727d9f3b72d100e072960987e4
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-09-02 10:24:39 +02:00
parent 5398f4f5b1
commit 96ca7bf148

View File

@@ -36,7 +36,7 @@
namespace QmlProfiler { namespace QmlProfiler {
namespace Internal { namespace Internal {
QmlProfilerOptionsPage::QmlProfilerOptionsPage() QmlProfilerOptionsPage::QmlProfilerOptionsPage() : m_widget(0)
{ {
setId(Constants::SETTINGS); setId(Constants::SETTINGS);
setDisplayName(tr("QML Profiler")); setDisplayName(tr("QML Profiler"));
@@ -52,8 +52,9 @@ QmlProfilerOptionsPage::~QmlProfilerOptionsPage()
QWidget *QmlProfilerOptionsPage::widget() QWidget *QmlProfilerOptionsPage::widget()
{ {
// We cannot parent the widget to the options page as it expects a QWidget as parent
if (!m_widget) if (!m_widget)
m_widget = new QmlProfilerConfigWidget(QmlProfilerPlugin::globalSettings(), 0); m_widget = new QmlProfilerConfigWidget(QmlProfilerPlugin::globalSettings());
return m_widget; return m_widget;
} }