author | drw <drw> | 2005-03-01 18:59:12 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-01 18:59:12 (UTC) |
commit | 09c95ae28f4500ae0bb81f6ed305f877950626e8 (patch) (unidiff) | |
tree | 4a53904008c8fc27845bbf6763a1419105b8d5fc | |
parent | 2f2b707684582cfa97c96c5fabab2197a7c7f307 (diff) | |
download | opie-09c95ae28f4500ae0bb81f6ed305f877950626e8.zip opie-09c95ae28f4500ae0bb81f6ed305f877950626e8.tar.gz opie-09c95ae28f4500ae0bb81f6ed305f877950626e8.tar.bz2 |
Fix SIGSEV I created with last update
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index 486257f..01d9a98 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp | |||
@@ -75,4 +75,4 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags | |||
75 | config.setGroup( "settings" ); | 75 | config.setGroup( "settings" ); |
76 | slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", FALSE ) ); | 76 | slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", false ) ); |
77 | slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", FALSE ) ); | 77 | slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", false ) ); |
78 | 78 | ||
@@ -130,6 +130,6 @@ void MainWindow::accept() | |||
130 | // Update the systemtime | 130 | // Update the systemtime |
131 | timeTab->saveSettings( TRUE ); | 131 | timeTab->saveSettings( true ); |
132 | 132 | ||
133 | // Save format options | 133 | // Save format options |
134 | formatTab->saveSettings( TRUE ); | 134 | formatTab->saveSettings( true ); |
135 | 135 | ||
@@ -153,6 +153,6 @@ void MainWindow::reject() | |||
153 | // Reset time settings | 153 | // Reset time settings |
154 | timeTab->saveSettings( FALSE ); | 154 | timeTab->saveSettings( false ); |
155 | 155 | ||
156 | // Send notifications but do not save settings | 156 | // Send notifications but do not save settings |
157 | formatTab->saveSettings( FALSE ); | 157 | formatTab->saveSettings( false ); |
158 | 158 | ||
@@ -187,2 +187,3 @@ void MainWindow::runNTP() | |||
187 | ntpTab->addNtpOutput( output ); | 187 | ntpTab->addNtpOutput( output ); |
188 | ntpTab->setNTPBtnEnabled( false ); | ||
188 | } | 189 | } |
@@ -190,3 +191,2 @@ void MainWindow::runNTP() | |||
190 | // Disable set time buttons & change app caption to indicate time update is happening | 191 | // Disable set time buttons & change app caption to indicate time update is happening |
191 | ntpTab->setNTPBtnEnabled( false ); | ||
192 | timeTab->setNTPBtnEnabled( false ); | 192 | timeTab->setNTPBtnEnabled( false ); |
@@ -212,6 +212,8 @@ void MainWindow::runNTP() | |||
212 | if ( ntpTabEnabled ) | 212 | if ( ntpTabEnabled ) |
213 | { | ||
213 | ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); | 214 | ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); |
215 | ntpTab->setNTPBtnEnabled( true ); | ||
216 | } | ||
214 | 217 | ||
215 | // Re-enable set time buttons & change app caption to indicate time update is happening | 218 | // Re-enable set time buttons & change app caption to indicate time update is happening |
216 | ntpTab->setNTPBtnEnabled( true ); | ||
217 | timeTab->setNTPBtnEnabled( true ); | 219 | timeTab->setNTPBtnEnabled( true ); |
@@ -281,3 +283,3 @@ void MainWindow::slotGetNTPTime() | |||
281 | { | 283 | { |
282 | ntpInteractive = TRUE; | 284 | ntpInteractive = true; |
283 | runNTP(); | 285 | runNTP(); |
@@ -287,3 +289,3 @@ void MainWindow::slotTimerGetNTPTime() | |||
287 | { | 289 | { |
288 | ntpInteractive = FALSE; | 290 | ntpInteractive = false; |
289 | runNTP(); | 291 | runNTP(); |
@@ -311,3 +313,4 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
311 | // Re-enable set time buttons & change app caption to indicate time update is happening | 313 | // Re-enable set time buttons & change app caption to indicate time update is happening |
312 | ntpTab->setNTPBtnEnabled( true ); | 314 | if ( ntpTabEnabled ) |
315 | ntpTab->setNTPBtnEnabled( true ); | ||
313 | timeTab->setNTPBtnEnabled( true ); | 316 | timeTab->setNTPBtnEnabled( true ); |
@@ -336,3 +339,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
336 | int lookupCount = config.readNumEntry( "count", 0 ); | 339 | int lookupCount = config.readNumEntry( "count", 0 ); |
337 | bool lastNtp = config.readBoolEntry( "lastNtp", FALSE ); | 340 | bool lastNtp = config.readBoolEntry( "lastNtp", false ); |
338 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); | 341 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); |
@@ -373,3 +376,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) | |||
373 | config.writeEntry( "count", lookupCount ); | 376 | config.writeEntry( "count", lookupCount ); |
374 | config.writeEntry( "lastNtp", TRUE ); | 377 | config.writeEntry( "lastNtp", true ); |
375 | } | 378 | } |