mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-15 01:09:40 +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 "newfiledialog.h"
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
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;
|
||||
n.show();
|
||||
return a.exec();
|
||||
|
Loading…
Reference in New Issue
Block a user