Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/bug317111.cpp
Context not available. | |||||
24 | #include <kateview.h> | 24 | #include <kateview.h> | ||
---|---|---|---|---|---|
25 | #include <kmainwindow.h> | 25 | #include <kmainwindow.h> | ||
26 | 26 | | |||
27 | #include <QtScript/QScriptEngine> | 27 | #include <QtQml/QJSEngine> | ||
28 | #include <QtTestWidgets> | 28 | #include <QtTestWidgets> | ||
29 | 29 | | |||
30 | #include "testutils.h" | 30 | #include "testutils.h" | ||
Context not available. | |||||
66 | QFile scriptFile(QLatin1String(JS_DATA_DIR"commands/utils.js")); | 66 | QFile scriptFile(QLatin1String(JS_DATA_DIR"commands/utils.js")); | ||
67 | QVERIFY(scriptFile.exists()); | 67 | QVERIFY(scriptFile.exists()); | ||
68 | QVERIFY(scriptFile.open(QFile::ReadOnly)); | 68 | QVERIFY(scriptFile.open(QFile::ReadOnly)); | ||
69 | QScriptValue result = env->engine()->evaluate(QString::fromLatin1(scriptFile.readAll()), scriptFile.fileName()); | 69 | QJSValue result = env->engine()->evaluate(QString::fromLatin1(scriptFile.readAll()), scriptFile.fileName()); | ||
70 | QVERIFY2(!result.isError(), qPrintable(QString(result.toString() + QLatin1String("\nat ") | 70 | QVERIFY2(!result.isError(), result.toString().toUtf8().constData()); | ||
71 | + env->engine()->uncaughtExceptionBacktrace().join(QStringLiteral("\n"))))); | | |||
72 | 71 | | |||
73 | // view must be visible... | 72 | // view must be visible... | ||
74 | view->show(); | 73 | view->show(); | ||
Context not available. |