[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-runtime/KDE/4.8] resources/dav/common: in createDavItem(), if the DavProtocolAttribute is 0,
From: Allen Winter <winter () kde ! org>
Date: 2012-01-31 22:20:20
Message-ID: 20120131222020.A6D4FA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 2d63111321fc3caaa4b2ddd847e29cc301015e03 by Allen Winter.
Committed on 31/01/2012 at 23:17.
Pushed by winterz into branch 'KDE/4.8'.
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
(cherry picked from commit 7820402d17d9a1668db9ca99b07d743728581d0b)
M +7 -1 resources/dav/common/davutils.cpp
http://commits.kde.org/kdepim-runtime/2d63111321fc3caaa4b2ddd847e29cc301015e03
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