Bug 132891

Summary: server list allows identical network names, creating conflicts in the watched nickname list
Product: [Applications] konversation Reporter: Niek Beernink <n.beernink>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Niek Beernink 2006-08-24 00:30:08 UTC
Version:           0.19+ #3131 (using KDE 3.5.4, Kubuntu Package 4:3.5.4-0ubuntu6 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-25-k7

Currently the server list allows for identically named networks. This becomes a problem when you want to add a nickname to a certain server, but since the labels are the same, you don't quite know which one is which. 

Now, I'm not quite sure how to best describe this...

The problems that I see when a user has two identical server names are;

1. The network selection box in watched nicks (Settings => Configure Konversation... => Watched nicks) that lets you adjust the network on which you're watching a nick stops working correctly. It doesn't re-assign the nick to the network you selected since it has the same name.

2. When you're connected to the second identically named network, and you've added a nickname to watch on the first identically named network then rightclicking on a nickname and selecting "Add to watched nicks" is not possible.

3. Similar to point 2. If you're connected to the second network, and you aren't watching a nick on the first server, then right-clicking on a nick and selecting "Add to watched nicks" will add the nick to the first server in the list.

To fix this, users should be disallowed to use an identical server name.

I can provide steps to reproduce if needed. Just ask.
Comment 1 Eike Hein 2006-08-24 00:51:01 UTC
(2) and (3) are fixed in SVN now by using network IDs instead of names in the methods to update the Add-to-Watch-List context menu action. Fixes (2) and (3) in bug #132891, which were caused by my code imitating Dario's other WatchList API, which for some very strange reason uses names to identify networks and thus breaks in various ways. If anyone gets off on pain, he/she might want to look into converting the rest.
Comment 2 Travis McHenry 2009-06-11 20:27:18 UTC
SVN commit 980422 by tjmchenry:

Move serverdialog into servergroupdialog and convert to a .ui
Move channeldialog into servergroupdialog and convert to a .ui
Convert Preferences::ServerGroupList to ServerGroupHash using a QHash to keep track of Id's
Make use of ServerGroupHash in watchednicknames_config and use ID's
BUG:132891
Get rid of valuelistitem in watchednicknames_config and replace with setData/data()
Remove most of serverListItem in serverlistdialog and replace with setData/data()
Convert all possible places using serverGroup->name() to sort/control data to ID's
When nescessary to use names treat it properly, allowing for multiple serverGroups/servers with identical names
Example for above: setChannelEncoding now sets the encoding for all found servers / channels
getChannelEncoding has also been converted to return a QStringList but this is removed with a QStringList.first() to maintain dbus integrity
Connection manager follows similar behaviour, with servergroupidsbyname.first()
Convert 2 calls to identitydialog to pointers

 M  +2 -3      CMakeLists.txt  
 M  +29 -24    application.cpp  
 M  +68 -92    config/preferences.cpp  
 M  +8 -8      config/preferences.h  
 D             config/valuelistviewitem.cpp  
 D             config/valuelistviewitem.h  
 M  +47 -114   config/watchednicknames_config.cpp  
 M  +5 -5      config/watchednicknames_config.h  
 M  +4 -5      connectionmanager.cpp  
 M  +4 -11     identitydialog.cpp  
 D             irc/channeldialog.cpp  
 D             irc/channeldialog.h  
 A             irc/channeldialogui.ui  
 M  +2 -4      irc/outputfilter.cpp  
 M  +21 -5     irc/server.cpp  
 D             irc/serverdialog.cpp  
 D             irc/serverdialog.h  
 A             irc/serverdialogui.ui  
 M  +108 -7    irc/servergroupdialog.cpp  
 M  +39 -3     irc/servergroupdialog.h  
 M  +9 -0      irc/servergroupdialogui.ui  
 M  +1 -1      irc/servergroupsettings.h  
 M  +1 -1      irc/serverison.cpp  
 M  +70 -106   irc/serverlistdialog.cpp  
 M  +14 -21    irc/serverlistdialog.h  
 M  +7 -6      mainwindow.cpp  
 M  +7 -22     viewer/editnotifydialog.cpp  
 M  +2 -2      viewer/editnotifydialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=980422