summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 8974ced..715239f 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -28,12 +28,13 @@
#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
#endif
#include <opie/odevice.h>
+#include <qmessagebox.h>
#include <qfile.h>
#include <qimage.h>
#include <qwindowsystem_qws.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/alarmserver.h>
@@ -114,12 +115,24 @@ int initApplication( int argc, char ** argv )
delete cal;
}
#endif
d->show();
+ if ( QDate::currentDate ( ). year ( ) < 2000 ) {
+ if ( QMessageBox::information ( 0, DesktopApplication::tr( "Information" ), DesktopApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
+ QCString app;
+ if ( QFile::exists ( QPEApplication::qpeDir ( ) + "/bin/netsystemtime" ))
+ app = "netsystemtime";
+ else
+ app = "systemtime";
+ QCopEnvelope e ( "QPE/Application/" + app, "setDocument(QString)" );
+ e << QString ( );
+ }
+ }
+
int rv = a.exec();
delete d;
ODevice::inst ( )-> setSoftSuspend ( false );