From 3e65edd7297b5dcf50ec6eefa53056ff91bc368f Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 12 May 2013 18:30:40 +0200 Subject: [PATCH] Add a function to translate QStrings --- src/frontends/qt4/qt_helpers.cpp | 6 ++++++ src/frontends/qt4/qt_helpers.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 17d138fc8d..d6744525f1 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -227,6 +227,12 @@ QString const qt_(string const & str) } +QString const qt_(QString const & qstr) +{ + return toqstr(_(fromqstr(qstr))); +} + + void rescanTexStyles(string const & arg) { // Run rescan in user lyx directory diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h index 753fdbfad3..7a5f8cd6dd 100644 --- a/src/frontends/qt4/qt_helpers.h +++ b/src/frontends/qt4/qt_helpers.h @@ -83,6 +83,8 @@ void setSectionResizeMode(QHeaderView * view, * Use this in qt4/ instead of _() */ QString const qt_(std::string const & str); +QString const qt_(QString const & qstr); + /// support::FileName libFileSearch(QString const & dir, QString const & name, -- 2.39.2