author | harlekin <harlekin> | 2002-03-22 09:04:05 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-22 09:04:05 (UTC) |
commit | d710cacb0ee021274ed5507a76a3cc0ca9a65a4e (patch) (side-by-side diff) | |
tree | 68ab43f438062e62acf167ebfc086197af656130 | |
parent | 23663a914f1b831134d907dfa9f367381718bdc7 (diff) | |
download | opie-d710cacb0ee021274ed5507a76a3cc0ca9a65a4e.zip opie-d710cacb0ee021274ed5507a76a3cc0ca9a65a4e.tar.gz opie-d710cacb0ee021274ed5507a76a3cc0ca9a65a4e.tar.bz2 |
bugfixes
-rw-r--r-- | core/pim/today/today.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 58ba4f4..aef0a9b 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -117,64 +117,65 @@ void Today::setOwnerField(QString &message) { } } /* * Autostart, uses the new (opie only) autostart method in the launcher code. * If registered against that today ist started on each resume. */ void Today::autoStart() { Config cfg("today"); cfg.setGroup("Autostart"); AUTOSTART = cfg.readNumEntry("autostart",1); if (AUTOSTART) { QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); e << QString("add"); e << QString("today"); } else { QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); e << QString("remove"); e << QString("today"); } } /* * Repaint method. Reread all fields. */ void Today::draw() { init(); getDates(); getMail(); // if the todolist.xml file was not modified in between, do not parse it. if (checkIfModified()) { + if (todo) delete todo; todo = new ToDoDB; getTodo(); } // how often refresh QTimer::singleShot( 20*1000, this, SLOT(draw() ) ); } /* * Check if the todolist.xml was modified (if there are new entries. * Returns true if it was modified. */ bool Today::checkIfModified() { QDir dir; QString homedir = dir.homeDirPath (); QString time; Config cfg("today"); cfg.setGroup("Files"); time = cfg.readEntry("todolisttimestamp", ""); QFileInfo file = (homedir +"/Applications/todolist/todolist.xml"); QDateTime fileTime = file.lastModified(); if (time.compare(fileTime.toString()) == 0) { return false; } else { cfg.writeEntry("todolisttimestamp", fileTime.toString() ); cfg.write(); return true; } } |