[vlc-commits] qt: make default controlbar profile names translatable
Fatih Uzunoglu
git at videolan.org
Tue Apr 6 09:54:46 UTC 2021
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Apr 2 01:22:18 2021 +0300| [8a9a83c896f00e7d49a49b3acf5ea7740fba15b2] | committer: Pierre Lamot
qt: make default controlbar profile names translatable
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a9a83c896f00e7d49a49b3acf5ea7740fba15b2
---
.../gui/qt/dialogs/toolbar/controlbar_profile_model.cpp | 14 ++++----------
.../gui/qt/dialogs/toolbar/controlbar_profile_model.hpp | 2 +-
po/POTFILES.in | 2 ++
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp b/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
index a052048bb0..2e6a0cda01 100644
--- a/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
+++ b/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
@@ -36,9 +36,7 @@ decltype (ControlbarProfileModel::m_defaults)
ControlbarProfileModel::m_defaults =
{
{
- {
- "Minimalist Style"
- },
+ N_("Minimalist Style"),
{
{
{
@@ -94,9 +92,7 @@ decltype (ControlbarProfileModel::m_defaults)
}
},
{
- {
- "One-liner Style"
- },
+ N_("One-liner Style"),
{
{
{
@@ -156,9 +152,7 @@ decltype (ControlbarProfileModel::m_defaults)
}
},
{
- {
- "Simplest Style"
- },
+ N_("Simplest Style"),
{
{
{
@@ -241,7 +235,7 @@ void ControlbarProfileModel::insertDefaults()
// Add default profiles:
for (const auto& i : m_defaults)
{
- const auto ptrNewProfile = newProfile(i.name);
+ const auto ptrNewProfile = newProfile(qtr(i.name));
if (!ptrNewProfile)
continue;
diff --git a/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp b/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
index 108229bbe7..ebcb6981ff 100644
--- a/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
+++ b/modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
@@ -92,7 +92,7 @@ private:
int m_selectedProfile = -1;
struct Profile {
- QString name;
+ const char* name;
QVector<ControlbarProfile::Configuration> modelData;
};
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d060836721..0df7774a5e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -760,6 +760,8 @@ modules/gui/qt/dialogs/extensions/extensions_manager.cpp
modules/gui/qt/dialogs/extensions/extensions_manager.hpp
modules/gui/qt/dialogs/playlists/playlists.cpp
modules/gui/qt/dialogs/playlists/playlists.hpp
+modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
+modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
modules/gui/qt/maininterface/main_interface.cpp
modules/gui/qt/maininterface/main_interface.hpp
modules/gui/qt/maininterface/main_interface_win32.cpp
More information about the vlc-commits
mailing list