summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index f29001a..60aea42 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -33,17 +33,17 @@
#include "checkbook.h"
#include "listedit.h"
#include <qpe/config.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
-#include <qmenubar.h>
#include <qpe/qpemessagebox.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
+#include <qmenubar.h>
#include <qaction.h>
#include <qcheckbox.h>
#include <qdir.h>
#include <qlineedit.h>
#include <qwhatsthis.h>
@@ -211,14 +211,13 @@ void MainWindow::buildFilename( const QString &name )
void MainWindow::slotNew()
{
CBInfo *cb = new CBInfo();
Checkbook *currcb = new Checkbook( this, cb, &_cfg );
- currcb->showMaximized();
- if ( currcb->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted )
{
// Save new checkbook
buildFilename( cb->name() );
_cfg.setLastBook( cb->name() );
cb->setFilename( tempFilename );
cb->write();
@@ -269,14 +268,13 @@ void MainWindow::openBook(QListViewItem *curritem)
}
delete pw;
}
_cfg.setLastBook( currname );
Checkbook *currcb = new Checkbook( this, cb, &_cfg );
- currcb->showMaximized();
- if ( currcb->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted )
{
QString newname = cb->name();
if ( currname != newname )
{
// Update name if changed
if( curritem ) {
@@ -342,14 +340,13 @@ void MainWindow::slotDelete()
}
// --- slotConfigure ----------------------------------------------------------
void MainWindow::slotConfigure()
{
Configuration *cfgdlg = new Configuration( this, _cfg );
- cfgdlg->showMaximized();
- if ( cfgdlg->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( cfgdlg ) == QDialog::Accepted )
{
// read data from config dialog & save it
cfgdlg->saveConfig( _cfg );
writeConfig();
buildList();
}