mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-24 08:06:13 +00:00
Crashfix: If the status info widget isn't removed it miraclously crashes the app on shutdown. TODO: investigate why.
This commit is contained in:
parent
e0d948863e
commit
6dd6e5f25b
1 changed files with 7 additions and 1 deletions
|
@ -117,7 +117,7 @@ CMainWindow::CMainWindow(QWidget *parent)
|
||||||
_statusBarTimer = new QTimer(this);
|
_statusBarTimer = new QTimer(this);
|
||||||
connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
|
connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
|
||||||
|
|
||||||
_statusInfo = new QLabel(this);
|
_statusInfo = new QLabel();
|
||||||
_statusInfo->hide();
|
_statusInfo->hide();
|
||||||
Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(_statusInfo);
|
Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(_statusInfo);
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,12 @@ CMainWindow::~CMainWindow()
|
||||||
|
|
||||||
removeMenus();
|
removeMenus();
|
||||||
|
|
||||||
|
// If the status info widget isn't removed it miraclously crashes the application on shutdown...
|
||||||
|
// Somehow it's deleted while being owned by the status bar, then the status bar also tries to delete is...
|
||||||
|
Core::ICore::instance()->mainWindow()->statusBar()->removeWidget( _statusInfo );
|
||||||
|
delete _statusInfo;
|
||||||
|
_statusInfo = NULL;
|
||||||
|
|
||||||
delete _AnimationDialog;
|
delete _AnimationDialog;
|
||||||
delete _AnimationSetDialog;
|
delete _AnimationSetDialog;
|
||||||
delete _SlotManagerDialog;
|
delete _SlotManagerDialog;
|
||||||
|
|
Loading…
Reference in a new issue