author | ar <ar> | 2004-02-07 23:52:31 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-07 23:52:31 (UTC) |
commit | 6582895befc98131430710191238a93b9dde161c (patch) (side-by-side diff) | |
tree | d050483742d0e102e08138bcdd8f170a9558b12d | |
parent | 3f261fa6eac46b8d0d4ac8b8bb95b385435004da (diff) | |
download | opie-6582895befc98131430710191238a93b9dde161c.zip opie-6582895befc98131430710191238a93b9dde161c.tar.gz opie-6582895befc98131430710191238a93b9dde161c.tar.bz2 |
QPEApplication::showDialog() and QPEAPplication::execDialog() for better big screen handling
-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 @@ -35,27 +35,28 @@ #include <qfontdialog.h> #include <qglobal.h> #include <qpainter.h> #include <qmenubar.h> #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> #include "konsole.h" #include "keytrans.h" #include "commandeditdialog.h" @@ -1067,25 +1068,25 @@ void Konsole::editCommandListMenuSelected(int iD) } else { commonCombo->setEditable( FALSE ); configMenu->setItemChecked(iD,FALSE); cfg.writeEntry("EditEnabled","FALSE"); 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(); if(cmd.find("-e", 0, TRUE) != -1) { QString cmd2; cmd2=cmd.right(cmd.length()-3)+" &"; system(cmd2.latin1()); 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 @@ -933,26 +933,25 @@ bool TextEdit::saveAs() { updateCaption( currentFileName); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { 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; if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); return true; @@ -1007,26 +1006,25 @@ void TextEdit::setDocument(const QString& fileref) { } updateCaption( currentFileName); } 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> " "the current file\nfrom the disk?<BR>This is " "<B>irreversable!</B>"), tr("Yes"),tr("No"),0,0,1) ) { case 0: 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 @@ -940,26 +940,25 @@ void PlayListWidget::listDelete() { QString file; // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); switch ( tabWidget->currentPageIndex()) { case 0: 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); // for ( int i = 0; i < noOfFiles; i++ ) { // QString entryName; // entryName.sprintf( "File%i", i + 1 ); // QString linkFile = cfg.readEntry( entryName ); 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 @@ -521,26 +521,25 @@ void AbEditor::saveEntry() } int gender = genderCombo->currentItem(); ent.setGender( QString::number( gender ) ); 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(); } void parseEmailFrom( const QString &txt, QString &strDefaultEmail, QString &strAll ) 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 @@ -273,26 +273,25 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, connect( qApp, SIGNAL( appMessage(const QCString &, const QByteArray &) ), this, SLOT( appMessage(const QCString &, const QByteArray &) ) ); 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() ); } delete dlg; } @@ -741,30 +740,27 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) { OContact entry; if ( !abEditor ) { abEditor = new ContactEditor( entry, this, "editor" ); } 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(); if ( !replEntry.isValidUid() ) replEntry.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 @@ -1074,41 +1074,39 @@ void ContactEditor::accept() { cleanupFields(); reject(); } else { saveEntry(); 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() ); } } void ContactEditor::setNameFocus() { 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 @@ -256,30 +256,25 @@ void DateBook::slotSettings() if ( frmSettings.comboLocation->text(i) == defaultLocation ) { frmSettings.comboLocation->setCurrentItem(i); found=true; break; } } 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(); defaultCategories=frmSettings.comboCategory->currentCategories(); if ( dayView ) { dayView->setStartViewTime( startTime ); @@ -428,28 +423,25 @@ void DateBook::duplicateEvent( const Event &e ) DateEntry *entry; editDlg.setCaption( tr("Duplicate Event") ); QVBoxLayout *vb = new QVBoxLayout( &editDlg ); QScrollView *sv = new QScrollView( &editDlg, "scrollview" ); 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: * DateBookDB does remove repeating events not by uid but by the time * the recurrence was created * so we need to update that time as well */ @@ -477,28 +469,25 @@ void DateBook::editEvent( const Event &e ) DateEntry *entry; editDlg.setCaption( tr("Edit Event") ); QVBoxLayout *vb = new QVBoxLayout( &editDlg ); QScrollView *sv = new QScrollView( &editDlg, "scrollview" ); 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; } db->editEvent(e, newEv); emit newEvent(); break; } @@ -698,28 +687,25 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) } QDialog dlg( this, 0, TRUE ); QVBoxLayout *vb = new QVBoxLayout( &dlg ); QScrollView *view = new QScrollView( &dlg, "scrollView"); 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 ( )) { needShow = TRUE; } else { QWidget* cur = views->visibleWidget(); if ( cur ) { @@ -893,28 +879,25 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const ev.setLocation( defaultLocation ); } } else { ev.setLocation(location); } 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 ); emit newEvent(); break; } } 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 @@ -240,28 +240,25 @@ DateEntry::~DateEntry() /* * public slot */ 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 ); if ( endDate < startDate ) { endDate = startDate; } @@ -386,28 +383,25 @@ void DateEntry::typeChanged( const QString &s ) void DateEntry::slotRepeat() { // Work around for compiler Bug.. RepeatEntry *e; // 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 ) { startWeekOnMonday = 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 @@ -220,42 +220,39 @@ void MainWindow::setLocationManager( const LocationManager& loc) { void MainWindow::setDescriptionManager( const DescriptionManager& dsc ) { m_descMan = dsc; } 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 ) { } void MainWindow::viewAdd(const QDate& ) { 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 @@ -1019,26 +1019,25 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { QDialog dlg(this, 0, TRUE ); QVBoxLayout* lay = new QVBoxLayout( &dlg ); QTextView* view = new QTextView( &dlg ); lay->addWidget( view ); 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(); // setActiveWindow(); } } 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,57 +1,56 @@ +#include <qpe/qpeapplication.h> + #include "otaskeditor.h" #include "todoeditor.h" using namespace Todo; Editor::Editor() { m_accepted = false; m_self = 0l; } Editor::~Editor() { delete m_self; m_self = 0; } 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() ); ev.setUid(1); 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; } bool Editor::accepted()const { return m_accepted; } 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 @@ -24,24 +24,25 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #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> #include <qcombobox.h> #include <opie/odevice.h> @@ -192,26 +193,25 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); } 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 ( ); s-> exec ( ); delete s; } |