mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
UTF-8 as default QString codec (no more fromUtf8)
This commit is contained in:
parent
9b206ec5ae
commit
9a5490caab
@ -1,12 +1,20 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "newfiledialog.h"
|
#include "newfiledialog.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setApplicationVersion(APP_VERSION);
|
a.setApplicationVersion(APP_VERSION);
|
||||||
|
|
||||||
|
// Set QString codec to UTF-8
|
||||||
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||||
|
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||||
|
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
||||||
|
#endif
|
||||||
|
|
||||||
NewFileDialog n;
|
NewFileDialog n;
|
||||||
n.show();
|
n.show();
|
||||||
return a.exec();
|
return a.exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user