-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 111f7d4..6e74e32 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp | |||
@@ -163,38 +163,39 @@ void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) | |||
163 | QString lineStr, lineStrOld; | 163 | QString lineStr, lineStrOld; |
164 | lineStr = buffer; | 164 | lineStr = buffer; |
165 | lineStr=lineStr.left(buflen); | 165 | lineStr=lineStr.left(buflen); |
166 | if (lineStr!=lineStrOld) | 166 | if (lineStr!=lineStrOld) |
167 | { | 167 | { |
168 | ntpOutPut(lineStr); | 168 | ntpOutPut(lineStr); |
169 | _ntpOutput += lineStr; | 169 | _ntpOutput += lineStr; |
170 | } | 170 | } |
171 | lineStrOld = lineStr; | 171 | lineStrOld = lineStr; |
172 | } | 172 | } |
173 | 173 | ||
174 | void Ntp::ntpFinished(OProcess *p) | 174 | void Ntp::ntpFinished(OProcess *p) |
175 | { | 175 | { |
176 | qDebug("p->exitStatus() %i",p->exitStatus()); | 176 | qDebug("p->exitStatus() %i",p->exitStatus()); |
177 | if (p->exitStatus()!=0 || !p->normalExit()) | 177 | if (p->exitStatus()!=0 || !p->normalExit()) |
178 | { | 178 | { |
179 | QMessageBox::critical(this, tr("ntp error"), | 179 | if ( isVisible() ) { |
180 | QMessageBox::critical(this, tr("ntp error"), | ||
180 | tr("Error while getting time form\n server")+ | 181 | tr("Error while getting time form\n server")+ |
181 | getNtpServer()+"\n"+ | 182 | getNtpServer()+"\n"+ |
182 | _ntpOutput ); | 183 | _ntpOutput ); |
183 | // TabWidgetMain->setCurrentPage( 1 ); | 184 | TabWidgetMain->showPage( tabManualSetTime ); |
184 | TabWidgetMain->showPage( tabManualSetTime ); | 185 | } |
185 | 186 | ||
186 | return; | 187 | return; |
187 | } | 188 | } |
188 | 189 | ||
189 | Global::writeHWClock(); | 190 | Global::writeHWClock(); |
190 | // since time has changed quickly load in the datebookdb | 191 | // since time has changed quickly load in the datebookdb |
191 | // to allow the alarm server to get a better grip on itself | 192 | // to allow the alarm server to get a better grip on itself |
192 | // (example re-trigger alarms for when we travel back in time) | 193 | // (example re-trigger alarms for when we travel back in time) |
193 | DateBookDB db; | 194 | DateBookDB db; |
194 | 195 | ||
195 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); | 196 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); |
196 | // timeApplet << ""; | 197 | // timeApplet << ""; |
197 | 198 | ||
198 | Config cfg("ntp",Config::User); | 199 | Config cfg("ntp",Config::User); |
199 | cfg.setGroup("lookups"); | 200 | cfg.setGroup("lookups"); |
200 | int lastLookup = cfg.readNumEntry("time",0); | 201 | int lastLookup = cfg.readNumEntry("time",0); |