summaryrefslogtreecommitdiff
authortille <tille>2002-06-27 22:28:03 (UTC)
committer tille <tille>2002-06-27 22:28:03 (UTC)
commit2f9c9f9dfe6aff27381a3c671bbd50870976677c (patch) (unidiff)
tree28ea446384f0abc3b8c9b49d9631b46bd174b32d
parent49710f20cf0e52ea3393027ed066f11e977e3457 (diff)
downloadopie-2f9c9f9dfe6aff27381a3c671bbd50870976677c.zip
opie-2f9c9f9dfe6aff27381a3c671bbd50870976677c.tar.gz
opie-2f9c9f9dfe6aff27381a3c671bbd50870976677c.tar.bz2
conffile count
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp9
-rw-r--r--noncore/settings/netsystemtime/settime.cpp3
2 files changed, 8 insertions, 4 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index 830c0c3..7971f9a 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -150,6 +150,5 @@ void Ntp::ntpFinished(OProcess *p)
150 int lookupCount = cfg.readNumEntry("count",0); 150 int lookupCount = cfg.readNumEntry("count",0);
151 bool lastNtp = cfg.readBoolEntry("lastNtp",false);
151 int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); 152 int time = TimeConversion::toUTC( QDateTime::currentDateTime() );
152 cfg.writeEntry("time", time); 153 cfg.writeEntry("time", time);
153 cfg.setGroup("correction");
154 cfg.writeEntry("time", time);
155 154
@@ -160,7 +159,7 @@ void Ntp::ntpFinished(OProcess *p)
160 TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); 159 TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds"));
161 if ( lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) 160 if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value())
162 { 161 {
162 cfg.setGroup("lookup_"+QString::number(lookupCount));
163 lookupCount++; 163 lookupCount++;
164 cfg.writeEntry("count",lookupCount); 164 cfg.writeEntry("count",lookupCount);
165 cfg.setGroup("lookup_"+QString::number(lookupCount));
166 _shiftPerSec = timeShift / secsSinceLast; 165 _shiftPerSec = timeShift / secsSinceLast;
@@ -169,2 +168,3 @@ void Ntp::ntpFinished(OProcess *p)
169 cfg.writeEntry("timeShift",QString::number(timeShift)); 168 cfg.writeEntry("timeShift",QString::number(timeShift));
169 cfg.writeEntry("lastNtp",true);
170 } 170 }
@@ -230,2 +230,3 @@ void Ntp::preditctTime()
230 int lastTime = cfg.readNumEntry("time",0); 230 int lastTime = cfg.readNumEntry("time",0);
231 cfg.writeEntry("lastNtp",true);
231 setenv( "TZ", tz->currentZone(), 1 ); 232 setenv( "TZ", tz->currentZone(), 1 );
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp
index e7e604f..9c5323a 100644
--- a/noncore/settings/netsystemtime/settime.cpp
+++ b/noncore/settings/netsystemtime/settime.cpp
@@ -232,2 +232,5 @@ void SetDateTime::commitTime()
232{ 232{
233 Config cfg("ntp",Config::User);
234 cfg.setGroup("lookups");
235 cfg.writeEntry("lastNtp",false);
233 tz->setFocus(); 236 tz->setFocus();