forked from qt-creator/qt-creator
QtCreator: Add ability to specify text codec for default locale
On Windows you get one locale for unicode applications, and one for old non-unicode applications. Qt Creator uses QTextCodec::codecForLocale(), which would result in the "System" codec, which is mapped for the default language in the system. Task-number: QTCREATORBUG-24776 Change-Id: I64496cc440931d3bf6f09314bdfc7c29e01b9f4f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
#include <QProcess>
|
||||
#include <QStandardPaths>
|
||||
#include <QTemporaryDir>
|
||||
#include <QTextCodec>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -661,6 +662,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray overrideCodecForLocale = settings->value("General/OverrideCodecForLocale").toByteArray();
|
||||
if (!overrideCodecForLocale.isEmpty())
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName(overrideCodecForLocale));
|
||||
|
||||
app.setDesktopFileName("org.qt-project.qtcreator.desktop");
|
||||
|
||||
// Make sure we honor the system's proxy settings
|
||||
|
||||
Reference in New Issue
Block a user