summaryrefslogtreecommitdiffabout
path: root/kaddressbook/undocmds.cpp
Unidiff
Diffstat (limited to 'kaddressbook/undocmds.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/undocmds.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index 5fbeec3..5807dc0 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -33,13 +33,13 @@
33 33
34#include "addresseeutil.h" 34#include "addresseeutil.h"
35#include "addresseeconfig.h" 35#include "addresseeconfig.h"
36#include "kabcore.h" 36#include "kabcore.h"
37 37
38#include "undocmds.h" 38#include "undocmds.h"
39 39extern bool pasteWithNewUid;
40///////////////////////////////// 40/////////////////////////////////
41// PwDelete Methods 41// PwDelete Methods
42 42
43PwDeleteCommand::PwDeleteCommand(KABC::AddressBook *doc, 43PwDeleteCommand::PwDeleteCommand(KABC::AddressBook *doc,
44 const QStringList &uidList) 44 const QStringList &uidList)
45 : Command(), mDocument(doc), mAddresseeList(), mUidList(uidList) 45 : Command(), mDocument(doc), mAddresseeList(), mUidList(uidList)
@@ -109,12 +109,13 @@ void PwPasteCommand::redo()
109 QStringList uids; 109 QStringList uids;
110 KABC::Addressee::List::Iterator it; 110 KABC::Addressee::List::Iterator it;
111 for ( it = mAddresseeList.begin(); it != mAddresseeList.end(); ++it ) { 111 for ( it = mAddresseeList.begin(); it != mAddresseeList.end(); ++it ) {
112 /* we have to set a new uid for the contact, otherwise insertAddressee() 112 /* we have to set a new uid for the contact, otherwise insertAddressee()
113 ignore it. 113 ignore it.
114 */ 114 */
115 if ( pasteWithNewUid )
115 (*it).setUid( KApplication::randomString( 10 ) ); 116 (*it).setUid( KApplication::randomString( 10 ) );
116 uids.append( (*it).uid() ); 117 uids.append( (*it).uid() );
117 mCore->addressBook()->insertAddressee( *it ); 118 mCore->addressBook()->insertAddressee( *it );
118 } 119 }
119 if ( uids.count() < 4 ) { 120 if ( uids.count() < 4 ) {
120 QStringList::Iterator uidIt; 121 QStringList::Iterator uidIt;