summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 44f1515..706cc08 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -262,18 +262,13 @@ void DateBook::slotSettings()
if(!found) {
frmSettings.comboLocation->insertItem(defaultLocation);
frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1);
}
frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar"));
-#if defined (Q_WS_QWS) || defined(_WS_QWS_)
- frmSettings.showMaximized();
-#endif
-
- if ( frmSettings.exec() ) {
-
+ if ( QPEApplication::execDialog( &frmSettings ) ) {
aPreset = frmSettings.alarmPreset();
presetTime = frmSettings.presetTime();
startTime = frmSettings.startTime();
bJumpToCurTime = frmSettings.jumpToCurTime();
rowStyle = frmSettings.rowStyle();
defaultView=frmSettings.comboDefaultView->currentItem()+1;
@@ -434,16 +429,13 @@ void DateBook::duplicateEvent( const Event &e )
sv->setHScrollBarMode( QScrollView::AlwaysOff );
vb->addWidget( sv );
entry = new DateEntry( onMonday, dupevent, ampm, &editDlg, "editor" );
entry->timezone->setEnabled( FALSE );
sv->addChild( entry );
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
- editDlg.showMaximized();
-#endif
- while (editDlg.exec() ) {
+ while ( QPEApplication::execDialog( &editDlg ) ) {
Event newEv = entry->event();
QString error = checkEvent(newEv);
if (!error.isNull()) {
if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0)
continue;
}
@@ -483,16 +475,13 @@ void DateBook::editEvent( const Event &e )
sv->setHScrollBarMode( QScrollView::AlwaysOff );
vb->addWidget( sv );
entry = new DateEntry( onMonday, e, ampm, &editDlg, "editor" );
entry->timezone->setEnabled( FALSE );
sv->addChild( entry );
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
- editDlg.showMaximized();
-#endif
- while (editDlg.exec() ) {
+ while ( QPEApplication::execDialog( &editDlg ) ) {
Event newEv = entry->event();
if(newEv.description().isEmpty() && newEv.notes().isEmpty() )
break;
newEv.setUid(e.uid()); // FIXME: Hack not to clear uid
QString error = checkEvent(newEv);
if (!error.isNull()) {
@@ -704,16 +693,13 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
QLabel *lblMsg = new QLabel( msg, &dlg );
view->addChild( lblMsg );
QPushButton *cmdOk = new QPushButton( tr("OK"), &dlg );
connect( cmdOk, SIGNAL(clicked()), &dlg, SLOT(accept()) );
vb->addWidget( cmdOk );
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
- dlg.showMaximized();
-#endif
- needShow = dlg.exec();
+ needShow = QPEApplication::execDialog( &dlg );
if ( bSound )
killTimer( stopTimer );
}
}
} else if ( msg == "nextView()" ) {
@@ -899,16 +885,13 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const
ev.setStart( start );
ev.setEnd( end );
e = new DateEntry( onMonday, ev, ampm, &newDlg );
e->setAlarmEnabled( aPreset, presetTime, Event::Loud );
sv->addChild( e );
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
- newDlg.showMaximized();
-#endif
- while (newDlg.exec()) {
+ while ( QPEApplication::execDialog( &newDlg ) ) {
ev = e->event();
ev.assignUid();
QString error = checkEvent( ev );
if ( !error.isNull() ) {
if ( QMessageBox::warning( this, tr("Error!"), error, tr("Fix it"), tr("Continue"), 0, 0, 1 ) == 0 )
continue;