diff options
Diffstat (limited to 'kaddressbook/undocmds.cpp')
-rw-r--r-- | kaddressbook/undocmds.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index dc66696e5..aff63dd31 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp @@ -37,9 +37,9 @@ #include "undocmds.h" -bool Command::resourceExist( KABC::Resource *resource ) +bool Command::resourceExist( TDEABC::Resource *resource ) { - TQPtrList<KABC::Resource> lst = addressBook()->resources(); + TQPtrList<TDEABC::Resource> lst = addressBook()->resources(); for ( Resource *res = lst.first(); res; res = lst.next() ) { if ( res == resource ) return true; @@ -47,7 +47,7 @@ bool Command::resourceExist( KABC::Resource *resource ) return false; } -DeleteCommand::DeleteCommand( KABC::AddressBook *addressBook, +DeleteCommand::DeleteCommand( TDEABC::AddressBook *addressBook, const TQStringList &uidList) : Command( addressBook ), mUIDList( uidList ) { @@ -61,8 +61,8 @@ TQString DeleteCommand::name() const void DeleteCommand::unexecute() { // Put it back in the document - KABC::Addressee::List::ConstIterator it; - const KABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -79,7 +79,7 @@ void DeleteCommand::unexecute() void DeleteCommand::execute() { - KABC::Addressee addr; + TDEABC::Addressee addr; TQStringList::ConstIterator it; const TQStringList::ConstIterator endIt( mUIDList.end() ); @@ -91,8 +91,8 @@ void DeleteCommand::execute() cfg.remove(); } - KABC::Addressee::List::ConstIterator addrIt; - const KABC::Addressee::List::ConstIterator addrEndIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator addrIt; + const TDEABC::Addressee::List::ConstIterator addrEndIt( mAddresseeList.end() ); for ( addrIt = mAddresseeList.begin(); addrIt != addrEndIt; ++addrIt ) { if ( resourceExist( ( *addrIt ).resource() ) ) addressBook()->removeAddressee( *addrIt ); @@ -101,7 +101,7 @@ void DeleteCommand::execute() } -PasteCommand::PasteCommand( KAB::Core *core, const KABC::Addressee::List &addressees ) +PasteCommand::PasteCommand( KAB::Core *core, const TDEABC::Addressee::List &addressees ) : Command( core->addressBook() ), mAddresseeList( addressees ), mCore( core ) { } @@ -113,8 +113,8 @@ TQString PasteCommand::name() const void PasteCommand::unexecute() { - KABC::Addressee::List::ConstIterator it; - const KABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -131,15 +131,15 @@ void PasteCommand::execute() { TQStringList uids; - KABC::Addressee::List::ConstIterator constIt; - const KABC::Addressee::List::ConstIterator constEndIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator constIt; + const TDEABC::Addressee::List::ConstIterator constEndIt( mAddresseeList.end() ); // lock resources for ( constIt = mAddresseeList.begin(); constIt != constEndIt; ++constIt ) lock()->lock( (*constIt).resource() ); - KABC::Addressee::List::Iterator it; - const KABC::Addressee::List::Iterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::Iterator it; + const TDEABC::Addressee::List::Iterator endIt( mAddresseeList.end() ); for ( it = mAddresseeList.begin(); it != endIt; ++it ) { if ( resourceExist( ( *it ).resource() ) ) { @@ -157,7 +157,7 @@ void PasteCommand::execute() } -NewCommand::NewCommand( KABC::AddressBook *addressBook, const KABC::Addressee::List &addressees ) +NewCommand::NewCommand( TDEABC::AddressBook *addressBook, const TDEABC::Addressee::List &addressees ) : Command( addressBook ), mAddresseeList( addressees ) { } @@ -169,8 +169,8 @@ TQString NewCommand::name() const void NewCommand::unexecute() { - KABC::Addressee::List::ConstIterator it; - const KABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -185,8 +185,8 @@ void NewCommand::unexecute() void NewCommand::execute() { - KABC::Addressee::List::Iterator it; - const KABC::Addressee::List::Iterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::Iterator it; + const TDEABC::Addressee::List::Iterator endIt( mAddresseeList.end() ); // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -200,9 +200,9 @@ void NewCommand::execute() } -EditCommand::EditCommand( KABC::AddressBook *addressBook, - const KABC::Addressee &oldAddressee, - const KABC::Addressee &newAddressee ) +EditCommand::EditCommand( TDEABC::AddressBook *addressBook, + const TDEABC::Addressee &oldAddressee, + const TDEABC::Addressee &newAddressee ) : Command( addressBook ), mOldAddressee( oldAddressee ), mNewAddressee( newAddressee ) { @@ -234,7 +234,7 @@ void EditCommand::execute() } -CutCommand::CutCommand( KABC::AddressBook *addressBook, const TQStringList &uidList ) +CutCommand::CutCommand( TDEABC::AddressBook *addressBook, const TQStringList &uidList ) : Command( addressBook ), mUIDList( uidList ) { } @@ -246,8 +246,8 @@ TQString CutCommand::name() const void CutCommand::unexecute() { - KABC::Addressee::List::ConstIterator it; - const KABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -268,7 +268,7 @@ void CutCommand::unexecute() void CutCommand::execute() { - KABC::Addressee addr; + TDEABC::Addressee addr; TQStringList::ConstIterator it; const TQStringList::ConstIterator endIt( mUIDList.end() ); @@ -278,8 +278,8 @@ void CutCommand::execute() lock()->lock( addr.resource() ); } - KABC::Addressee::List::ConstIterator addrIt; - const KABC::Addressee::List::ConstIterator addrEndIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator addrIt; + const TDEABC::Addressee::List::ConstIterator addrEndIt( mAddresseeList.end() ); for ( addrIt = mAddresseeList.begin(); addrIt != addrEndIt; ++addrIt ) { if ( resourceExist( ( *addrIt ).resource() ) ) addressBook()->removeAddressee( *addrIt ); @@ -299,8 +299,8 @@ void CutCommand::execute() #endif } -CopyToCommand::CopyToCommand( KABC::AddressBook *addressBook, const TQStringList &uidList, - KABC::Resource *resource ) +CopyToCommand::CopyToCommand( TDEABC::AddressBook *addressBook, const TQStringList &uidList, + TDEABC::Resource *resource ) : Command( addressBook ), mUIDList( uidList ), mResource( resource ) { } @@ -312,8 +312,8 @@ TQString CopyToCommand::name() const void CopyToCommand::unexecute() { - KABC::Addressee::List::ConstIterator it; - const KABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); + TDEABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List::ConstIterator endIt( mAddresseeList.end() ); //For copy : just remove it from the "copied to" resource. // lock resources for ( it = mAddresseeList.begin(); it != endIt; ++it ) @@ -332,9 +332,9 @@ void CopyToCommand::execute() TQStringList::Iterator it( mUIDList.begin() ); const TQStringList::Iterator endIt( mUIDList.end() ); while ( it != endIt ) { - KABC::Addressee addr = addressBook()->findByUid( *it++ ); + TDEABC::Addressee addr = addressBook()->findByUid( *it++ ); if ( !addr.isEmpty() ) { - KABC::Addressee newAddr( addr ); + TDEABC::Addressee newAddr( addr ); // We need to set a new uid, otherwise the insert below is // ignored. This is bad for syncing, but unavoidable, afaiks newAddr.setUid( TDEApplication::randomString( 10 ) ); @@ -349,7 +349,7 @@ void CopyToCommand::execute() } MoveToCommand::MoveToCommand( KAB::Core *core, const TQStringList &uidList, - KABC::Resource *resource ) + TDEABC::Resource *resource ) : Command( core->addressBook() ), mUIDList( uidList ), mResource( resource ), mCore( core ) { } @@ -362,7 +362,7 @@ TQString MoveToCommand::name() const void MoveToCommand::unexecute() { //For move : remove it from the "copied to" resource and insert it back to "copied from" resource. - KABC::Resource *resource = mCore->requestResource( mCore->widget() ); + TDEABC::Resource *resource = mCore->requestResource( mCore->widget() ); if ( !resource ) return; moveContactTo( resource ); @@ -373,15 +373,15 @@ void MoveToCommand::execute() moveContactTo( mResource ); } -void MoveToCommand::moveContactTo( KABC::Resource *resource ) +void MoveToCommand::moveContactTo( TDEABC::Resource *resource ) { KABLock::self( addressBook() )->lock( resource ); TQStringList::Iterator it( mUIDList.begin() ); const TQStringList::Iterator endIt( mUIDList.end() ); while ( it != endIt ) { - KABC::Addressee addr = addressBook()->findByUid( *it++ ); + TDEABC::Addressee addr = addressBook()->findByUid( *it++ ); if ( !addr.isEmpty() ) { - KABC::Addressee newAddr( addr ); + TDEABC::Addressee newAddr( addr ); // We need to set a new uid, otherwise the insert below is // ignored. This is bad for syncing, but unavoidable, afaiks TQString uid = TDEApplication::randomString( 10 ); |