[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/network/konversation/src
From: Dario Abatianni <eisfuchs () tigress ! com>
Date: 2006-01-31 21:43:50
Message-ID: 1138743830.116673.30854.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 504369 by abatianni:
don't sort watched nicks under other nicknames named the same as a network anymore \
(makes no sense? well, hard to explain)
M +16 -1 nicksonline.cpp
M +6 -0 nicksonline.h
--- trunk/extragear/network/konversation/src/nicksonline.cpp #504368:504369
@@ -184,6 +184,21 @@
}
/**
+ * Returns a pointer to the network QListViewItem with the given name.
+ * @param name The name of the network, assumed to be in column 0 of \
the item. + * @return Pointer to the QListViewItem or 0 if not \
found. + */
+QListViewItem* NicksOnline::findNetworkRoot(const QString& name)
+{
+ QListViewItem* child;
+ for (child = getNickListView()->firstChild(); (child) ; child = \
child->nextSibling()) + {
+ if (child->text(0) == name) return child;
+ }
+ return 0;
+}
+
+/**
* Return a string containing formatted additional information about a nick.
* @param nickInfo A pointer to NickInfo structure for the nick. May be \
Null.
* @param addressee Addressbook entry for the nick. May be empty.
@@ -241,7 +256,7 @@
// TODO: The method name "getServerGroup" is a misnomer. Actually returns the
// network for a server.
QString networkName = servr->getServerGroup();
- QListViewItem* networkRoot = m_nickListView->findItem(networkName, nlvcNetwork);
+ QListViewItem* networkRoot = findNetworkRoot(networkName);
// If network is not in our list, add it.
if (!networkRoot)
{
--- trunk/extragear/network/konversation/src/nicksonline.h #504368:504369
@@ -142,6 +142,12 @@
*/
QListViewItem* findItemChild(const QListViewItem* parent, const QString& \
name); /**
+ * Returns a pointer to the network QListViewItem with the given name.
+ * @param name The name of the network, assumed to be in column \
0 of the item. + * @return Pointer to the QListViewItem or 0 \
if not found. + */
+ QListViewItem* findNetworkRoot(const QString& name);
+ /**
* Refresh the nicklistview for all servers.
*/
void refreshAllServerOnlineLists();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic