summaryrefslogtreecommitdiff
authoreilers <eilers>2002-11-10 15:41:53 (UTC)
committer eilers <eilers>2002-11-10 15:41:53 (UTC)
commitb0b173498acde27957f8ed9297bb2ed2346eb700 (patch) (side-by-side diff)
tree615180f2fda640ae036450701cf7a728461e7055
parenta982df01d5755c1280c6279df6d46791bd4c9e7e (diff)
downloadopie-b0b173498acde27957f8ed9297bb2ed2346eb700.zip
opie-b0b173498acde27957f8ed9297bb2ed2346eb700.tar.gz
opie-b0b173498acde27957f8ed9297bb2ed2346eb700.tar.bz2
Bugfixes..
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_vcard.cpp18
-rw-r--r--libopie/pim/ocontactaccessbackend_vcard.h5
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp18
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.h5
4 files changed, 36 insertions, 10 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.cpp b/libopie/pim/ocontactaccessbackend_vcard.cpp
index 903c0b7..013f3af 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.cpp
+++ b/libopie/pim/ocontactaccessbackend_vcard.cpp
@@ -1,7 +1,8 @@
/*
* 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
@@ -15,8 +16,11 @@
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/11/10 15:41:53 eilers
+ * Bugfixes..
+ *
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
@@ -30,9 +34,11 @@
OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString filename = 0l ):
m_dirty( false ),
m_file( filename )
-{}
+{
+ load();
+}
bool OContactAccessBackend_VCard::load ()
{
@@ -85,13 +91,11 @@ bool OContactAccessBackend_VCard::save()
VObject *vo;
for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
vo = createVObject( *it );
- addVObjectProp( obj, vo );
+ writeVObject( file.directHandle() , vo );
+ cleanVObject( vo );
}
- writeVObject( file.directHandle() , obj );
- cleanVObject( obj );
-
cleanStrTbl();
m_dirty = false;
return true;
@@ -165,8 +169,12 @@ bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const
{
return false; // No search possible, therefore all settings invalid ;)
}
+bool OContactAccessBackend_VCard::wasChangedExternally()
+{
+ return false; // Don't expect concurrent access
+}
// *** Private stuff ***
diff --git a/libopie/pim/ocontactaccessbackend_vcard.h b/libopie/pim/ocontactaccessbackend_vcard.h
index c1422b0..177ec24 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.h
+++ b/libopie/pim/ocontactaccessbackend_vcard.h
@@ -1,7 +1,8 @@
/*
* 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
@@ -15,8 +16,11 @@
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/11/10 15:41:53 eilers
+ * Bugfixes..
+ *
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
@@ -48,8 +52,9 @@ class OContactAccessBackend_VCard : public OContactAccessBackend {
QArray<int> matchRegexp( const QRegExp &r ) const;
const uint querySettings();
bool hasQuerySettings (uint querySettings) const;
+ bool wasChangedExternally();
private:
OContact parseVObject( VObject* obj );
VObject* createVObject( const OContact& c );
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index 903c0b7..013f3af 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -1,7 +1,8 @@
/*
* 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
@@ -15,8 +16,11 @@
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/11/10 15:41:53 eilers
+ * Bugfixes..
+ *
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
@@ -30,9 +34,11 @@
OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString filename = 0l ):
m_dirty( false ),
m_file( filename )
-{}
+{
+ load();
+}
bool OContactAccessBackend_VCard::load ()
{
@@ -85,13 +91,11 @@ bool OContactAccessBackend_VCard::save()
VObject *vo;
for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
vo = createVObject( *it );
- addVObjectProp( obj, vo );
+ writeVObject( file.directHandle() , vo );
+ cleanVObject( vo );
}
- writeVObject( file.directHandle() , obj );
- cleanVObject( obj );
-
cleanStrTbl();
m_dirty = false;
return true;
@@ -165,8 +169,12 @@ bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const
{
return false; // No search possible, therefore all settings invalid ;)
}
+bool OContactAccessBackend_VCard::wasChangedExternally()
+{
+ return false; // Don't expect concurrent access
+}
// *** Private stuff ***
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
index c1422b0..177ec24 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
@@ -1,7 +1,8 @@
/*
* 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
@@ -15,8 +16,11 @@
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/11/10 15:41:53 eilers
+ * Bugfixes..
+ *
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
@@ -48,8 +52,9 @@ class OContactAccessBackend_VCard : public OContactAccessBackend {
QArray<int> matchRegexp( const QRegExp &r ) const;
const uint querySettings();
bool hasQuerySettings (uint querySettings) const;
+ bool wasChangedExternally();
private:
OContact parseVObject( VObject* obj );
VObject* createVObject( const OContact& c );