Commit e62f3bc8 authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by Tobias Hunger
Browse files

KitAreaWidget: fix crash on quit



Change-Id: I70145eae04f2fc885846215796e54578d7a9c897
Task-number: QTCREATORBUG-13258
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 7e72b477
......@@ -549,13 +549,20 @@ KitAreaWidget::KitAreaWidget(QWidget *parent) : QWidget(parent),
m_layout(new QGridLayout(this)), m_kit(0)
{
m_layout->setMargin(3);
}
KitAreaWidget::~KitAreaWidget()
{
setKit(0);
}
void KitAreaWidget::setKit(Kit *k)
{
if (k == m_kit)
return;
foreach (KitConfigWidget *w, m_widgets)
w->deleteLater();
delete(w);
m_widgets.clear();
foreach (QLabel *l, m_labels)
l->deleteLater();
......
......@@ -95,6 +95,7 @@ class KitAreaWidget : public QWidget
Q_OBJECT
public:
explicit KitAreaWidget(QWidget *parent = 0);
~KitAreaWidget();
public slots:
void setKit(ProjectExplorer::Kit *k);
......
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