diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-25 21:10:05 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-25 21:10:05 -0700 |
commit | 1d0d42f861fc3a658eb22b99ba58616d716e095e (patch) | |
tree | 8c7f01bf5cdde01e6b9942740dcd547d43d0c06a /qt-gui.cpp | |
parent | 106659774ae83b7442f6cc749273248e07ff6c80 (diff) | |
download | subsurface-1d0d42f861fc3a658eb22b99ba58616d716e095e.tar.gz |
Remove the explicit UTF-8 conversions
Thanks to commit bdbfdcdfa0fb ('Ask Qt 4 to use the UTF-8 codec as the
"codec for C strings"') we no longer need the explicit UTF-8 conversion
when creating QStrings from char *.
Suggested-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index d13c3c449..7853cc4c0 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -60,7 +60,7 @@ Translator::Translator(QObject *parent): QString Translator::translate(const char *context, const char *sourceText, const char *disambiguation) const { - return QString::fromUtf8(gettext(sourceText)); + return gettext(sourceText); } static const GdkPixdata subsurface_icon_pixbuf = {}; @@ -1795,7 +1795,7 @@ void MainWindow::setCurrentFileName(const QString &fileName) void MainWindow::on_actionOpen_triggered() { - QString defaultFileName = QString::fromUtf8(prefs.default_filename); + QString defaultFileName = prefs.default_filename; QFileInfo fileInfo(defaultFileName); QFileDialog dialog(this, tr("Open File"), fileInfo.path()); |