author | tille <tille> | 2002-09-03 17:03:09 (UTC) |
---|---|---|
committer | tille <tille> | 2002-09-03 17:03:09 (UTC) |
commit | cbaf36b21e8d469c7eb87fa9ab15e67401fb85c5 (patch) (unidiff) | |
tree | 9e3210522cef2f5d21405d177c25d64e35d4d83b | |
parent | 00167bff9a1fff9ec36b9eb7c518a735e1a5b42c (diff) | |
download | opie-cbaf36b21e8d469c7eb87fa9ab15e67401fb85c5.zip opie-cbaf36b21e8d469c7eb87fa9ab15e67401fb85c5.tar.gz opie-cbaf36b21e8d469c7eb87fa9ab15e67401fb85c5.tar.bz2 |
fixed vanishing applets bug, that is avoided it by not calling
qcop QPE/taskbar reloadApplets()
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 6c5aaf5..9572993 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp | |||
@@ -142,34 +142,34 @@ void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) | |||
142 | 142 | ||
143 | void Ntp::ntpFinished(OProcess *p) | 143 | void Ntp::ntpFinished(OProcess *p) |
144 | { | 144 | { |
145 | qDebug("p->exitStatus() %i",p->exitStatus()); | 145 | qDebug("p->exitStatus() %i",p->exitStatus()); |
146 | if (p->exitStatus()!=0 || !p->normalExit()) | 146 | if (p->exitStatus()!=0 || !p->normalExit()) |
147 | { | 147 | { |
148 | slotProbeNtpServer(); | 148 | slotProbeNtpServer(); |
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | 151 | ||
152 | Global::writeHWClock(); | 152 | Global::writeHWClock(); |
153 | // since time has changed quickly load in the datebookdb | 153 | // since time has changed quickly load in the datebookdb |
154 | // to allow the alarm server to get a better grip on itself | 154 | // to allow the alarm server to get a better grip on itself |
155 | // (example re-trigger alarms for when we travel back in time) | 155 | // (example re-trigger alarms for when we travel back in time) |
156 | DateBookDB db; | 156 | DateBookDB db; |
157 | 157 | ||
158 | QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); | 158 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); |
159 | timeApplet << ""; | 159 | // timeApplet << ""; |
160 | 160 | ||
161 | Config cfg("ntp",Config::User); | 161 | Config cfg("ntp",Config::User); |
162 | cfg.setGroup("lookups"); | 162 | cfg.setGroup("lookups"); |
163 | int lastLookup = cfg.readNumEntry("time",0); | 163 | int lastLookup = cfg.readNumEntry("time",0); |
164 | int lookupCount = cfg.readNumEntry("count",0); | 164 | int lookupCount = cfg.readNumEntry("count",0); |
165 | bool lastNtp = cfg.readBoolEntry("lastNtp",false); | 165 | bool lastNtp = cfg.readBoolEntry("lastNtp",false); |
166 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); | 166 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); |
167 | cfg.writeEntry("time", time); | 167 | cfg.writeEntry("time", time); |
168 | 168 | ||
169 | float timeShift = getTimeShift(); | 169 | float timeShift = getTimeShift(); |
170 | if (timeShift == 0.0) return; | 170 | if (timeShift == 0.0) return; |
171 | int secsSinceLast = time - lastLookup; | 171 | int secsSinceLast = time - lastLookup; |
172 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); | 172 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); |
173 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); | 173 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); |
174 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) | 174 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) |
175 | { | 175 | { |
@@ -316,17 +316,17 @@ void Ntp::receive(const QCString &msg, const QByteArray &arg) | |||
316 | qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); | 316 | qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); |
317 | if ( msg == "ntpLookup(QString)" ) | 317 | if ( msg == "ntpLookup(QString)" ) |
318 | { | 318 | { |
319 | slotRunNtp(); | 319 | slotRunNtp(); |
320 | } | 320 | } |
321 | if ( msg == "setPredictedTime(QString)" ) | 321 | if ( msg == "setPredictedTime(QString)" ) |
322 | { | 322 | { |
323 | setPredictTime(); | 323 | setPredictTime(); |
324 | }else{ | 324 | }else{ |
325 | qDebug("Ntp::receive: Huh what do ya want"); | 325 | qDebug("Ntp::receive: Huh what do ya want"); |
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||
329 | void Ntp::setDocument(const QString &fileName) | 329 | void Ntp::setDocument(const QString &fileName) |
330 | { | 330 | { |
331 | 331 | ||
332 | } \ No newline at end of file | 332 | } |