https://bugs.kde.org/show_bug.cgi?id=375498

David Edmundson <k...@davidedmundson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/pla
                   |                            |sma-integration/bac5a39f01a
                   |                            |88edd1a1165d3f3d08507742367
                   |                            |fe
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from David Edmundson <k...@davidedmundson.co.uk> ---
Git commit bac5a39f01a88edd1a1165d3f3d08507742367fe by David Edmundson.
Committed on 25/01/2017 at 12:17.
Pushed by davidedmundson into branch 'Plasma/5.9'.

Add workaround for QMenuBar::setVisible bug in 5.7.0

Summary:
QMenuBar::setVisible() only checks isNativeMenuBar on OS X
leading to both the normal in-appmenu and the platform menu both being
visible - especially as KXmlGui explicitly has a setVisible call.

This only affects Qt 5.7.0.
For Qt < 5.7.0 we don't have any DBusMenu support.
For Qt >= 5.7.1 the problem is fixed.

This patch adds a (horrible) event filter on any QMenuBar's and blocks
any setVisible calls.

Qt 5.7.0
void QMenuBar::setVisible(bool visible)
{
    if (isNativeMenuBar()) {
        if (!visible)
            QWidget::setVisible(false);
        return;
    }
    QWidget::setVisible(visible);
}

Qt 5.7.1
void QMenuBar::setVisible(bool visible)
{
    if (isNativeMenuBar()) {
        if (!visible)
            QWidget::setVisible(false);
        return;
    }
    QWidget::setVisible(visible);
}

Test Plan:
Ran on a system with Qt 5.7.0
No longer get double menus

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4276

M  +42   -0    src/platformtheme/qdbusmenubar.cpp
M  +2    -0    src/platformtheme/qdbusmenubar_p.h

https://commits.kde.org/plasma-integration/bac5a39f01a88edd1a1165d3f3d08507742367fe

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to