complete context init & build

This commit is contained in:
王劲鹏
2021-02-02 20:42:37 +08:00
committed by osborn
parent 3b72ab56aa
commit fb4df95d0a
27 changed files with 274 additions and 28 deletions

View File

@@ -34,4 +34,9 @@ const QString Constant::TEMPLATE_MODULE = QString("Reflect.apply(doric.jsRegiste
const QString Constant::TEMPLATE_CONTEXT_DESTROY = QString("doric.jsReleaseContext(\"%s\")");
const QString Constant::GLOBAL_DORIC = "doric";
const QString Constant::DORIC_CONTEXT_INVOKE = "jsCallEntityMethod";
const QString Constant::DORIC_TIMER_CALLBACK = "jsCallbackTimer";
const QString Constant::DORIC_ENTITY_INIT = "__init__";
const QString Constant::DORIC_ENTITY_CREATE = "__onCreate__";
const QString Constant::DORIC_ENTITY_BUILD = "__build__";

View File

@@ -23,7 +23,12 @@ public:
static const QString TEMPLATE_CONTEXT_DESTROY;
static const QString GLOBAL_DORIC;
static const QString DORIC_CONTEXT_INVOKE;
static const QString DORIC_TIMER_CALLBACK;
static const QString DORIC_ENTITY_CREATE;
static const QString DORIC_ENTITY_INIT;
static const QString DORIC_ENTITY_BUILD;
};

View File

@@ -14,6 +14,7 @@ public:
QFile *file = new QFile(resource.fileName());
file->open(QFile::ReadOnly | QFile::Text);
QTextStream in(file);
in.setCodec("UTF-8");
QString content = in.readAll();
file->close();
delete file;