-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 16 |
2 files changed, 14 insertions, 3 deletions
@@ -26,2 +26,3 @@ * #1535 - Missing line break and unnecessary location shown with Today-Calendar plugin (deller) + * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index 35d4105..c1cd796 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp @@ -69,2 +69,3 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags ntpTab = 0x0; + predictTab = 0x0; @@ -74,3 +75,2 @@ MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags mainWidget->addTab( settingsTab = new SettingsTabWidget( mainWidget ), "SettingsIcon", tr( "Settings" ) ); - mainWidget->addTab( predictTab = new PredictTabWidget( mainWidget ), "netsystemtime/predicttab", tr( "Predict" ) ); Config config( "ntp" ); @@ -277,2 +277,3 @@ void MainWindow::slotDisplayPredictTab( bool display ) { + predictTab = new PredictTabWidget( mainWidget ); } @@ -373,3 +374,8 @@ void MainWindow::slotNtpFinished( OProcess *p ) lookupCount++; - predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); + + if(predictTab) + { + predictTab->setShiftPerSec( (int)(timeShift / secsSinceLast) ); + } + config.writeEntry( "secsSinceLast", secsSinceLast ); @@ -406,3 +412,7 @@ void MainWindow::slotCheckNtp( int i ) { - predictTab->slotPredictTime(); + if(predictTab) + { + predictTab->slotPredictTime(); + } + if ( i > 0 ) |