summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessxml.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp65
1 files changed, 35 insertions, 30 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index cce6111..3e06d88 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -28,2 +28,21 @@
*/
+
+/* OPIE */
+#include <opie2/opimdateconversion.h>
+#include <opie2/opimstate.h>
+#include <opie2/opimtimezone.h>
+#include <opie2/opimnotifymanager.h>
+#include <opie2/opimrecurrence.h>
+#include <opie2/otodoaccessxml.h>
+#include <opie2/odebug.h>
+
+#include <qpe/global.h>
+#include <qpe/stringutil.h>
+#include <qpe/timeconversion.h>
+
+/* QT */
+#include <qfile.h>
+#include <qvector.h>
+
+/* STD */
#include <errno.h>
@@ -38,16 +57,2 @@
-#include <qfile.h>
-#include <qvector.h>
-
-#include <qpe/global.h>
-#include <qpe/stringutil.h>
-#include <qpe/timeconversion.h>
-
-#include <opie2/opimdateconversion.h>
-#include <opie2/opimstate.h>
-#include <opie2/opimtimezone.h>
-#include <opie2/opimnotifymanager.h>
-#include <opie2/opimrecurrence.h>
-#include <opie2/otodoaccessxml.h>
-
using namespace Opie;
@@ -179,3 +184,3 @@ bool OPimTodoAccessXML::load() {
i+= strLen;
- qWarning("Found a start at %d %d", i, (point-dt) );
+ owarn << "Found a start at " << i << " " << (point-dt) << "" << oendl;
@@ -235,3 +240,3 @@ bool OPimTodoAccessXML::load() {
*/
- qWarning("End at %d", i );
+ owarn << "End at " << i << "" << oendl;
if (m_events.contains( ev.uid() ) || ev.uid() == 0) {
@@ -258,3 +263,3 @@ bool OPimTodoAccessXML::load() {
- qWarning("counts %d records loaded!", m_events.count() );
+ owarn << "counts " << m_events.count() << " records loaded!" << oendl;
return true;
@@ -266,5 +271,5 @@ bool OPimTodoAccessXML::reload() {
bool OPimTodoAccessXML::save() {
-// qWarning("saving");
+// owarn << "saving" << oendl;
if (!m_opened || !m_changed ) {
-// qWarning("not saving");
+// owarn << "not saving" << oendl;
return true;
@@ -309,3 +314,3 @@ bool OPimTodoAccessXML::save() {
if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) {
-// qWarning("error renaming");
+// owarn << "error renaming" << oendl;
QFile::remove( strNewFile );
@@ -347,3 +352,3 @@ void OPimTodoAccessXML::clear() {
bool OPimTodoAccessXML::add( const OPimTodo& todo ) {
-// qWarning("add");
+// owarn << "add" << oendl;
m_changed = true;
@@ -406,3 +411,3 @@ void OPimTodoAccessXML::todo( QAsciiDict<int>* dict, OPimTodo& ev,
const QCString& attr, const QString& val) {
-// qWarning("parse to do from XMLElement" );
+// owarn << "parse to do from XMLElement" << oendl;
@@ -412,3 +417,3 @@ void OPimTodoAccessXML::todo( QAsciiDict<int>* dict, OPimTodo& ev,
if (!find ) {
-// qWarning("Unknown option" + it.key() );
+// owarn << "Unknown option" + it.key() << oendl;
ev.setCustomField( attr, val );
@@ -465,4 +470,4 @@ void OPimTodoAccessXML::todo( QAsciiDict<int>* dict, OPimTodo& ev,
QStringList alarm = QStringList::split(":", (*it), TRUE ); // allow empty
- qWarning("alarm: %s", alarm.join("___").latin1() );
- qWarning("alarm[0]: %s %s", alarm[0].latin1(), OPimDateConversion::dateTimeFromString( alarm[0] ).toString().latin1() );
+ owarn << "alarm: " << alarm.join("___") << "" << oendl;
+ owarn << "alarm[0]: " << alarm[0] << " " << OPimDateConversion::dateTimeFromString( alarm[0] ).toString() << "" << oendl;
OPimAlarm al( alarm[2].toInt(), OPimDateConversion::dateTimeFromString( alarm[0] ), alarm[1].toInt() );
@@ -539,3 +544,3 @@ QString customToXml(const QMap<QString, QString>& customMap )
{
- //qWarning(QString("writing custom %1").arg(customMap.count()));
+ //owarn << QString("writing custom %1").arg(customMap.count()) << oendl;
QString buf(" ");
@@ -543,3 +548,3 @@ QString customToXml(const QMap<QString, QString>& customMap )
cit != customMap.end(); ++cit) {
-// qWarning(".ITEM.");
+// owarn << ".ITEM." << oendl;
buf += cit.key();
@@ -572,3 +577,3 @@ QString OPimTodoAccessXML::toString( const OPimTodo& ev )const {
}
-// qWarning( "Uid %d", ev.uid() );
+// owarn << "Uid " << ev.uid() << "" << oendl;
str += "Uid=\"" + QString::number( ev.uid() ) + "\" ";
@@ -619,3 +624,3 @@ QString OPimTodoAccessXML::toString( const OPimTodo& ev )const {
// now write the list
- qWarning("als: %s", als.join("____________").latin1() );
+ owarn << "als: " << als.join("____________") << "" << oendl;
str += "Alarms=\""+als.join(";") +"\" ";
@@ -840,3 +845,3 @@ QArray<int> OPimTodoAccessXML::sorted( bool asc, int sortOrder,
/* if ( (*it).isOverdue() && !bOnly ) {
- qWarning("item is overdue but !bOnly");
+ owarn << "item is overdue but !bOnly" << oendl;
continue;