summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditordialog.cpp2
-rw-r--r--kaddressbook/undocmds.cpp9
2 files changed, 6 insertions, 5 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,
49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), 49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ),
50 SLOT( widgetModified() ) ); 50 SLOT( widgetModified() ) );
51 layout->addWidget( mEditorWidget ); 51 layout->addWidget( mEditorWidget );
52 52
53 enableButton( KDialogBase::Apply, false ); 53 enableButton( KDialogBase::Apply, false );
54 if ( QApplication::desktop()->width() < 480 ) { 54 if ( QApplication::desktop()->width() < 480 ) {
55 hideButtons(); 55 hideButtons();
56 } 56 }
57} 57}
58 58
59AddresseeEditorDialog::~AddresseeEditorDialog() 59AddresseeEditorDialog::~AddresseeEditorDialog()
60{ 60{
61 qDebug("----------------------------------------------- "); 61 qDebug("AddresseeEditorDialog::~AddresseeEditorDialog()");
62 //emit editorDestroyed( mEditorWidget->addressee().uid() ); 62 //emit editorDestroyed( mEditorWidget->addressee().uid() );
63} 63}
64 64
65void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) 65void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr )
66{ 66{
67 enableButton( KDialogBase::Apply, false ); 67 enableButton( KDialogBase::Apply, false );
68 68
69 mEditorWidget->setAddressee( addr ); 69 mEditorWidget->setAddressee( addr );
70} 70}
71 71
72KABC::Addressee AddresseeEditorDialog::addressee() 72KABC::Addressee AddresseeEditorDialog::addressee()
73{ 73{
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index db773be..5fbeec3 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -107,28 +107,29 @@ void PwPasteCommand::undo()
107void PwPasteCommand::redo() 107void PwPasteCommand::redo()
108{ 108{
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 (*it).setUid( KApplication::randomString( 10 ) ); 115 (*it).setUid( KApplication::randomString( 10 ) );
116 uids.append( (*it).uid() ); 116 uids.append( (*it).uid() );
117 mCore->addressBook()->insertAddressee( *it ); 117 mCore->addressBook()->insertAddressee( *it );
118 } 118 }
119 119 if ( uids.count() < 4 ) {
120 QStringList::Iterator uidIt; 120 QStringList::Iterator uidIt;
121 for ( uidIt = uids.begin(); uidIt != uids.end(); ++uidIt ) 121 for ( uidIt = uids.begin(); uidIt != uids.end(); ++uidIt )
122 mCore->editContact( *uidIt ); 122 mCore->editContact( *uidIt );
123 }
123} 124}
124 125
125///////////////////////////////// 126/////////////////////////////////
126// PwNew Methods 127// PwNew Methods
127 128
128PwNewCommand::PwNewCommand( KABC::AddressBook *doc, const KABC::Addressee &a ) 129PwNewCommand::PwNewCommand( KABC::AddressBook *doc, const KABC::Addressee &a )
129 : Command(), mDocument( doc ), mA( a ) 130 : Command(), mDocument( doc ), mA( a )
130{ 131{
131 mDocument->insertAddressee(mA); 132 mDocument->insertAddressee(mA);
132} 133}
133 134
134PwNewCommand::~PwNewCommand() 135PwNewCommand::~PwNewCommand()