diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index 6dc95b2bf05..5ac6f7e2df2 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -110,9 +110,12 @@ OutputPane::OutputPane() connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int))); m_mainWidget->setLayout(layout); + + connect(Core::ICore::instance(), SIGNAL(coreAboutToClose()), + this, SLOT(coreAboutToClose())); } -OutputPane::~OutputPane() +void OutputPane::coreAboutToClose() { while (m_tabWidget->count()) { RunControl *rc = runControlForTab(0); @@ -120,6 +123,10 @@ OutputPane::~OutputPane() rc->stop(); closeTab(0); } +} + +OutputPane::~OutputPane() +{ delete m_mainWidget; } diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h index edc39ac2fb2..ceafb0a36a0 100644 --- a/src/plugins/projectexplorer/outputwindow.h +++ b/src/plugins/projectexplorer/outputwindow.h @@ -84,6 +84,7 @@ public: public slots: void projectRemoved(); + void coreAboutToClose(); private slots: void insertLine();