From: Vincent van Ravesteijn Date: Sun, 12 May 2013 16:30:40 +0000 (+0200) Subject: Add a function to translate QStrings X-Git-Tag: 2.1.0beta1~283 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3e65edd7297b5dcf50ec6eefa53056ff91bc368f;p=features.git Add a function to translate QStrings --- 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,