From: Heli Hyvättinen Date: Wed, 24 Nov 2010 11:53:43 +0000 (+0200) Subject: An attempt to fix occasional crashing when re-entering the application X-Git-Tag: v0.4.0~30 X-Git-Url: http://vcs.maemo.org/git/?p=kitchenalert;a=commitdiff_plain;h=a692f42c73fadb0992cf46e04d67b3d9be24fd63 An attempt to fix occasional crashing when re-entering the application --- diff --git a/src/kitchenalertmainwindow.cpp b/src/kitchenalertmainwindow.cpp index f65a002..3d9a8dc 100644 --- a/src/kitchenalertmainwindow.cpp +++ b/src/kitchenalertmainwindow.cpp @@ -301,8 +301,6 @@ void KitchenAlertMainWindow::openAbout() bool KitchenAlertMainWindow::event(QEvent *event) { - QMainWindow::event(event); - switch (event->type()) @@ -311,9 +309,7 @@ bool KitchenAlertMainWindow::event(QEvent *event) model_.setUpdateViewOnChanges(true); ui->debugLabel->setText("Returned to the application!"); - - - break; + break; case QEvent::WindowDeactivate: model_.setUpdateViewOnChanges(false); @@ -323,8 +319,9 @@ bool KitchenAlertMainWindow::event(QEvent *event) default: break; - } + + return QMainWindow::event(event); // Send the event to the base class implementation (also when handling the event in this function): necessary for the program to work! } void KitchenAlertMainWindow::disableSelectionDependentButtons()