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

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/oscar
From:       Matt Rogers <mattr () kde ! org>
Date:       2005-04-02 4:34:25
Message-ID: 20050402043425.7ED54490 () office ! kde ! org
[Download RAW message or body]

CVS commit by mattr: 

Display only one error when we hit an unknown error that I don't do a good
job of handling yet. You get to choose whether or not to reconnect now.

BUG: 100064
CCBUG: 101626


  M +1 -1      oscaraccount.cpp   1.174
  M +3 -27     liboscar/client.cpp   1.13
  M +0 -2      liboscar/client.h   1.12
  M +5 -5      liboscar/connectionlist.cpp   1.3


--- kdenetwork/kopete/protocols/oscar/oscaraccount.cpp  #1.173:1.174
@@ -248,5 +248,5 @@ void OscarAccount:: protocolError( int e
                 if ( psError == 0 ) //zero is a generic error when i don't know \
what's wrong. :/  {
-                        disconnected( Kopete::Account::ConnectionReset );
+                        disconnected( Kopete::Account::Manual );
                 }
                 

--- kdenetwork/kopete/protocols/oscar/liboscar/client.cpp  #1.12:1.13
@@ -125,32 +125,8 @@ Client::~Client()
         //delete the connections differently than in deleteConnections()
         //deleteLater() seems to cause destruction order issues
-        QValueList<Connection*> connList = d->connections.getConnections();
-        QValueList<Connection*>::iterator it = connList.begin();
-        d->connections.removeAllConnections();
-        while ( it != connList.end() )
-        {
-                Connection* c = *it;
-                it = connList.remove( it );
-                delete c;
-        }
-        
         delete d->ssiManager;
         delete d;
 }
 
-void Client::deleteConnections()
-{
-//      kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Deleting " << \
                d->connections.count() << " connections" << endl;
-        QValueList<Connection*> list = d->connections.getConnections();
-        QValueList<Connection*>::iterator it = list.begin();
-        d->connections.removeAllConnections();
-        while ( it != list.end() )
-        {
-                Connection* c = *it;
-                it = list.remove( it );
-                c->deleteLater();
-        }
-}
-
 void Client::connectToServer( Connection *c, const QString& server, bool auth )
 {
@@ -184,5 +160,4 @@ void Client::close()
         d->active = false;
 //      kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Closing " << \
                d->connections.count() << " connections" << endl;
-        deleteConnections();
         //these are based on a connection. delete them.
         delete d->errorTask;
@@ -207,4 +182,5 @@ void Client::close()
 //      kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Clearing our internal SSI list" \
<< endl;  d->ssiManager->clear();
+        d->connections.removeAllConnections();
 }
 

--- kdenetwork/kopete/protocols/oscar/liboscar/client.h  #1.11:1.12
@@ -382,6 +382,4 @@ protected slots:
 
 private:
-        /** Delete the connections */
-        void deleteConnections();
         
         /** Initialize some static tasks */

--- kdenetwork/kopete/protocols/oscar/liboscar/connectionlist.cpp  #1.2:1.3
@@ -35,7 +35,4 @@ ConnectionList::ConnectionList()
 ConnectionList::~ConnectionList()
 {
-        delete m_bosConnection;
-        delete m_authConnection;
-        delete m_iconConnection;
 }
 
@@ -57,4 +54,7 @@ QValueList<Connection*> ConnectionList::
 void ConnectionList::removeAllConnections()
 {
+        delete m_authConnection;
+        delete m_bosConnection;
+        delete m_iconConnection;
         m_bosConnection = 0;
         m_authConnection = 0;


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

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