diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-05-23 11:23:34 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-01 10:06:32 +0200 |
commit | 5b02225ff7f963a79e0177150de8257626f0d2a1 (patch) | |
tree | 61514960a902a1cd23d70859d8dfb9441c42d21b /vcl/qt5 | |
parent | 2ebd9da7d5903804743667660fc970a2a9d42321 (diff) |
Insert separators into native menu
Change-Id: I88bb70b1e443821cc8d1904039f2a8fb52df1ff9
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Menu.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 65bf726252df..0575d5aab693 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -105,8 +105,13 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* pParentMenu ) // submenu pQMenu = pQMenu->addMenu( toQString(aText) ); else - // leaf menu - pQMenu->addAction( toQString(aText) ); + { + if ( pSalMenuItem->mnType == MenuItemType::SEPARATOR ) + pQMenu->addSeparator(); + else + // leaf menu + pQMenu->addAction( toQString(aText) ); + } } if ( pSalMenuItem->mpSubMenu != nullptr ) @@ -153,6 +158,7 @@ void Qt5Menu::NativeItemText( OUString& rItemText ) Qt5MenuItem::Qt5MenuItem( const SalItemParams* pItemData ) : mnId( pItemData->nId ), + mnType( pItemData->eType ), mpVCLMenu( pItemData->pMenu ), mpParentMenu( nullptr ), mpSubMenu( nullptr ) |