-rw-r--r-- | kaddressbook/addresseeeditordialog.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/undocmds.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index 790f148..6bc4129 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -49,25 +49,25 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), SLOT( widgetModified() ) ); layout->addWidget( mEditorWidget ); enableButton( KDialogBase::Apply, false ); if ( QApplication::desktop()->width() < 480 ) { hideButtons(); } } AddresseeEditorDialog::~AddresseeEditorDialog() { - qDebug("----------------------------------------------- "); + qDebug("AddresseeEditorDialog::~AddresseeEditorDialog()"); //emit editorDestroyed( mEditorWidget->addressee().uid() ); } void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) { enableButton( KDialogBase::Apply, false ); mEditorWidget->setAddressee( addr ); } KABC::Addressee AddresseeEditorDialog::addressee() { diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index db773be..5fbeec3 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp @@ -107,29 +107,30 @@ void PwPasteCommand::undo() void PwPasteCommand::redo() { QStringList uids; KABC::Addressee::List::Iterator it; for ( it = mAddresseeList.begin(); it != mAddresseeList.end(); ++it ) { /* we have to set a new uid for the contact, otherwise insertAddressee() ignore it. */ (*it).setUid( KApplication::randomString( 10 ) ); uids.append( (*it).uid() ); mCore->addressBook()->insertAddressee( *it ); } - + if ( uids.count() < 4 ) { QStringList::Iterator uidIt; for ( uidIt = uids.begin(); uidIt != uids.end(); ++uidIt ) mCore->editContact( *uidIt ); } +} ///////////////////////////////// // PwNew Methods PwNewCommand::PwNewCommand( KABC::AddressBook *doc, const KABC::Addressee &a ) : Command(), mDocument( doc ), mA( a ) { mDocument->insertAddressee(mA); } PwNewCommand::~PwNewCommand() { |