diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-05-17 15:09:48 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-01 10:06:31 +0200 |
commit | a2e372362a8e129f88762b4c31f9e5459370dfe4 (patch) | |
tree | 96e92a66857577c9ef530d32d26329241c02a93b /vcl | |
parent | 8c98a74906d3e132eaab349806627a9340edc191 (diff) |
Replace ~ with & (Qt accelerator marker) in menu entries
Change-Id: Ie7866357d4e74b778849262c1c2b60605a26faad
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/qt5/Qt5Menu.hxx | 2 | ||||
-rw-r--r-- | vcl/qt5/Qt5Menu.cxx | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx index 1d1048881fbc..aa3948ce6d2d 100644 --- a/vcl/inc/qt5/Qt5Menu.hxx +++ b/vcl/inc/qt5/Qt5Menu.hxx @@ -30,6 +30,8 @@ private: void ActivateAllSubMenus( Menu* pMenuBar ); void Update(); + void NativeItemText( OUString &rItemText ); + public: Qt5Menu( bool bMenuBar ); virtual ~Qt5Menu() override; diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index b82b525462c0..e70e2d1896a9 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -99,6 +99,7 @@ void Qt5Menu::Update() if (mbMenuBar && mpQMenuBar) { + NativeItemText( aText ); mpQMenuBar->addMenu( toQString(aText) ); } } @@ -132,6 +133,10 @@ void Qt5Menu::GetSystemMenuData( SystemMenuData* pData ) { } +void Qt5Menu::NativeItemText( OUString& rItemText ) +{ + rItemText = rItemText.replace( '~', '&' ); +} Qt5MenuItem::Qt5MenuItem( const SalItemParams* pItemData ) : mnId( pItemData->nId ), |