From f341921825370fb98ad896a20d823c5f0cb537f6 Mon Sep 17 00:00:00 2001 From: Aleksei Nikiforov Date: Wed, 27 Feb 2019 15:03:07 +0300 Subject: tdf#121970 KDE5: Regenerate menu when it's set as submenu Also add item bits change notification function for SalMenu to properly convert regenerated menu items to check or radiocheck items. Change-Id: I61f16a771b484644bbefd9afaf2776232d38a2f9 Reviewed-on: https://gerrit.libreoffice.org/68438 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- vcl/inc/qt5/Qt5Menu.hxx | 2 ++ vcl/inc/salmenu.hxx | 1 + 2 files changed, 3 insertions(+) (limited to 'vcl/inc') diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx index 91e1c3e116d5..a11fbd186575 100644 --- a/vcl/inc/qt5/Qt5Menu.hxx +++ b/vcl/inc/qt5/Qt5Menu.hxx @@ -42,6 +42,7 @@ private: void ReinitializeActionGroup(unsigned nPos); void ResetAllActionGroups(); + void UpdateActionGroupItem(Qt5MenuItem* pSalMenuItem); public: Qt5Menu(bool bMenuBar); @@ -54,6 +55,7 @@ public: virtual void SetFrame(const SalFrame* pFrame) override; const Qt5Frame* GetFrame() const; Qt5Menu* GetTopLevel(); + virtual void SetItemBits(unsigned nPos, MenuItemBits nBits) override; virtual void CheckItem(unsigned nPos, bool bCheck) override; virtual void EnableItem(unsigned nPos, bool bEnable) override; virtual void ShowItem(unsigned nPos, bool bShow) override; diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 0b6cd9e22481..6829e3a623d1 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -68,6 +68,7 @@ public: virtual void RemoveItem( unsigned nPos ) = 0; virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0; virtual void SetFrame( const SalFrame* pFrame ) = 0; + virtual void SetItemBits( unsigned /*nPos*/, MenuItemBits /*nBits*/ ) {} virtual void CheckItem( unsigned nPos, bool bCheck ) = 0; virtual void EnableItem( unsigned nPos, bool bEnable ) = 0; virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const OUString& rText )= 0; -- cgit