tdf#123379: implement native menu bar toggle on/off

qt5 didn't provide implementation of virtual SalMenu::ShowMenuBar
so native menu bar was visible at all times. Hopefully notebookbar
fans are happier now

Change-Id: Ie581397521369160e16f40231bade40100dcd6f6
Reviewed-on: https://gerrit.libreoffice.org/69327
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 612650147cb85e52d317142d022db99a28c0d98a)
Reviewed-on: https://gerrit.libreoffice.org/69512
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index fb2f7e1..7656300 100644
--- a/vcl/inc/qt5/Qt5Menu.hxx
+++ b/vcl/inc/qt5/Qt5Menu.hxx
@@ -51,6 +51,7 @@ public:
    virtual void SetSubMenu(SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos) override;
    virtual void SetFrame(const SalFrame* pFrame) override;
    const Qt5Frame* GetFrame() const;
    virtual void ShowMenuBar(bool bVisible) override;
    Qt5Menu* GetTopLevel();
    virtual void SetItemBits(unsigned nPos, MenuItemBits nBits) override;
    virtual void CheckItem(unsigned nPos, bool bCheck) override;
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 49de2c0..87b4ba4 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -541,6 +541,12 @@ Qt5Menu* Qt5Menu::GetTopLevel()
    return pMenu;
}

void Qt5Menu::ShowMenuBar(bool bVisible)
{
    if (mpQMenuBar && (bVisible != mpQMenuBar->isVisible()))
        bVisible ? mpQMenuBar->show() : mpQMenuBar->hide();
}

const Qt5Frame* Qt5Menu::GetFrame() const
{
    SolarMutexGuard aGuard;