projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This Update is like 90% bugfixes.
[quassel.git]
/
src
/
common
/
ircchannel.cpp
diff --git
a/src/common/ircchannel.cpp
b/src/common/ircchannel.cpp
index
95d0ed1
..
29b618f
100644
(file)
--- a/
src/common/ircchannel.cpp
+++ b/
src/common/ircchannel.cpp
@@
-107,6
+107,7
@@
void IrcChannel::join(IrcUser *ircuser) {
if(!_userModes.contains(ircuser) && ircuser) {
_userModes[ircuser] = QString();
ircuser->joinChannel(name());
if(!_userModes.contains(ircuser) && ircuser) {
_userModes[ircuser] = QString();
ircuser->joinChannel(name());
+ connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));
// no emit here since the join is propagated by IrcUser
}
}
// no emit here since the join is propagated by IrcUser
}
}
@@
-175,10
+176,10
@@
void IrcChannel::removeUserMode(const QString &nick, const QString &mode) {
// INIT SET USER MODES
QVariantMap IrcChannel::initUserModes() const {
QVariantMap usermodes;
// INIT SET USER MODES
QVariantMap IrcChannel::initUserModes() const {
QVariantMap usermodes;
- QHashIterator<IrcUser *, QString> iter(_userModes);
- while(iter.hasNext()) {
- iter.next();
+ QHash<IrcUser *, QString>::const_iterator iter = _userModes.constBegin();
+ while(iter != _userModes.constEnd()) {
usermodes[iter.key()->nick()] = iter.value();
usermodes[iter.key()->nick()] = iter.value();
+ iter++;
}
return usermodes;
}
}
return usermodes;
}
@@
-192,7
+193,9
@@
void IrcChannel::initSetUserModes(const QVariantMap &usermodes) {
}
void IrcChannel::ircUserDestroyed() {
}
void IrcChannel::ircUserDestroyed() {
- part(qobject_cast<IrcUser *>(sender()));
+ IrcUser *ircUser = static_cast<IrcUser *>(sender());
+ Q_ASSERT(ircUser);
+ _userModes.remove(ircUser);
}
void IrcChannel::setInitialized() {
}
void IrcChannel::setInitialized() {