[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/protocols/irc
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2003-03-14 16:05:44
[Download RAW message or body]
CVS commit by ogoffart:
Patch by Gerónimo Poppino <gresco@interlap.com.ar> to fix crach when removing
an IRCAccount
thanks
M +13 -0 ircaccount.cpp 1.10
M +1 -0 ircaccount.h 1.7
M +0 -1 ircchannelcontact.cpp 1.40
--- kdenonbeta/kopete/protocols/irc/ircaccount.cpp #1.9:1.10
@@ -145,4 +145,7 @@ bool IRCAccount::addContact( const QStri
m->setTemporary(false);
+ QObject::connect(c, SIGNAL(contactDestroyed(KopeteContact *)), this,
+ SLOT(slotContactDestroy(KopeteContact *)));
+
return true;
}
@@ -225,4 +228,14 @@ void IRCAccount::unregisterUser( const Q
}
}
+}
+
+void IRCAccount::slotContactDestroy(KopeteContact *contact)
+{
+ const QString id = contact->contactId();
+
+ if ( id.startsWith( QString::fromLatin1("#") ) )
+ unregisterChannel(id);
+ else
+ unregisterUser(id);
}
--- kdenonbeta/kopete/protocols/irc/ircaccount.h #1.6:1.7
@@ -109,4 +109,5 @@ private slots:
void slotConnectionClosed();
void slotNewPrivMessage(const QString &originating, const QString &target, \
const QString &message); + void slotContactDestroy(KopeteContact *);
private:
--- kdenonbeta/kopete/protocols/irc/ircchannelcontact.cpp #1.39:1.40
@@ -78,5 +78,4 @@ IRCChannelContact::IRCChannelContact(IRC
IRCChannelContact::~IRCChannelContact()
{
- mAccount->unregisterChannel(mNickName);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic