author | zecke <zecke> | 2004-11-18 21:49:23 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-18 21:49:23 (UTC) |
commit | 1e7f8f22fc10e3ed85b6563332ddc348c95792d0 (patch) (side-by-side diff) | |
tree | 59498ba1d4a7dbff05228c09bebcf0c849e916be /libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | |
parent | 41fa1c196965f17f9748f835d90c307b7e594883 (diff) | |
download | opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.zip opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.tar.gz opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.tar.bz2 |
Backend Changes:
Each Backend can:
-Sort and Filter a set of Records/AllRecords (which can be filtered again)
-QueryByExample by every Backend
-Occurrences for a period of time and a QDateTime
-More common implementation
-OPimBackendOccurrence with common splitting to OPimOccurrence
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 18113c2..5df7253 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp @@ -110,3 +110,2 @@ bool OPimContactAccessBackend_XML::save() for ( ; it.current(); ++it ) { - // owarn << " Uid " << (*it)->uid() << " at Offset: " << idx_offset << "" << oendl; out += "<Contact "; @@ -139,4 +138,2 @@ bool OPimContactAccessBackend_XML::save() if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) { - owarn << "problem renaming file " << strNewFile << " to " << m_journalName - << ", errno: " << errno << oendl; // remove the tmp file... @@ -215,5 +212,4 @@ OPimContact OPimContactAccessBackend_XML::find ( int uid ) const QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &query, int settings, - const QDateTime& d ) + const QDateTime& d )const { - QArray<int> m_currentQuery( m_contactList.count() ); @@ -280,4 +276,2 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu // ( maximum time range ) ! - owarn << "Checking if " << checkDate->toString() << " is between " << current.toString() - << " and " << queryDate->toString() << " ! " << oendl; if ( current.daysTo( *queryDate ) >= 0 ){ @@ -286,3 +280,2 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu allcorrect = false; - owarn << " Nope!.." << oendl; } @@ -432,2 +425,3 @@ bool OPimContactAccessBackend_XML::hasQuerySettings (uint querySettings) const +#if 0 // Currently only asc implemented.. @@ -460,2 +454,4 @@ QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int ) } +#endif + @@ -463,3 +459,2 @@ bool OPimContactAccessBackend_XML::add ( const OPimContact &newcontact ) { - //owarn << "odefaultbackend: ACTION::ADD" << oendl; updateJournal (newcontact, ACTION_ADD); @@ -487,4 +482,2 @@ bool OPimContactAccessBackend_XML::replace ( const OPimContact &contact ) - owarn << "Nur zur Sicherheit: " << contact.uid() << " == " << newCont->uid() << " ?" << oendl; - return true; @@ -593,4 +586,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal - //owarn << "OPimContactDefaultBackEnd::loading " << filename << "" << oendl; - XMLElement *root = XMLElement::load( filename ); @@ -601,3 +592,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal XMLElement *element = root->firstChild(); - //owarn << "OPimContactAccess::load tagName(): " << root->tagName() << "" << oendl; element = element ? element->firstChild() : 0; @@ -607,4 +597,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal if( element->tagName() != QString::fromLatin1("Contacts") ){ - //owarn << "OPimContactDefBack::Searching for Tag \"Contacts\"! Found: " - // << element->tagName() << oendl; element = element->nextChild(); @@ -618,4 +606,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal if( element->tagName() != QString::fromLatin1("Contact") ){ - //owarn << "OPimContactDefBack::Searching for Tag \"Contact\"! Found: " - // << element->tagName() << oendl; element = element->nextChild(); @@ -626,4 +612,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal */ - //owarn << "OPimContactDefBack::load element tagName() : " - // << element->tagName() << oendl; QString dummy; @@ -636,4 +620,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal for( it = aMap.begin(); it != aMap.end(); ++it ){ - // owarn << "Read Attribute: " << it.key() << "=" << it.data() << oendl; - int *find = dict[ it.key() ]; @@ -641,3 +623,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal if ( !find ) { - // owarn << "Attribute " << it.key() << " not known." << oendl; //contact.setCustomField(it.key(), it.data()); @@ -706,6 +687,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal }else { - owarn << "ODefBack::could not load" << oendl; } delete root; - owarn << "returning from loading" << oendl; return true; |