Diffstat (limited to 'noncore/settings/netsystemtime/ntp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index c7e3b52..53dbe46 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp | |||
@@ -58,3 +58,2 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) | |||
58 | TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); | 58 | TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); |
59 | TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); | ||
60 | TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); | 59 | TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); |
@@ -98,2 +97,5 @@ Ntp::~Ntp() | |||
98 | delete ntpProcess; | 97 | delete ntpProcess; |
98 | } | ||
99 | |||
100 | void Ntp::saveConfig(){ | ||
99 | int srvCount = ComboNtpSrv->count(); | 101 | int srvCount = ComboNtpSrv->count(); |
@@ -201,5 +203,4 @@ void Ntp::ntpFinished(OProcess *p) | |||
201 | QMessageBox::critical(this, tr("ntp error"),tr("Error while getting time form\n server")+getNtpServer()+"\n"+_ntpOutput ); | 203 | QMessageBox::critical(this, tr("ntp error"),tr("Error while getting time form\n server")+getNtpServer()+"\n"+_ntpOutput ); |
202 | TabWidgetMain->showPage( tabManualSetTime ); | ||
203 | } | 204 | } |
204 | 205 | // slotCheckNtp(-1); | |
205 | return; | 206 | return; |
@@ -207,11 +208,2 @@ void Ntp::ntpFinished(OProcess *p) | |||
207 | 208 | ||
208 | Global::writeHWClock(); | ||
209 | // since time has changed quickly load in the datebookdb | ||
210 | // to allow the alarm server to get a better grip on itself | ||
211 | // (example re-trigger alarms for when we travel back in time) | ||
212 | DateBookDB db; | ||
213 | |||
214 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); | ||
215 | // timeApplet << ""; | ||
216 | |||
217 | Config cfg("ntp",Config::User); | 209 | Config cfg("ntp",Config::User); |
@@ -308,3 +300,3 @@ void Ntp::preditctTime() | |||
308 | TextLabelPredTime->setText(predictedTime.toString()); | 300 | TextLabelPredTime->setText(predictedTime.toString()); |
309 | TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); | 301 | // TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); |
310 | } | 302 | } |
@@ -313,4 +305,5 @@ void Ntp::setPredictTime() | |||
313 | { | 305 | { |
306 | qDebug("Ntp::setPredictTime"); | ||
314 | preditctTime(); | 307 | preditctTime(); |
315 | setTime( predictedTime ); | 308 | timeButton->setTime( predictedTime ); |
316 | } | 309 | } |
@@ -319,5 +312,6 @@ void Ntp::slotCheckNtp(int i) | |||
319 | { | 312 | { |
313 | qDebug(" Ntp::slotCheckNtp(%i)",i); | ||
320 | if (i == 0) | 314 | if (i == 0) |
321 | { | 315 | { |
322 | TextLabelMainPredTime->hide(); | 316 | // TextLabelMainPredTime->hide(); |
323 | ButtonSetTime->setText( tr("Get time from network") ); | 317 | ButtonSetTime->setText( tr("Get time from network") ); |
@@ -420 +414,13 @@ void Ntp::showAdvancedFeatures(bool advMode) | |||
420 | } | 414 | } |
415 | |||
416 | |||
417 | void Ntp::accept( ){ | ||
418 | qDebug("accepted"); | ||
419 | //SetTimeDate | ||
420 | commitTime(); | ||
421 | writeSettings(); | ||
422 | updateSystem(); | ||
423 | // Ntp | ||
424 | saveConfig(); | ||
425 | qApp->quit(); | ||
426 | } \ No newline at end of file | ||