summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
authorzecke <zecke>2003-02-21 16:52:49 (UTC)
committer zecke <zecke>2003-02-21 16:52:49 (UTC)
commit0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7 (patch) (side-by-side diff)
treef3ce9c9441a1073762f3e0c61cc85f0d5a1fd81d /libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
parenta298235aa1489937e7657079e6352adfc8746acf (diff)
downloadopie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.zip
opie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.tar.gz
opie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.tar.bz2
-Remove old Todo classes they're deprecated and today I already using the
new API -Guard against self assignment in OTodo -Add test apps for OPIM -Opiefied Event classes -Added TimeZone handling and pinning of TimeZones to OEvent -Adjust ORecur and the widget to better timezone behaviour
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index 622d40a..e537269 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -1,43 +1,52 @@
/*
* VCard Backend for the OPIE-Contact Database.
*
* Copyright (C) 2000 Trolltech AS. All rights reserved.
* Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
*
* =====================================================================
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* =====================================================================
* ToDo:
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.8 2003/02/21 16:52:49 zecke
+ * -Remove old Todo classes they're deprecated and today I already using the
+ * new API
+ * -Guard against self assignment in OTodo
+ * -Add test apps for OPIM
+ * -Opiefied Event classes
+ * -Added TimeZone handling and pinning of TimeZones to OEvent
+ * -Adjust ORecur and the widget to better timezone behaviour
+ *
* Revision 1.7 2003/02/16 22:25:46 zecke
* 0000276 Fix for that bug.. or better temp workaround
* A Preferred Number is HOME|VOICE
* A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test
* triggers both
* and the cell phone number overrides the other entries..
*
* as a temp I check that it's not equal to HOME|VOICE|CELL before setting the
* number
*
* The right and final fix would be to reorder the if statement to make it
* if else based and the less common thing put to the bottom
*
* OTodoAccessVcal fix the date for beaming
*
* Revision 1.6 2003/01/13 15:49:31 eilers
* Fixing crash when businesscard.vcf is missing..
*
* Revision 1.5 2002/12/07 13:26:22 eilers
* Fixing bug in storing anniversary..
*
* Revision 1.4 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
@@ -53,49 +62,49 @@
*/
#include "ocontactaccessbackend_vcard.h"
#include "../../library/backend/vobject_p.h"
#include "../../library/backend/qfiledirect_p.h"
#include <qpe/timeconversion.h>
#include <qfile.h>
OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString filename ):
m_dirty( false ),
m_file( filename )
{
load();
}
bool OContactAccessBackend_VCard::load ()
{
m_map.clear();
m_dirty = false;
VObject* obj = 0l;
- if ( QFile( m_file ).exists() ){
+ if ( QFile::exists(m_file) ){
obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() );
if ( !obj )
return false;
}else{
qWarning("File \"%s\" not found !", m_file.latin1() );
return false;
}
while ( obj ) {
OContact con = parseVObject( obj );
/*
* if uid is 0 assign a new one
* this at least happens on
* Nokia6210
*/
if ( con.uid() == 0 ){
con.setUid( 1 );
qWarning("assigned new uid %d",con.uid() );
}
m_map.insert( con.uid(), con );
VObject *t = obj;
obj = nextVObjectInList(obj);