diff options
author | Ken Moore <ken@pcbsd.org> | 2014-09-08 10:47:03 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-09-08 10:47:03 -0400 |
commit | ad417c2c3c4fbca9a407b319f1cc8af8ad7ad5fc (patch) | |
tree | 9c85b07007fda149d1906b4698273b2a062e5293 | |
parent | Make sure that Insight puts the file path in quotes when opening a file (in c... (diff) | |
download | lumina-ad417c2c3c4fbca9a407b319f1cc8af8ad7ad5fc.tar.gz lumina-ad417c2c3c4fbca9a407b319f1cc8af8ad7ad5fc.tar.bz2 lumina-ad417c2c3c4fbca9a407b319f1cc8af8ad7ad5fc.zip |
Make sure that the translation codec is set to the text codec for the current locale in lumina-fm.
-rw-r--r-- | lumina-fm/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp index 1315ff79..d15a81d3 100644 --- a/lumina-fm/main.cpp +++ b/lumina-fm/main.cpp @@ -7,6 +7,7 @@ #include <QtGui/QApplication> #include <QDebug> #include <QFile> +#include <QTextCodec> #include "MainUI.h" @@ -30,6 +31,7 @@ int main(int argc, char ** argv) } #endif a.setApplicationName("Insight File Manager"); + //Load current Locale QTranslator translator; QLocale mylocale; QString langCode = mylocale.name(); @@ -39,6 +41,10 @@ int main(int argc, char ** argv) a.installTranslator( &translator ); qDebug() << "Locale:" << langCode; + //Load current encoding for this locale + QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec + qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name(); + MainUI w; QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) ); w.OpenDirs(in); |