diff options
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 ), |