From 61563967e74a1b02e82d7d8946e33c188c72e944 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Tue, 17 Feb 2009 14:20:31 +0100 Subject: [PATCH] fixing issues with the nick selector not displaying the current nick --- src/qtui/inputwidget.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index 7d109696..3c7bec53 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -155,6 +155,7 @@ void InputWidget::connectMyIrcUser() { connect(network->me(), SIGNAL(userModesRemoved(QString)), this, SLOT(updateNickSelector())); connect(network->me(), SIGNAL(awaySet(bool)), this, SLOT(updateNickSelector())); disconnect(network, SIGNAL(myNickSet(const QString &)), this, SLOT(connectMyIrcUser())); + updateNickSelector(); } else { connect(network, SIGNAL(myNickSet(const QString &)), this, SLOT(connectMyIrcUser())); } @@ -172,8 +173,9 @@ void InputWidget::setIdentity(IdentityId identityId) { const Identity *identity = Client::identity(identityId); if(identity) { - connect(identity, SIGNAL(nicksSet(QStringList)), - this, SLOT(updateNickSelector())); + connect(identity, SIGNAL(nicksSet(QStringList)), this, SLOT(updateNickSelector())); + } else { + _identityId = 0; } updateNickSelector(); } @@ -187,7 +189,7 @@ void InputWidget::updateNickSelector() const { const Identity *identity = Client::identity(net->identity()); if(!identity) { - qWarning() << "InputWidget::updateNickSelector(): can't find Identity for Network" << net->networkId(); + qWarning() << "InputWidget::updateNickSelector(): can't find Identity for Network" << net->networkId() << "IdentityId:" << net->identity(); return; } -- 2.20.1