Bug 403704

Summary: Opening server context menu makes File menu actions apply to wrong server
Product: [Applications] konversation Reporter: Nicolás Alvarez <nalvarez>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 1.7.5   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Nicolás Alvarez 2019-01-28 18:40:34 UTC
SUMMARY
If I open the context menu of a server tab, Konversation gets into a broken state where the File->Reconnect and File->Disconnect menu items will apply to that server, regardless of what tab is currently selected.

STEPS TO REPRODUCE
1. Connect to two or more servers.
2. Try File->Reconnect or File->Disconnect actions. They work as expected, applying to the currently selected server.
3. Right-click server tab 1; the context menu appears. Select any menu item, or dismiss the context menu without selecting any menu item; it makes no difference.
4. Select server tab 2, and run File->Reconnect. Now Konversation incorrectly reconnects server tab 1.

Now every time you run File->{Disconnect,Reconnect,Join channel}, it will apply to server tab 1 regardless of the current tab, until Konversation is restarted (goes back to sane behavior) or you right-click a different server (makes that the server where actions always apply).

SOFTWARE/OS VERSIONS
Debian testing
Konversation 1.7.5
(available in About System)
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3
Comment 1 Nicolás Alvarez 2019-01-28 18:41:44 UTC
<argonel> nicolas17: m_contextServer is only set when showViewContextMenu is called on a ChatWindow::Status
<argonel> it doesn't seem to get cleared until a showViewContextMenu is called on something other than a status window

Indeed, it looks like right-clicking a *channel* tab also fixes this without needing to restart Konversation.