-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 @@ -39,19 +39,20 @@ #include <qmessagebox.h> #include <qaction.h> #include <qapplication.h> #include <qfontmetrics.h> #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> //#include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> @@ -1071,17 +1072,17 @@ void Konsole::editCommandListMenuSelected(int iD) commonCombo->setFocusPolicy(QWidget::NoFocus); te->setFocus(); } } if(iD == -24) { // "edit commands" CommandEditDialog *m = new CommandEditDialog(this); connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList())); - m->showMaximized(); + QPEApplication::showDialog( m ); } } // $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V' void Konsole::setDocument( const QString &cmd) { newSession(); TEWidget* te = getTe(); 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 @@ -937,18 +937,17 @@ bool TextEdit::saveAs() { return false; } if( filePerms ) { filePermissions *filePerm; filePerm = new filePermissions(this, tr("Permissions"),true, 0,(const QString &)fileNm); - filePerm->showMaximized(); - filePerm->exec(); + QPEApplication::execDialog( filePerm ); if( filePerm) delete filePerm; } // } editor->setEdited( false); edited1 = false; edited = false; @@ -1011,18 +1010,17 @@ void TextEdit::setDocument(const QString& fileref) { void TextEdit::changeFont() { QDialog *d = new QDialog ( this, "FontDialog", true ); d-> setCaption ( tr( "Choose font" )); QBoxLayout *lay = new QVBoxLayout ( d ); 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; } void TextEdit::editDelete() { switch ( QMessageBox::warning(this,tr("Text Editor"), tr("Do you really want<BR>to <B>delete</B> " 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 @@ -944,18 +944,17 @@ void PlayListWidget::listDelete() { break; case 1: { file = audioView->currentItem()->text(0); 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(); } break; case 2: { // file = videoView->selectedItem()->text(0); 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 @@ -525,18 +525,17 @@ void AbEditor::saveEntry() QString str = txtNote->text(); if ( !str.isNull() ) ent.setNotes( str ); } void AbEditor::slotNote() { - dlgNote->showMaximized(); - if ( !dlgNote->exec() ) { + if ( ! QPEApplication::execDialog( &dlgNote ) ) { // reset the note... txtNote->setText( ent.notes() ); } } void AbEditor::setNameFocus() { firstEdit->setFocus(); 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 @@ -277,18 +277,17 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, isLoading = false; } 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!"); m_curFontSize = m_config.fontSize(); emit slotSetFont( m_curFontSize ); } m_abView -> setListOrder( m_config.orderList() ); @@ -745,22 +744,19 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) } if ( entryMode == EditEntry ) abEditor->setEntry( m_abView -> currentEntry() ); else if ( entryMode == NewEntry ) 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(); m_abView -> addEntry( insertEntry ); m_abView -> setCurrentUid( insertEntry.uid() ); } else { OContact replEntry = abEditor->entry(); 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 @@ -1078,33 +1078,31 @@ void ContactEditor::accept() { cleanupFields(); QDialog::accept(); } } void ContactEditor::slotNote() { - dlgNote->showMaximized(); - if ( !dlgNote->exec() ) { + if ( ! QPEApplication::execDialog( dlgNote ) ) { txtNote->setText( ent.notes() ); } } void ContactEditor::slotName() { QString tmpName; txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); 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(); txtFullName->setText( tmpName.simplifyWhiteSpace() ); slotFullNameChange( txtFullName->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 @@ -260,22 +260,17 @@ 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; weeklistviewconfig=frmSettings.comboWeekListView->currentItem(); defaultLocation=frmSettings.comboLocation->currentText(); @@ -432,20 +427,17 @@ void DateBook::duplicateEvent( const Event &e ) sv->setResizePolicy( QScrollView::AutoOneFit ); // KLUDGE!!! 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; } /* * The problem: @@ -481,20 +473,17 @@ void DateBook::editEvent( const Event &e ) sv->setResizePolicy( QScrollView::AutoOneFit ); // KLUDGE!!! 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()) { if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) continue; } @@ -702,20 +691,17 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) view->setResizePolicy( QScrollView::AutoOneFit ); vb->addWidget( view ); 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()" ) { needShow = true; if ( !qApp-> activeWindow ( )) { @@ -897,20 +883,17 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const } ev.setCategories(defaultCategories); 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; } db->addEvent( ev ); 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 @@ -244,20 +244,17 @@ DateEntry::~DateEntry() void DateEntry::slotEditNote() { QString s; s = "<B>"+ TimeString::longDateString( startDate ) + "</B>"; // 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(); } } void DateEntry::endDateChanged( int y, int m, int d ) { endDate.setYMD( y, m, d ); @@ -390,20 +387,17 @@ void DateEntry::slotRepeat() // it is better in my opinion to just grab this from the mother, // since, this dialog doesn't need to keep track of it... if ( rp.type != Event::NoRepeat ) 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... delete e; } void DateEntry::slotChangeStartOfWeek( bool onMonday ) 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 @@ -224,34 +224,31 @@ Show* MainWindow::eventShow() { return m_show; } 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(); } } void MainWindow::hideShow() { } void MainWindow::viewPopup(int ) { 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 @@ -1023,18 +1023,17 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { QPushButton* btnOk = new QPushButton( tr("Ok"), &dlg ); connect( btnOk, SIGNAL(clicked() ), &dlg, SLOT(accept() ) ); lay->addWidget( btnOk ); 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(); if (needToStay) { // showMaximized(); // raise(); QPEApplication::setKeepRunning(); 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,9 +1,11 @@ +#include <qpe/qpeapplication.h> + #include "otaskeditor.h" #include "todoeditor.h" using namespace Todo; Editor::Editor() { m_accepted = false; m_self = 0l; @@ -14,20 +16,18 @@ Editor::~Editor() { } OTodo Editor::newTodo( int cur, QWidget*) { 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; OTodo ev = e->todo(); qWarning("Todo uid"); qWarning("Todo %s %d %d", ev.summary().latin1(), ev.progress(), ev.isCompleted() ); @@ -36,18 +36,17 @@ OTodo Editor::newTodo( int cur, return ev; } OTodo Editor::edit( QWidget *, const OTodo& todo ) { 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; else m_accepted = false; return ev; 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 @@ -28,16 +28,17 @@ #include "light.h" #include <qpe/config.h> #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> #include <qslider.h> #include <qspinbox.h> #include <qpushbutton.h> #include <qgroupbox.h> @@ -196,18 +197,17 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) 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 ( ) { Sensor *s = new Sensor ( m_sensordata_ac, this ); connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); s-> showMaximized ( ); |