[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kopete/protocols/aim
From:       Martijn Klingens <klingens () kde ! org>
Date:       2002-12-21 17:10:47
[Download RAW message or body]

CVS commit by mklingens: 

Don't maintain a custom 'QStringList* screennames', use KopeteProtocol's
contacts() instead.

(*shiver* a _public_ _pointer_ to a QStringList? brr....)


  M +3 -10     aimcontact.cpp   1.73
  M +3 -6      aimprotocol.cpp   1.87
  M +0 -1      aimprotocol.h   1.45


--- kdenonbeta/kopete/protocols/aim/aimcontact.cpp  #1.72:1.73
@@ -49,6 +49,4 @@ AIMContact::AIMContact( const QString na
         //setUserID(contactId());
 
-        mProtocol->screenNames->append( tocNormalize( contactId() ) ); // add \
                contact to Taim's internal list
-
         // Connect signals and slots
 //      connect(mProtocol, SIGNAL(unloading()), this, SLOT(slotUnloading()));
@@ -83,5 +81,8 @@ AIMContact::AIMContact( const QString na
                 connect (parent , SIGNAL( aboutToSave(KopeteMetaContact*) ),
                         protocol, SLOT (serialize(KopeteMetaContact*) ));
+}
 
+AIMContact::~AIMContact()
+{
 }
 
@@ -146,9 +147,4 @@ void AIMContact::slotSendMsg(const Kopet
 }
 
-AIMContact::~AIMContact()
-{
-        mProtocol->screenNames->remove(tocNormalize(contactId()));
-}
-
 KActionCollection* AIMContact::customContextMenuActions()
 {
@@ -217,5 +213,4 @@ void AIMContact::slotUpdateNickname(cons
                         mProtocol->buddyList->del(tocNormalize(contactId()));
                         mProtocol->engine->setBuddyList(*mProtocol->buddyList);
-                        mProtocol->screenNames->remove(tocNormalize(contactId()));
                         delete this;
                 }
@@ -239,5 +234,4 @@ void AIMContact::slotDeleteContact()
                 mProtocol->buddyList->del(tocNormalize(contactId()));
                 mProtocol->removeUserCleanup();
-                mProtocol->screenNames->remove(tocNormalize(contactId()));
                 deleteLater();
         }
@@ -375,5 +369,4 @@ QString AIMContact::statusIcon() const {
 void AIMContact::slotUnloading()
 {
-//      mProtocol->screenNames->remove(tocNormalize(contactId()));
         delete this;
 }

--- kdenonbeta/kopete/protocols/aim/aimprotocol.cpp  #1.86:1.87
@@ -51,5 +51,4 @@ AIMProtocol::AIMProtocol( QObject *paren
                 protocolStatic_ = this;
 
-        screenNames = new QStringList();
         mIsConnected = false;
         // Remember to move all this to init()
@@ -115,8 +114,6 @@ AIMProtocol* AIMProtocol::protocol()
 void AIMProtocol::slotIMReceived(QString sender, QString, bool)
 {
-        if (screenNames->contains(tocNormalize(sender)) == 0)
-        {
+        if( !contacts()[ tocNormalize( sender ) ] )
                 addNewContact(tocNormalize(sender), QString(), false, \
                i18n("Unknown"));
-        }
 }
 
@@ -225,5 +222,5 @@ void AIMProtocol::addOldContact(const TB
         QString groupName;
 
-        if ( screenNames->find(tocNormalize(buddy->name)) != screenNames->end() )
+        if( contacts()[ tocNormalize( buddy->name ) ] )
         return;
 

--- kdenonbeta/kopete/protocols/aim/aimprotocol.h  #1.44:1.45
@@ -116,5 +116,4 @@ public:
         void updateEngine();
         int awayStatus;
-        QStringList *screenNames;
 
         AIMPreferences *prefs() const { return mPrefs; };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic