summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessvcal.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index 03d4479..14a325e 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -18,29 +18,33 @@
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-/* OPIE */
#include "vobject_p.h"
-#include <qpe/timeconversion.h>
+
+/* OPIE */
#include <opie2/otodoaccessvcal.h>
+#include <opie2/odebug.h>
+#include <qpe/timeconversion.h>
+
+/* QT */
//FIXME: Hack to allow direct access to FILE* fh. Rewrite this!
#define protected public
#include <qfile.h>
#undef protected
using namespace Opie;
namespace {
static OPimTodo eventByVObj( VObject *obj ){
OPimTodo event;
VObject *ob;
QCString name;
@@ -79,25 +83,25 @@ namespace {
bool ok;
event.setPriority(name.toInt(&ok) );
}
//due date
if((ob = isAPropertyOf(obj, VCDueProp)) ){
event.setHasDueDate( true );
name = vObjectStringZValue( ob );
event.setDueDate( TimeConversion::fromISO8601( name).date() );
}
// categories
if((ob = isAPropertyOf( obj, VCCategoriesProp )) != 0 ){
name = vObjectStringZValue( ob );
- qWarning("Categories:%s", name.data() );
+ owarn << "Categories:" << name.data() << "" << oendl;
}
event.setUid( 1 );
return event;
};
static VObject *vobjByEvent( const OPimTodo &event ) {
VObject *task = newVObject( VCTodoProp );
if( task == 0 )
return 0l;
if( event.hasDueDate() ) {
QTime time(0, 0, 0);
@@ -108,43 +112,43 @@ namespace {
if( event.isCompleted() )
addPropValue( task, VCStatusProp, "COMPLETED");
QString string = QString::number(event.priority() );
addPropValue( task, VCPriorityProp, string.local8Bit() );
addPropValue( task, VCCategoriesProp,
event.idsToString( event.categories() ).local8Bit() );
#if 0
- // There seems a misrepresentation between summary in otodoevent
- // and summary in vcard.
- // The same with description..
- // Description is summary and vice versa.. Argh.. (eilers)
+ // There seems a misrepresentation between summary in otodoevent
+ // and summary in vcard.
+ // The same with description..
+ // Description is summary and vice versa.. Argh.. (eilers)
addPropValue( task, VCDescriptionProp,
event.description().local8Bit() );
addPropValue( task, VCSummaryProp,
event.summary().local8Bit() );
#else
addPropValue( task, VCDescriptionProp,
event.summary().local8Bit() );
addPropValue( task, VCSummaryProp,
event.description().local8Bit() );
-#endif
+#endif
return task;
};
}
namespace Opie {
OPimTodoAccessVCal::OPimTodoAccessVCal( const QString& path )
: m_dirty(false), m_file( path )
{
}
OPimTodoAccessVCal::~OPimTodoAccessVCal() {
}
bool OPimTodoAccessVCal::load() {