X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fkitchenalertmainwindow.cpp;h=f65a002718375f71cbdf29436074b6dadf9130f6;hb=dfa2785310e26af75c39038314d0dd1d2f19b600;hp=fbc6c5de6ab826648ba8c1b75cfc83c4a85854be;hpb=683d958489cb5181a1a8c5a348191aaeed03981b;p=kitchenalert diff --git a/src/kitchenalertmainwindow.cpp b/src/kitchenalertmainwindow.cpp index fbc6c5d..f65a002 100644 --- a/src/kitchenalertmainwindow.cpp +++ b/src/kitchenalertmainwindow.cpp @@ -173,8 +173,9 @@ void KitchenAlertMainWindow::alert(QModelIndex indexOfAlerter) // The program is brought to front and activated when alerted - raise(); + activateWindow(); + raise(); // The alerting timer is selected ui->ComingAlertsTableView->selectionModel()->select(QItemSelection(indexOfAlerter,indexOfAlerter),QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows ); @@ -306,7 +307,7 @@ bool KitchenAlertMainWindow::event(QEvent *event) switch (event->type()) { - case QEvent::ApplicationActivate: + case QEvent::WindowActivate: model_.setUpdateViewOnChanges(true); ui->debugLabel->setText("Returned to the application!"); @@ -314,7 +315,7 @@ bool KitchenAlertMainWindow::event(QEvent *event) break; - case QEvent::ApplicationDeactivate: + case QEvent::WindowDeactivate: model_.setUpdateViewOnChanges(false); ui->debugLabel->setText(""); break;