-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 5 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 6 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/abeditor.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 8 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 6 | ||||
-rw-r--r-- | core/pim/datebook/datebook.cpp | 27 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 10 | ||||
-rw-r--r-- | core/pim/datebook2/mainwindow.cpp | 9 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/todoeditor.cpp | 9 | ||||
-rw-r--r-- | core/settings/light-and-power/light.cpp | 4 |
12 files changed, 28 insertions, 65 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index a5adc03..ce8fb6b 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -43,11 +43,12 @@ #include <qcombobox.h> #include <qevent.h> #include <qtabwidget.h> #include <qtabbar.h> -#include <qpe/config.h> #include <qstringlist.h> #include <qpalette.h> +#include <qpe/config.h> +#include <qpe/qpeapplication.h> #include <unistd.h> #include <pwd.h> #include <sys/types.h> @@ -1075,9 +1076,9 @@ void Konsole::editCommandListMenuSelected(int iD) if(iD == -24) { // "edit commands" CommandEditDialog *m = new CommandEditDialog(this); connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList())); - m->showMaximized(); + QPEApplication::showDialog( m ); } } diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index be18140..1299fe3 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -941,10 +941,9 @@ bool TextEdit::saveAs() { filePermissions *filePerm; filePerm = new filePermissions(this, tr("Permissions"),true, 0,(const QString &)fileNm); - filePerm->showMaximized(); - filePerm->exec(); + QPEApplication::execDialog( filePerm ); if( filePerm) delete filePerm; } @@ -1015,10 +1014,9 @@ void TextEdit::changeFont() { OFontSelector *ofs = new OFontSelector ( true, d ); lay-> addWidget ( ofs ); ofs-> setSelectedFont ( editor-> font ( )); - d-> showMaximized ( ); - if ( d-> exec ( ) == QDialog::Accepted ) + if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) editor-> setFont ( ofs-> selectedFont ( )); delete d; } diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 5fb605b..82fd1e1 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -948,10 +948,9 @@ void PlayListWidget::listDelete() { QListIterator<DocLnk> Pdit( files.children() ); for ( ; Pdit.current(); ++Pdit ) { if( Pdit.current()->name() == file) { LnkProperties prop( Pdit.current() ); - prop.showMaximized(); - prop.exec(); + QPEApplication::execDialog( &prop ); } } populateAudioView(); } diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp index 91e8722..75e7ede 100644 --- a/core/pim/addressbook/abeditor.cpp +++ b/core/pim/addressbook/abeditor.cpp @@ -529,10 +529,9 @@ void AbEditor::saveEntry() } void AbEditor::slotNote() { - dlgNote->showMaximized(); - if ( !dlgNote->exec() ) { + if ( ! QPEApplication::execDialog( &dlgNote ) ) { // reset the note... txtNote->setText( ent.notes() ); } } diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 00cd2a6..1c7ddd4 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -281,10 +281,9 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, void AddressbookWindow::slotConfig() { ConfigDlg* dlg = new ConfigDlg( this, "Config" ); dlg -> setConfig( m_config ); - dlg -> showMaximized(); - if ( dlg -> exec() ) { + if ( QPEApplication::execDialog( dlg ) ) { qWarning ("Config Dialog accepted!"); m_config = dlg -> getConfig(); if ( m_curFontSize != m_config.fontSize() ){ qWarning("Font was changed!"); @@ -749,14 +748,11 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) abEditor->setEntry( entry ); // other things may change the caption. abEditor->setCaption( tr("Edit Address") ); -#if defined(Q_WS_QWS) || defined(_WS_QWS_) - abEditor->showMaximized(); -#endif // fix the foxus... abEditor->setNameFocus(); - if ( abEditor->exec() ) { + if ( QPEApplication::execDialog( abEditor ) ) { setFocus(); if ( entryMode == NewEntry ) { OContact insertEntry = abEditor->entry(); insertEntry.assignUid(); diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 8fbd065..7932781 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -1082,10 +1082,9 @@ void ContactEditor::accept() { } void ContactEditor::slotNote() { - dlgNote->showMaximized(); - if ( !dlgNote->exec() ) { + if ( ! QPEApplication::execDialog( dlgNote ) ) { txtNote->setText( ent.notes() ); } } @@ -1097,10 +1096,9 @@ void ContactEditor::slotName() { txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); // txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); - dlgName->showMaximized(); - if ( dlgName->exec() ) { + if ( QPEApplication::execDialog( dlgName ) ) { if ( txtLastName->text().contains( ' ', TRUE ) ) tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text(); else tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text(); 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 @@ -264,14 +264,9 @@ void DateBook::slotSettings() 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(); @@ -436,12 +431,9 @@ void DateBook::duplicateEvent( const Event &e ) 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) @@ -485,12 +477,9 @@ void DateBook::editEvent( const Event &e ) 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 @@ -706,12 +695,9 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) 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 ); } @@ -901,12 +887,9 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const 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() ) { diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index d9e5225..856837c 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -248,12 +248,9 @@ void DateEntry::slotEditNote() { // s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, this,0,TRUE); -#if defined(Q_WS_QWS) || defined(_WS_QWS_) - noteDlg.showMaximized(); -#endif - if (noteDlg.exec() ) { + if ( QPEApplication::execDialog( ¬eDlg ) ) { noteStr=noteDlg.note->text(); } } @@ -394,12 +391,9 @@ void DateEntry::slotRepeat() e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); else e = new RepeatEntry( startWeekOnMonday, startDate, this ); -#if defined(Q_WS_QWS) || defined(_WS_QWS_) - e->showMaximized(); -#endif - if ( e->exec() ) { + if ( QPEApplication::execDialog( e ) ) { rp = e->repeatPattern(); setRepeatLabel(); } // deleting sounds like a nice idea... diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp index be30415..7ff2204 100644 --- a/core/pim/datebook2/mainwindow.cpp +++ b/core/pim/datebook2/mainwindow.cpp @@ -228,26 +228,23 @@ void MainWindow::slotAction( QAction* act ) { } void MainWindow::slotConfigureLocs() { LocationManagerDialog dlg( locationManager() ); dlg.setCaption( tr("Configure Locations") ); - dlg.showMaximized(); - if (dlg.exec() == QDialog::Accepted ) { + if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) { setLocationManager( dlg.manager() ); } } void MainWindow::slotConfigureDesc() { DescriptionManagerDialog dlg( descriptionManager() ); dlg.setCaption( tr("Configure Descriptions") ); - dlg.showMaximized(); - if (dlg.exec() == QDialog::Accepted ) { + if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) { setDescriptionManager( dlg.manager() ); } } void MainWindow::slotConfigureTemp() { TemplateDialog dlg( templateManager(), editor() ); dlg.setCaption( tr("Configure Templates") ); - dlg.showMaximized(); - if ( dlg.exec() == QDialog::Accepted ) { + if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) { m_tempMan = dlg.manager(); setTemplateMenu(); } } diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index d06a405..fc189bd 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -1027,10 +1027,9 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { QString text = tr("<h1>Alarm at %1</h1><br>").arg( TimeString::dateString( dt ) ); text += todo.toRichText(); view->setText( text ); - dlg.showMaximized(); - bool needToStay = dlg.exec(); + bool needToStay = QPEApplication::execDialog( &dlg ); if (loud) killAlarm(); diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index c204325..78aedd6 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp @@ -1,5 +1,7 @@ +#include <qpe/qpeapplication.h> + #include "otaskeditor.h" #include "todoeditor.h" using namespace Todo; @@ -18,12 +20,10 @@ OTodo Editor::newTodo( int cur, OTaskEditor *e = self(); e->setCaption( QObject::tr("Enter Task") ); e->init( cur ); + int ret = QPEApplication::execDialog( e ); - e->showMaximized(); - - int ret = e->exec(); if ( QDialog::Accepted == ret ) { m_accepted = true; }else m_accepted = false; @@ -40,10 +40,9 @@ OTodo Editor::edit( QWidget *, OTaskEditor *e = self(); e->init( todo ); e->setCaption( QObject::tr( "Edit Task" ) ); - e->showMaximized(); - int ret = e->exec(); + int ret = QPEApplication::execDialog( e ); OTodo ev = e->todo(); if ( ret == QDialog::Accepted ) m_accepted = true; diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index d6d09a1..b21215b 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -32,8 +32,9 @@ #include <qpe/power.h> #if defined(Q_WS_QWS) && !defined(QT_NO_COP) #include <qpe/qcopenvelope_qws.h> #endif +#include <qpe/qpeapplication.h> #include <qlabel.h> #include <qcheckbox.h> #include <qtabwidget.h> @@ -200,10 +201,9 @@ LightSettings::~LightSettings ( ) void LightSettings::calibrateSensor ( ) { Sensor *s = new Sensor ( m_sensordata, this ); connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); - s-> showMaximized ( ); - s-> exec ( ); + QPEApplication::execDialog( s ); delete s; } void LightSettings::calibrateSensorAC ( ) |