summaryrefslogtreecommitdiffstats
path: root/kaddressbook/viewmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /kaddressbook/viewmanager.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/viewmanager.cpp')
-rw-r--r--kaddressbook/viewmanager.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 4e4cd5a6..5dab74e2 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -419,7 +419,7 @@ void ViewManager::dropped( TQDropEvent *e )
if ( e->source() == this )
return;
- TQString clipText, vcards;
+ KABC::Addressee::List list;
KURL::List urls;
if ( KURLDrag::decode( e, urls) ) {
@@ -433,10 +433,7 @@ void ViewManager::dropped( TQDropEvent *e )
}
} else if ( c == 1 )
emit urlDropped( *it );
- } else if ( KVCardDrag::decode( e, vcards ) ) {
- KABC::VCardConverter converter;
-
- const KABC::Addressee::List list = converter.parseVCards( vcards );
+ } else if ( KVCardDrag::decode( e, list ) ) {
KABC::Addressee::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
KABC::Addressee a = mCore->addressBook()->findByUid( (*it).uid() );
@@ -467,7 +464,11 @@ void ViewManager::startDrag()
KMultipleDrag *drag = new KMultipleDrag( this );
KABC::VCardConverter converter;
+#if defined(KABC_VCARD_ENCODING_FIX)
+ TQCString vcards = converter.createVCardsRaw( addrList );
+#else
TQString vcards = converter.createVCards( addrList );
+#endif
// Best text representation is given by textdrag, so it must be first
drag->addDragObject( new TQTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) );
@@ -484,7 +485,11 @@ void ViewManager::startDrag()
TQFile tempFile( tempDir.name() + "/" + fileName );
if ( tempFile.open( IO_WriteOnly ) ) {
+#if defined(KABC_VCARD_ENCODING_FIX)
+ tempFile.writeBlock( vcards, vcards.length() );
+#else
tempFile.writeBlock( vcards.utf8() );
+#endif
tempFile.close();
KURLDrag *urlDrag = new KURLDrag( KURL( tempFile.name() ), this );