diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 125c6c219330a78947cf69030bd4f4c60a201835..6a6708506c8dec69b5d9d98c9f3e503dd4489ab9 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -737,6 +737,8 @@ ProjectWindow::ProjectWindow(QWidget *parent) ProjectWindow::~ProjectWindow() { + qDeleteAll(m_panels); + m_panels.clear(); } void ProjectWindow::projectAdded() @@ -775,6 +777,9 @@ void ProjectWindow::showProperties(Project *project) // Remove the tabs from the tab widget first m_panelsWidget->clear(); + qDeleteAll(m_panels); + m_panels.clear(); + m_panelsWidget->addWidget(tr("Active Build and Run Configurations"), m_activeConfigurationWidget); m_panelsWidget->addWidget(m_spacerBetween); m_panelsWidget->addWidget(m_projectChooser); @@ -788,6 +793,7 @@ void ProjectWindow::showProperties(Project *project) if (debug) qDebug() << "ProjectWindow - setting up project properties tab " << panel->name(); m_panelsWidget->addWidget(panel->name(), panel->widget()); + m_panels.push_back(panel); } } } diff --git a/src/plugins/projectexplorer/projectwindow.h b/src/plugins/projectexplorer/projectwindow.h index 2ad04af4cbf46a5473bf3e8f559e9d771ea7242b..c183a92805f02302a3c6249d523a285fcc6be04f 100644 --- a/src/plugins/projectexplorer/projectwindow.h +++ b/src/plugins/projectexplorer/projectwindow.h @@ -191,6 +191,7 @@ private: QWidget *m_projectChooser; QLabel *m_noprojectLabel; PanelsWidget *m_panelsWidget; + QList<PropertiesPanel *> m_panels; };