Use QStringLiteral in Application::editConfigViaScript()

This commit is contained in:
Martchus 2018-04-08 13:03:05 +02:00
parent 68c9f27e2a
commit 37e24ccfb7
1 changed files with 2 additions and 2 deletions

View File

@ -797,10 +797,10 @@ QByteArray Application::editConfigViaScript() const
// provide console.log() which is not available in QJSEngine and QScriptEngine by default (note that print() is only available when using Qt Script)
JSConsole console;
engine.globalObject().setProperty("console", engine.newQObject(&console));
globalObject.setProperty(QStringLiteral("console"), engine.newQObject(&console));
// provide helper
QFile helperFile(":/js/helper.js");
QFile helperFile(QStringLiteral(":/js/helper.js"));
helperFile.open(QFile::ReadOnly);
const auto helperScript(helperFile.readAll());
if (helperScript.isEmpty()) {