summaryrefslogtreecommitdiff
authorzecke <zecke>2003-10-02 19:48:14 (UTC)
committer zecke <zecke>2003-10-02 19:48:14 (UTC)
commitec63bc06518a70d56411291afab8f619b96e67f5 (patch) (side-by-side diff)
tree1013fe66686254cbed9af9198968ae195a2c292a
parent4c9bda8027049b7ea423471a213eca2068490b08 (diff)
downloadopie-ec63bc06518a70d56411291afab8f619b96e67f5.zip
opie-ec63bc06518a70d56411291afab8f619b96e67f5.tar.gz
opie-ec63bc06518a70d56411291afab8f619b96e67f5.tar.bz2
fix bug 0001185
and state that syncing system time depends on AlarmServer using atd or opie-alarm
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/alarmserver.cpp5
-rw-r--r--library/global.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp
index 2ea4025..a75fc7e 100644
--- a/library/alarmserver.cpp
+++ b/library/alarmserver.cpp
@@ -405,45 +405,48 @@ void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QC
// if its a match, delete it
if ( ( (*it)->UTCtime == deleteTime || when.isNull() )
&& ( channel.isNull() || (*it)->channel == channel )
&& ( message.isNull() || (*it)->message == message )
&& ( data == -1 || (*it)->data == data ) ) {
// if it's first, then we need to update the timer
if ( (*it) == nearestTimerEvent ) {
timerEventList.remove(*it);
setNearestTimerEvent();
}
else {
timerEventList.remove(*it);
}
needSave = TRUE;
}
}
if ( nearestTimerEvent )
timerEventReceiver->resetTimer();
}
if ( needSave )
saveState();
}
else {
#ifndef QT_NO_COP
QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" );
e << when << channel << message << data;
#endif
}
}
/*!
- Writes the system clock to the hardware clock.
+ The implementation depends on the mode of AlarmServer. If the AlarmServer
+ uses atd the current system time will be written to the hardware clock.
+ If the AlarmServer relies on opie-alarm the time will be written once the
+ device gets suspended. opie-alarm is used by the Zaurus, iPAQs and SIMpad
*/
void Global::writeHWClock()
{
#ifdef USE_ATD
if ( !triggerAtd( TRUE ) ) {
// atd not running? set it ourselves
system("/sbin/hwclock --systohc"); // ##### UTC?
}
#else
// hwclock is written on suspend
#endif
}
diff --git a/library/global.cpp b/library/global.cpp
index 5c89430..90954fe 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -184,66 +184,68 @@ static QString dictDir()
The findDocuments() function creates a set of \link doclnk.html
DocLnk\endlink objects in a particular folder.
\section1 Filesystem related
Global provides an applicationFileName() function that returns the
full path of an application-specific file.
The execute() function runs an application.
\section1 Word list related
A list of words relevant to the current locale is maintained by the
system. The list is held in a \link qdawg.html DAWG\endlink
(implemented by the QDawg class). This list is used, for example, by
the pickboard input method.
The global QDawg is returned by fixedDawg(); this cannot be updated.
An updatable copy of the global QDawg is returned by addedDawg().
Applications may have their own word lists stored in \l{QDawg}s
which are returned by dawg(). Use addWords() to add words to the
updateable copy of the global QDawg or to named application
\l{QDawg}s.
\section1 Quoting
The shellQuote() function quotes a string suitable for passing to a
shell. The stringQuote() function backslash escapes '\' and '"'
characters.
\section1 Hardware
- The writeHWClock() function sets the hardware clock to the system
- clock's date and time.
+ The implementation of the writeHWClock() function depends on the AlarmServer
+ implementation. If the AlarmServer is using atd the clock will be synced to
+ hardware. If opie-alarm is used the hardware clock will be synced before
+ suspending the device. opie-alarm is used by iPAQ and Zaurii implementation
\ingroup qtopiaemb
*/
/*!
\internal
*/
Global::Global()
{
}
/*!
Returns the unchangeable QDawg that contains general
words for the current locale.
\sa addedDawg()
*/
const QDawg& Global::fixedDawg()
{
if ( !fixed_dawg ) {
if ( !docDirCreated )
createDocDir();
fixed_dawg = new QDawg;
QString dawgfilename = dictDir() + "/dawg";
QString words_lang;
QStringList langs = Global::languageList();
for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
QString lang = *it;
words_lang = dictDir() + "/words." + lang;
QString dawgfilename_lang = dawgfilename + "." + lang;
if ( QFile::exists(dawgfilename_lang) ||