summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp60
-rw-r--r--noncore/settings/netsystemtime/ntpbase.ui327
-rw-r--r--noncore/settings/netsystemtime/settime.cpp12
3 files changed, 266 insertions, 133 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index b2f192a..52fc6be 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -6,6 +6,7 @@
6#include <qsocket.h> 6#include <qsocket.h>
7#include <qlineedit.h> 7#include <qlineedit.h>
8#include <qspinbox.h> 8#include <qspinbox.h>
9#include <qmessagebox.h>
9#include <qmultilineedit.h> 10#include <qmultilineedit.h>
10#include <opie/oprocess.h> 11#include <opie/oprocess.h>
11#include <qpe/config.h> 12#include <qpe/config.h>
@@ -26,8 +27,8 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
26 cfg.setGroup("settings"); 27 cfg.setGroup("settings");
27 // _maxOffset = cfg.readNumEntry("maxOffset",5); 28 // _maxOffset = cfg.readNumEntry("maxOffset",5);
28// _minLookupDiff = cfg.readNumEntry("minLookupDiff",10); 29// _minLookupDiff = cfg.readNumEntry("minLookupDiff",10);
29 SpinBoxMinDelay->setValue( cfg.readNumEntry("minLookupDiff",10) ); 30 SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",60) );
30 SpinBoxMinDelay->setMinValue( 7 ); 31 SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",60) );
31 LineEditNtpSrv->setText( cfg.readEntry("ntpServer", tr("time.fu-berlin.de")) ); 32 LineEditNtpSrv->setText( cfg.readEntry("ntpServer", tr("time.fu-berlin.de")) );
32 ntpProcess = new OProcess( ); 33 ntpProcess = new OProcess( );
33 34
@@ -52,12 +53,31 @@ Ntp::~Ntp()
52 Config cfg("ntp",Config::User); 53 Config cfg("ntp",Config::User);
53 cfg.setGroup("settings"); 54 cfg.setGroup("settings");
54 cfg.writeEntry("ntpServer", LineEditNtpSrv->text()); 55 cfg.writeEntry("ntpServer", LineEditNtpSrv->text());
55 cfg.writeEntry( "minLookupDiff", SpinBoxMinDelay->value() ); 56 cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() );
57 cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() );
56} 58}
57 59
58 60
59void Ntp::slotRunNtp() 61void Ntp::slotRunNtp()
60{ 62{
63 Config cfg("ntp",Config::User);
64 cfg.setGroup("lookups");
65 int lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
66
67 if ( lookupDiff < SpinBoxNtpDelay->value()*60 )
68 {
69 switch (
70 QMessageBox::warning(this, tr("Run ntp?"),
71 tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+
72 QString::number(lookupDiff%60)+tr(" minutes elapsed since last loopup.")+
73 "<br>"+tr("Rerun ntp?"),
74 QMessageBox::Ok,QMessageBox::Cancel)
75 ) {
76 case QMessageBox::Ok: break;
77 case QMessageBox::Cancel: return;
78 default: return;
79 }
80 }
61 TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); 81 TextLabelStartTime->setText(QDateTime::currentDateTime().toString());
62 ntpProcess->clearArguments(); 82 ntpProcess->clearArguments();
63 *ntpProcess << "ntpdate" << LineEditNtpSrv->text(); 83 *ntpProcess << "ntpdate" << LineEditNtpSrv->text();
@@ -95,7 +115,8 @@ void Ntp::ntpFinished(OProcess*)
95 if (timeShift == 0.0) return; 115 if (timeShift == 0.0) return;
96 int secsSinceLast = time - lastLookup; 116 int secsSinceLast = time - lastLookup;
97 TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); 117 TextLabelNewTime->setText(QDateTime::currentDateTime().toString());
98 if ( lastLookup > 0 && secsSinceLast > 60*24* SpinBoxMinDelay->value()) 118 TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds"));
119 if ( lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value())
99 { 120 {
100 lookupCount++; 121 lookupCount++;
101 cfg.writeEntry("count",lookupCount); 122 cfg.writeEntry("count",lookupCount);
@@ -108,28 +129,6 @@ void Ntp::ntpFinished(OProcess*)
108 } 129 }
109} 130}
110 131
111//void Ntp::correctClock()
112//{
113 //qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
114 //Config cfg("ntp",Config::User);
115// cfg.setGroup("correction");
116 // int lastTime = cfg.readNumEntry("time",0);
117// if ( lastTime == 0 )
118// {
119 // return;
120// }
121// int now = TimeConversion::toUTC( QDateTime::currentDateTime() );
122// int corr = int((now - lastTime) * _shiftPerSec);
123// struct timeval myTv;
124// myTv.tv_sec = TimeConversion::toUTC( QDateTime::currentDateTime().addSecs(corr) );
125// myTv.tv_usec = 0;
126//
127// if ( myTv.tv_sec != -1 )
128// ::settimeofday( &myTv, 0 );
129// Global::writeHWClock();
130// cfg.writeEntry("time",now);
131 //qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
132//}
133 132
134float Ntp::getTimeShift() 133float Ntp::getTimeShift()
135{ 134{
@@ -143,7 +142,6 @@ float Ntp::getTimeShift()
143 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1); 142 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1);
144 qDebug("%s", _ntpOutput.latin1()); 143 qDebug("%s", _ntpOutput.latin1());
145 qDebug("diff = >%s<",diff.latin1()); 144 qDebug("diff = >%s<",diff.latin1());
146 TextLabelTimeShift->setText(diff);
147 return diff.toFloat(); 145 return diff.toFloat();
148} 146}
149 147
@@ -164,6 +162,8 @@ void Ntp::readLookups()
164 TableLookups->setColumnWidth( 0, cw+30 ); 162 TableLookups->setColumnWidth( 0, cw+30 );
165 TableLookups->setColumnWidth( 1, cw ); 163 TableLookups->setColumnWidth( 1, cw );
166 TableLookups->setColumnWidth( 2, cw ); 164 TableLookups->setColumnWidth( 2, cw );
165 TableLookups->sortColumn(0, false, true );
166 // TableLookups->setSorting( true );
167 for (int i=0; i < lookupCount; i++) 167 for (int i=0; i < lookupCount; i++)
168 { 168 {
169 cfg.setGroup("lookup_"+QString::number(i)); 169 cfg.setGroup("lookup_"+QString::number(i));
@@ -178,7 +178,7 @@ void Ntp::readLookups()
178 TableLookups->setText( i,1,QString::number(last)); 178 TableLookups->setText( i,1,QString::number(last));
179 } 179 }
180 _shiftPerSec /= lookupCount+1; 180 _shiftPerSec /= lookupCount+1;
181 TextLabelShift->setText(QString::number(_shiftPerSec)); 181 TextLabelShift->setText(QString::number(_shiftPerSec)+tr(" seconds"));
182} 182}
183 183
184void Ntp::preditctTime() 184void Ntp::preditctTime()
@@ -192,7 +192,7 @@ void Ntp::preditctTime()
192 int corr = int((now - lastTime) * _shiftPerSec); 192 int corr = int((now - lastTime) * _shiftPerSec);
193 predictedTime = QDateTime::currentDateTime().addSecs(corr); 193 predictedTime = QDateTime::currentDateTime().addSecs(corr);
194 TextLabelPredTime->setText(predictedTime.toString()); 194 TextLabelPredTime->setText(predictedTime.toString());
195 TextLabelMainPredTime->setText(predictedTime.toString()); 195 TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>");
196} 196}
197 197
198void Ntp::setPredictTime() 198void Ntp::setPredictTime()
@@ -210,7 +210,7 @@ void Ntp::slotCheckNtp(int i)
210 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); 210 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) );
211 }else{ 211 }else{
212 preditctTime(); 212 preditctTime();
213 ButtonSetTime->setText( tr("Predict time") ); 213 ButtonSetTime->setText( tr("Set predicted time") );
214 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); 214 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) );
215 }; 215 };
216} 216}
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui
index e444065..8d32849 100644
--- a/noncore/settings/netsystemtime/ntpbase.ui
+++ b/noncore/settings/netsystemtime/ntpbase.ui
@@ -11,8 +11,8 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>276</width> 14 <width>330</width>
15 <height>337</height> 15 <height>419</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -32,7 +32,7 @@
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>1</number> 35 <number>2</number>
36 </property> 36 </property>
37 <widget row="0" column="0" > 37 <widget row="0" column="0" >
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
@@ -59,11 +59,11 @@
59 <grid> 59 <grid>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>3</number> 62 <number>2</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>3</number> 66 <number>2</number>
67 </property> 67 </property>
68 <widget row="0" column="0" > 68 <widget row="0" column="0" >
69 <class>QFrame</class> 69 <class>QFrame</class>
@@ -95,11 +95,11 @@
95 <grid> 95 <grid>
96 <property stdset="1"> 96 <property stdset="1">
97 <name>margin</name> 97 <name>margin</name>
98 <number>3</number> 98 <number>1</number>
99 </property> 99 </property>
100 <property stdset="1"> 100 <property stdset="1">
101 <name>spacing</name> 101 <name>spacing</name>
102 <number>3</number> 102 <number>2</number>
103 </property> 103 </property>
104 <widget row="1" column="0" > 104 <widget row="1" column="0" >
105 <class>QPushButton</class> 105 <class>QPushButton</class>
@@ -129,14 +129,17 @@
129 <property> 129 <property>
130 <name>layoutMargin</name> 130 <name>layoutMargin</name>
131 </property> 131 </property>
132 <property>
133 <name>layoutSpacing</name>
134 </property>
132 <grid> 135 <grid>
133 <property stdset="1"> 136 <property stdset="1">
134 <name>margin</name> 137 <name>margin</name>
135 <number>11</number> 138 <number>2</number>
136 </property> 139 </property>
137 <property stdset="1"> 140 <property stdset="1">
138 <name>spacing</name> 141 <name>spacing</name>
139 <number>6</number> 142 <number>2</number>
140 </property> 143 </property>
141 <widget row="0" column="0" > 144 <widget row="0" column="0" >
142 <class>QLayoutWidget</class> 145 <class>QLayoutWidget</class>
@@ -253,9 +256,19 @@
253 <cstring>MultiLineEditntpOutPut</cstring> 256 <cstring>MultiLineEditntpOutPut</cstring>
254 </property> 257 </property>
255 <property stdset="1"> 258 <property stdset="1">
259 <name>font</name>
260 <font>
261 <pointsize>7</pointsize>
262 </font>
263 </property>
264 <property stdset="1">
256 <name>wordWrap</name> 265 <name>wordWrap</name>
257 <enum>WidgetWidth</enum> 266 <enum>WidgetWidth</enum>
258 </property> 267 </property>
268 <property stdset="1">
269 <name>text</name>
270 <string></string>
271 </property>
259 </widget> 272 </widget>
260 </grid> 273 </grid>
261 </widget> 274 </widget>
@@ -382,11 +395,11 @@
382 <grid> 395 <grid>
383 <property stdset="1"> 396 <property stdset="1">
384 <name>margin</name> 397 <name>margin</name>
385 <number>3</number> 398 <number>2</number>
386 </property> 399 </property>
387 <property stdset="1"> 400 <property stdset="1">
388 <name>spacing</name> 401 <name>spacing</name>
389 <number>3</number> 402 <number>2</number>
390 </property> 403 </property>
391 <widget row="0" column="0" > 404 <widget row="0" column="0" >
392 <class>QFrame</class> 405 <class>QFrame</class>
@@ -402,14 +415,20 @@
402 <name>frameShadow</name> 415 <name>frameShadow</name>
403 <enum>Raised</enum> 416 <enum>Raised</enum>
404 </property> 417 </property>
418 <property>
419 <name>layoutMargin</name>
420 </property>
421 <property>
422 <name>layoutSpacing</name>
423 </property>
405 <grid> 424 <grid>
406 <property stdset="1"> 425 <property stdset="1">
407 <name>margin</name> 426 <name>margin</name>
408 <number>11</number> 427 <number>3</number>
409 </property> 428 </property>
410 <property stdset="1"> 429 <property stdset="1">
411 <name>spacing</name> 430 <name>spacing</name>
412 <number>6</number> 431 <number>11</number>
413 </property> 432 </property>
414 <widget row="0" column="0" > 433 <widget row="0" column="0" >
415 <class>QLayoutWidget</class> 434 <class>QLayoutWidget</class>
@@ -426,107 +445,217 @@
426 <name>spacing</name> 445 <name>spacing</name>
427 <number>6</number> 446 <number>6</number>
428 </property> 447 </property>
429 <spacer row="2" column="0" > 448 <widget row="0" column="0" >
449 <class>QLabel</class>
450 <property stdset="1">
451 <name>name</name>
452 <cstring>TextLabel7_2</cstring>
453 </property>
454 <property stdset="1">
455 <name>text</name>
456 <string>Use</string>
457 </property>
458 </widget>
459 <widget row="0" column="2" >
460 <class>QLabel</class>
461 <property stdset="1">
462 <name>name</name>
463 <cstring>TextLabel2_2</cstring>
464 </property>
465 <property stdset="1">
466 <name>text</name>
467 <string>as</string>
468 </property>
469 </widget>
470 <widget row="1" column="0" rowspan="1" colspan="2" >
471 <class>QLabel</class>
472 <property stdset="1">
473 <name>name</name>
474 <cstring>TextLabel1_3</cstring>
475 </property>
476 <property stdset="1">
477 <name>text</name>
478 <string>NTP server to get the time from the network.</string>
479 </property>
480 <property stdset="1">
481 <name>alignment</name>
482 <set>WordBreak|AlignVCenter|AlignLeft</set>
483 </property>
430 <property> 484 <property>
485 <name>wordwrap</name>
486 </property>
487 </widget>
488 <widget row="0" column="1" >
489 <class>QLineEdit</class>
490 <property stdset="1">
431 <name>name</name> 491 <name>name</name>
432 <cstring>Spacer2</cstring> 492 <cstring>LineEditNtpSrv</cstring>
433 </property> 493 </property>
494 </widget>
495 </grid>
496 </widget>
497 <spacer row="3" column="0" >
498 <property>
499 <name>name</name>
500 <cstring>Spacer2</cstring>
501 </property>
502 <property stdset="1">
503 <name>orientation</name>
504 <enum>Vertical</enum>
505 </property>
506 <property stdset="1">
507 <name>sizeType</name>
508 <enum>Expanding</enum>
509 </property>
510 <property>
511 <name>sizeHint</name>
512 <size>
513 <width>20</width>
514 <height>20</height>
515 </size>
516 </property>
517 </spacer>
518 <widget row="2" column="0" >
519 <class>QLayoutWidget</class>
520 <property stdset="1">
521 <name>name</name>
522 <cstring>Layout7</cstring>
523 </property>
524 <grid>
525 <property stdset="1">
526 <name>margin</name>
527 <number>0</number>
528 </property>
529 <property stdset="1">
530 <name>spacing</name>
531 <number>6</number>
532 </property>
533 <widget row="0" column="0" >
534 <class>QLabel</class>
434 <property stdset="1"> 535 <property stdset="1">
435 <name>orientation</name> 536 <name>name</name>
436 <enum>Vertical</enum> 537 <cstring>TextLabel1_2</cstring>
437 </property> 538 </property>
438 <property stdset="1"> 539 <property stdset="1">
439 <name>sizeType</name> 540 <name>text</name>
440 <enum>Expanding</enum> 541 <string>Insure a delay of</string>
542 </property>
543 </widget>
544 <widget row="0" column="2" >
545 <class>QLabel</class>
546 <property stdset="1">
547 <name>name</name>
548 <cstring>TextLabel2</cstring>
549 </property>
550 <property stdset="1">
551 <name>text</name>
552 <string>minutes until</string>
553 </property>
554 </widget>
555 <widget row="1" column="0" rowspan="1" colspan="3" >
556 <class>QLabel</class>
557 <property stdset="1">
558 <name>name</name>
559 <cstring>TextLabel3_3</cstring>
560 </property>
561 <property stdset="1">
562 <name>text</name>
563 <string>a new NTP lookup will be used to predict the time.</string>
564 </property>
565 <property stdset="1">
566 <name>alignment</name>
567 <set>WordBreak|AlignVCenter|AlignLeft</set>
441 </property> 568 </property>
442 <property> 569 <property>
443 <name>sizeHint</name> 570 <name>wordwrap</name>
444 <size>
445 <width>20</width>
446 <height>20</height>
447 </size>
448 </property> 571 </property>
449 </spacer> 572 </widget>
450 <widget row="1" column="0" > 573 <widget row="0" column="1" >
451 <class>QLayoutWidget</class> 574 <class>QSpinBox</class>
452 <property stdset="1"> 575 <property stdset="1">
453 <name>name</name> 576 <name>name</name>
454 <cstring>Layout6</cstring> 577 <cstring>SpinBoxMinLookupDelay</cstring>
455 </property> 578 </property>
456 <hbox> 579 <property stdset="1">
457 <property stdset="1"> 580 <name>maxValue</name>
458 <name>margin</name> 581 <number>9999999</number>
459 <number>0</number> 582 </property>
460 </property> 583 <property stdset="1">
461 <property stdset="1"> 584 <name>minValue</name>
462 <name>spacing</name> 585 <number>42</number>
463 <number>6</number> 586 </property>
464 </property>
465 <widget>
466 <class>QLabel</class>
467 <property stdset="1">
468 <name>name</name>
469 <cstring>TextLabel7_2</cstring>
470 </property>
471 <property stdset="1">
472 <name>text</name>
473 <string>NTP Server:</string>
474 </property>
475 </widget>
476 <widget>
477 <class>QLineEdit</class>
478 <property stdset="1">
479 <name>name</name>
480 <cstring>LineEditNtpSrv</cstring>
481 </property>
482 </widget>
483 </hbox>
484 </widget> 587 </widget>
588 </grid>
589 </widget>
590 <widget row="1" column="0" >
591 <class>QLayoutWidget</class>
592 <property stdset="1">
593 <name>name</name>
594 <cstring>Layout7_2</cstring>
595 </property>
596 <grid>
597 <property stdset="1">
598 <name>margin</name>
599 <number>0</number>
600 </property>
601 <property stdset="1">
602 <name>spacing</name>
603 <number>6</number>
604 </property>
485 <widget row="0" column="0" > 605 <widget row="0" column="0" >
486 <class>QLayoutWidget</class> 606 <class>QLabel</class>
607 <property stdset="1">
608 <name>name</name>
609 <cstring>TextLabel1_2_2</cstring>
610 </property>
611 <property stdset="1">
612 <name>text</name>
613 <string>Wait for</string>
614 </property>
615 </widget>
616 <widget row="0" column="2" >
617 <class>QLabel</class>
618 <property stdset="1">
619 <name>name</name>
620 <cstring>TextLabel2_3</cstring>
621 </property>
622 <property stdset="1">
623 <name>text</name>
624 <string>minutes until</string>
625 </property>
626 </widget>
627 <widget row="1" column="0" rowspan="1" colspan="3" >
628 <class>QLabel</class>
629 <property stdset="1">
630 <name>name</name>
631 <cstring>TextLabel3_3_2</cstring>
632 </property>
633 <property stdset="1">
634 <name>text</name>
635 <string>NTP syncronises the clock with the network</string>
636 </property>
637 <property stdset="1">
638 <name>alignment</name>
639 <set>WordBreak|AlignVCenter|AlignLeft</set>
640 </property>
641 <property>
642 <name>wordwrap</name>
643 </property>
644 </widget>
645 <widget row="0" column="1" >
646 <class>QSpinBox</class>
487 <property stdset="1"> 647 <property stdset="1">
488 <name>name</name> 648 <name>name</name>
489 <cstring>Layout5</cstring> 649 <cstring>SpinBoxNtpDelay</cstring>
490 </property> 650 </property>
491 <hbox> 651 <property stdset="1">
492 <property stdset="1"> 652 <name>maxValue</name>
493 <name>margin</name> 653 <number>9999999</number>
494 <number>0</number> 654 </property>
495 </property> 655 <property stdset="1">
496 <property stdset="1"> 656 <name>minValue</name>
497 <name>spacing</name> 657 <number>0</number>
498 <number>6</number> 658 </property>
499 </property>
500 <widget>
501 <class>QLabel</class>
502 <property stdset="1">
503 <name>name</name>
504 <cstring>TextLabel1_2</cstring>
505 </property>
506 <property stdset="1">
507 <name>text</name>
508 <string>Min. delay:</string>
509 </property>
510 </widget>
511 <widget>
512 <class>QSpinBox</class>
513 <property stdset="1">
514 <name>name</name>
515 <cstring>SpinBoxMinDelay</cstring>
516 </property>
517 </widget>
518 <widget>
519 <class>QLabel</class>
520 <property stdset="1">
521 <name>name</name>
522 <cstring>TextLabel2</cstring>
523 </property>
524 <property stdset="1">
525 <name>text</name>
526 <string>minutes</string>
527 </property>
528 </widget>
529 </hbox>
530 </widget> 659 </widget>
531 </grid> 660 </grid>
532 </widget> 661 </widget>
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp
index b456012..2398c08 100644
--- a/noncore/settings/netsystemtime/settime.cpp
+++ b/noncore/settings/netsystemtime/settime.cpp
@@ -261,16 +261,16 @@ void SetDateTime::setTime(QDateTime dt)
261 if ( myTv.tv_sec != -1 ) 261 if ( myTv.tv_sec != -1 )
262 ::settimeofday( &myTv, 0 ); 262 ::settimeofday( &myTv, 0 );
263 Global::writeHWClock(); 263 Global::writeHWClock();
264 // since time has changed quickly load in the datebookdb
265 // to allow the alarm server to get a better grip on itself
266 // (example re-trigger alarms for when we travel back in time)
267 DateBookDB db;
264} 268}
265 269
266void SetDateTime::updateSystem(int i) 270void SetDateTime::updateSystem(int i)
267{ 271{
268 qDebug("SetDateTime::updateSystem(int %i)",i); 272 qDebug("SetDateTime::updateSystem(int %i)",i);
269 writeSettings(); 273 writeSettings();
270 // since time has changed quickly load in the datebookdb
271 // to allow the alarm server to get a better grip on itself
272 // (example re-trigger alarms for when we travel back in time)
273 // DateBookDB db;
274 274
275 // set the timezone for everyone else... 275 // set the timezone for everyone else...
276 QCopEnvelope setTimeZone( "QPE/System", "timeChange(QString)" ); 276 QCopEnvelope setTimeZone( "QPE/System", "timeChange(QString)" );
@@ -291,6 +291,10 @@ void SetDateTime::updateSystem(int i)
291 // Restore screensaver 291 // Restore screensaver
292 QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); 292 QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" );
293 enableScreenSaver << -1 << -1 << -1; 293 enableScreenSaver << -1 << -1 << -1;
294 // since time has changed quickly load in the datebookdb
295 // to allow the alarm server to get a better grip on itself
296 // (example re-trigger alarms for when we travel back in time)
297 DateBookDB db;
294 298
295} 299}
296 300