From 3b8d76258d7f0ee888bf37b743da1c8251794fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 14 May 2021 21:05:56 +0800 Subject: [PATCH] fix compile & runtime error --- doric-Qt/example/app/app.pro | 1 + doric-Qt/example/doric/utils/DoricUtils.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doric-Qt/example/app/app.pro b/doric-Qt/example/app/app.pro index 4919ce8e..7d205552 100644 --- a/doric-Qt/example/app/app.pro +++ b/doric-Qt/example/app/app.pro @@ -14,6 +14,7 @@ HEADERS += \ demo/DoricDemoBridge.h RESOURCES += qml.qrc +QTQUICK_COMPILER_SKIPPED_RESOURCES += qml.qrc # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = diff --git a/doric-Qt/example/doric/utils/DoricUtils.h b/doric-Qt/example/doric/utils/DoricUtils.h index 83bb1c56..796d00af 100644 --- a/doric-Qt/example/doric/utils/DoricUtils.h +++ b/doric-Qt/example/doric/utils/DoricUtils.h @@ -14,7 +14,7 @@ public: QFile *file = new QFile(resource.fileName()); file->open(QFile::ReadOnly | QFile::Text); QTextStream in(file); - in.setAutoDetectUnicode(true); + in.setCodec("UTF-8"); QString content = in.readAll(); file->close(); delete file;