[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim-runtime] resources/dav/common: in createDavItem(), if the DavProtocolAttribute is 0, then we
From:       Allen Winter <winter () kde ! org>
Date:       2012-01-31 22:19:41
Message-ID: 20120131221941.7C6C9A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 7820402d17d9a1668db9ca99b07d743728581d0b by Allen Winter.
Committed on 31/01/2012 at 23:17.
Pushed by winterz into branch 'master'.

in createDavItem(), if the DavProtocolAttribute is 0, then we can't
get the mimetype for vcards from the DavProtocol.  In this case,
assume the mimetype is the KABC::Addressee:mimeType().

BUG: 292647
MERGE: 4.8
FIXED-IN: 4.8.1

M  +7    -1    resources/dav/common/davutils.cpp

http://commits.kde.org/kdepim-runtime/7820402d17d9a1668db9ca99b07d743728581d0b

diff --git a/resources/dav/common/davutils.cpp b/resources/dav/common/davutils.cpp
index bb3473a..a048e04 100644
--- a/resources/dav/common/davutils.cpp
+++ b/resources/dav/common/davutils.cpp
@@ -144,7 +144,13 @@ DavItem DavUtils::createDavItem( const Akonadi::Item &item, \
const Akonadi::Colle  url = KUrl( basePath + fileName + ".vcf" );
 
     const DavProtocolAttribute *protoAttr = \
                collection.attribute<DavProtocolAttribute>();
-    mimeType = DavManager::self()->davProtocol( DavUtils::Protocol( \
protoAttr->davProtocol() ) )->contactsMimeType(); +    if ( protoAttr ) {
+      mimeType =
+        DavManager::self()->davProtocol(
+          DavUtils::Protocol( protoAttr->davProtocol() ) )->contactsMimeType();
+    } else {
+      mimeType = KABC::Addressee::mimeType();
+    }
 
     KABC::VCardConverter converter;
     rawData = converter.createVCard( contact );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic