Bug 261842 - Right-clicking link in topic shows empty menu - sometimes
Summary: Right-clicking link in topic shows empty menu - sometimes
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-02 02:29 UTC by Nicolás Alvarez
Modified: 2011-01-03 20:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolás Alvarez 2011-01-02 02:29:20 UTC
If I right-click on a link in the topic label (on top of the ircview), it opens an empty context menu. It looks like a 3px square with a shadow around (such tiny windows usually look a bit glitchy in KWin). The context menu of normal text or selected text in the topic label looks OK.

Now, right-clicking a link in the ircview, which shows a normal context menu, makes topic links start showing a correct context menu too! Opening a non-link context menu in the ircview (ie. right-clicking normal text) makes topic link menus stop working again.

Right-clicking normal text in the topic label opens the usual menu for normal text, but makes no difference on topic link context menus (doesn't make them either start nor stop working).

(I'm not 100% sure on what makes the menu start and stop working, this is just my observations)
Comment 1 Eike Hein 2011-01-02 20:41:30 UTC
Could you please state your Qt version? The topic label uses separate code paths on Qt 4.6 and 4.7 due to additions to the QLabel API in Qt 4.7.
Comment 2 Nicolás Alvarez 2011-01-02 20:44:51 UTC
Qt: 4.6.3
KDE Development Platform: 4.4.5 (KDE 4.4.5)
Konversation: 1.3.1+ #4087
Comment 3 Eike Hein 2011-01-03 20:15:23 UTC
commit d675514d3c5fb72ac2754d691789996ce1553299
branch master
Author: Eike Hein <hein@kde.org>
Date:   Mon Jan 3 19:42:38 2011 +0100

    In <Qt 4.7 mode make linkMenu() set the link actions visible in case textMenu() hid them.
    
    BUG:261842

diff --git a/src/viewer/irccontextmenus.cpp b/src/viewer/irccontextmenus.cpp
index 5f1339b..faec234 100644
--- a/src/viewer/irccontextmenus.cpp
+++ b/src/viewer/irccontextmenus.cpp
@@ -916,6 +916,9 @@ void IrcContextMenus::setupLinkMenu()
 
 void IrcContextMenus::linkMenu(const QPoint& pos, const QString& link)
 {
+    foreach(QAction* action, self()->m_linkActions)
+        action->setVisible(true);
+
     QAction* action = self()->m_linkMenu->exec(pos);
 
     processLinkAction(extractActionId(action), link);