[Konversation-devel] [Bug 247072] Nick list takes long time to show with "show hostmasks" turned on
Peter Simonsson
peter.simonsson at gmail.com
Mon Aug 9 15:00:38 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=247072
Peter Simonsson <peter.simonsson at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #1 from Peter Simonsson <peter simonsson gmail com> 2010-08-09 15:00:35 ---
commit aeb686f9aa3f908fcc17020ac495b71a907e0d01
Author: Peter Simonsson <peter.simonsson at gmail.com>
Date: Mon Aug 9 14:59:40 2010 +0200
Fix slowness of showing nicks in nicklist when hostmasks is shown.
BUG:247072
diff --git a/src/irc/channel.cpp b/src/irc/channel.cpp
index 9b8d332..85b8c9d 100644
--- a/src/irc/channel.cpp
+++ b/src/irc/channel.cpp
@@ -300,9 +300,6 @@ Channel::Channel(QWidget* parent, QString _name) :
ChatWindow(parent)
connect(&userhostTimer,SIGNAL (timeout()),this,SLOT (autoUserhost()));
- // every few seconds try to get more userhosts
- userhostTimer.start(10000);
-
m_whoTimer.setSingleShot(true);
connect(&m_whoTimer,SIGNAL (timeout()),this,SLOT (autoWho()));
@@ -2556,12 +2553,10 @@ void Channel::autoUserhost()
if(!nickString.isEmpty()) m_server->requestUserhost(nickString);
}
- // Resize columns if needed (on regular basis)
- if (m_nicknameListViewTextChanged & (1 << Nick::NicknameColumn))
- nicknameListView->resizeColumnToContents(Nick::NicknameColumn);
- if (m_nicknameListViewTextChanged & (1 << Nick::HostmaskColumn))
- nicknameListView->resizeColumnToContents(Nick::HostmaskColumn);
- m_nicknameListViewTextChanged = 0;
+ if(!nicknameList.isEmpty())
+ {
+ resizeNicknameListViewColumns();
+ }
}
void Channel::setAutoUserhost(bool state)
@@ -2772,6 +2767,9 @@ void Channel::processPendingNicks()
m_processingTimer->stop();
sortNickList();
nicknameListView->setUpdatesEnabled(true);
+
+ if (Preferences::self()->autoUserhost())
+ resizeNicknameListViewColumns();
}
}
@@ -3007,6 +3005,17 @@ void Channel::updateChannelNicks(const QString& channel)
}
}
+void Channel::resizeNicknameListViewColumns()
+{
+ // Resize columns if needed (on regular basis)
+ if (m_nicknameListViewTextChanged & (1 << Nick::NicknameColumn))
+ nicknameListView->resizeColumnToContents(Nick::NicknameColumn);
+ if (m_nicknameListViewTextChanged & (1 << Nick::HostmaskColumn))
+ nicknameListView->resizeColumnToContents(Nick::HostmaskColumn);
+ m_nicknameListViewTextChanged = 0;
+}
+
+
//
// NickList
//
diff --git a/src/irc/channel.h b/src/irc/channel.h
index 967cca7..25ca6fc 100644
--- a/src/irc/channel.h
+++ b/src/irc/channel.h
@@ -147,6 +147,8 @@ class Channel : public ChatWindow
void adjustOps(int value);
virtual void emitUpdateInfo();
+ void resizeNicknameListViewColumns();
+
protected slots:
void purgeNicks();
void processPendingNicks();
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list