diff options
Diffstat (limited to 'kresources/slox/kabcresourceslox.cpp')
-rw-r--r-- | kresources/slox/kabcresourceslox.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kresources/slox/kabcresourceslox.cpp b/kresources/slox/kabcresourceslox.cpp index 757bfae08..16d5aced5 100644 --- a/kresources/slox/kabcresourceslox.cpp +++ b/kresources/slox/kabcresourceslox.cpp @@ -49,6 +49,8 @@ ResourceSlox::ResourceSlox( const KConfig *config ) if ( config ) { readConfig( config ); + } else { + setResourceName( i18n( "OpenXchange Server" ) ); } } @@ -353,7 +355,11 @@ void ResourceSlox::parseContactAttribute( const TQDomElement &e, Addressee &a ) } else if ( tag == fieldName( Organization ) ) { a.setOrganization( text ); } else if ( tag == fieldName( Department ) ) { +#if KDE_IS_VERSION(3,5,8) + a.setDepartment( text ); +#else a.insertCustom( "KADDRESSBOOK", "X-Department", text ); +#endif } else if ( tag == fieldName( FamilyName ) ) { a.setFamilyName( text ); } else if ( tag == fieldName( GivenName) ) { @@ -542,8 +548,13 @@ void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop else WebdavHandler::addSloxElement( this, doc, prop, fieldName( Birthday ) ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( Role ), a.role() ); +#if KDE_IS_VERSION(3,5,8) + WebdavHandler::addSloxElement( this, doc, prop, fieldName( Department ), + a.department( ) ); +#else WebdavHandler::addSloxElement( this, doc, prop, fieldName( Department ), a.custom( "KADDRESSBOOK", "X-Department" ) ); +#endif if ( type() == "ox" ) { // OX only fields WebdavHandler::addSloxElement( this, doc, prop, fieldName( DisplayName ), a.formattedName() ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( SecondName ), a.additionalName() ); |