[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 14 14:00:00 UTC 2018


 vcl/qt5/Qt5Menu.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2aee047beae576823c4625678c6220012ff95c88
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Sat Dec 8 03:35:09 2018 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Dec 14 14:59:34 2018 +0100

    tdf#121974 Convert Qt menu text as needed
    
    Just as is already done in 'Qt5Menu::InsertMenuItem',
    the text needs to be converted in 'Qt5Menu::SetItemText'
    as well.
    
    Change-Id: I03c8f2e6fe0e926a3f7e4be5b7eac70f1bd9850f
    Reviewed-on: https://gerrit.libreoffice.org/64796
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit ee53d07ae17747cb81340c05983b1937bd23c136)
    Reviewed-on: https://gerrit.libreoffice.org/65154

diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index acb8f957fcf6..130d7c583f58 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -287,7 +287,11 @@ void Qt5Menu::SetItemText(unsigned, SalMenuItem* pItem, const OUString& rText)
     Qt5MenuItem* pSalMenuItem = static_cast<Qt5MenuItem*>(pItem);
     QAction* pAction = pSalMenuItem->getAction();
     if (pAction)
-        pAction->setText(toQString(rText));
+    {
+        OUString aText(rText);
+        NativeItemText(aText);
+        pAction->setText(toQString(aText));
+    }
 }
 
 void Qt5Menu::SetItemImage(unsigned, SalMenuItem* pItem, const Image& rImage)


More information about the Libreoffice-commits mailing list