aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp8
-rwxr-xr-xtests/auto/qml/ecmascripttests/test262.py1
-rw-r--r--tests/auto/qml/qqmlconnections/data/disabled-at-start.qml14
-rw-r--r--tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp18
-rw-r--r--tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp2
5 files changed, 38 insertions, 5 deletions
diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
index 584bd10151..441f8c113f 100644
--- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
+++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
@@ -46,7 +46,7 @@
using namespace QV4;
using namespace QV4::Debugging;
-typedef QV4::ReturnedValue (*InjectedFunction)(QV4::CallContext*);
+typedef void (*InjectedFunction)(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData);
Q_DECLARE_METATYPE(InjectedFunction)
static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
@@ -438,11 +438,11 @@ void tst_qv4debugger::addBreakPointWhilePaused()
QCOMPARE(state.lineNumber, 2);
}
-static QV4::ReturnedValue someCall(QV4::CallContext *ctx)
+static void someCall(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *)
{
- static_cast<QV4Debugger *>(ctx->d()->engine->debugger())
+ static_cast<QV4Debugger *>(scope.engine->debugger())
->removeBreakPoint("removeBreakPointForNextInstruction", 2);
- return QV4::Encode::undefined();
+ RETURN_UNDEFINED();
}
void tst_qv4debugger::removeBreakPointForNextInstruction()
diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py
index 99f029cffd..9f0a7c1dee 100755
--- a/tests/auto/qml/ecmascripttests/test262.py
+++ b/tests/auto/qml/ecmascripttests/test262.py
@@ -569,6 +569,7 @@ def Main():
#logging.basicConfig(level=logging.DEBUG)
os.environ["TZ"] = "PST8PDT"
os.environ["LANG"] = "en_US.UTF-8"
+ os.environ["LC_TIME"] = "en_US.UTF-8"
parser = BuildOptions()
(options, args) = parser.parse_args()
ValidateOptions(options)
diff --git a/tests/auto/qml/qqmlconnections/data/disabled-at-start.qml b/tests/auto/qml/qqmlconnections/data/disabled-at-start.qml
new file mode 100644
index 0000000000..1a823f87f6
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/disabled-at-start.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.9
+
+Item {
+ id: root
+
+ property bool tested: false
+ signal testMe()
+
+ Connections {
+ target: root
+ enabled: false
+ onTestMe: root.tested = true;
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
index b3ac1ce958..fe45495f74 100644
--- a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
+++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
@@ -52,6 +52,7 @@ private slots:
void rewriteErrors();
void singletonTypeTarget();
void enableDisable_QTBUG_36350();
+ void disabledAtStart();
void clearImplicitTarget();
private:
@@ -353,6 +354,23 @@ void tst_qqmlconnections::enableDisable_QTBUG_36350()
delete item;
}
+void tst_qqmlconnections::disabledAtStart()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, testFileUrl("disabled-at-start.qml"));
+ QObject * const object = c.create();
+
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("tested").toBool(), false);
+ const int index = object->metaObject()->indexOfSignal("testMe()");
+ const QMetaMethod method = object->metaObject()->method(index);
+ method.invoke(object, Qt::DirectConnection);
+ QCOMPARE(object->property("tested").toBool(), false);
+
+ delete object;
+}
+
//QTBUG-56499
void tst_qqmlconnections::clearImplicitTarget()
{
diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
index 63da28b7ba..49135ca920 100644
--- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
+++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
@@ -250,7 +250,7 @@ void tst_QQuickWorkerScript::scriptError_onLoad()
QVERIFY(worker != 0);
QTRY_COMPARE(qquickworkerscript_lastWarning,
- testFileUrl("script_error_onLoad.js").toString() + QLatin1String(":3:10: Expected token `,'"));
+ testFileUrl("script_error_onLoad.js").toString() + QLatin1String(":3:10: SyntaxError: Expected token `,'"));
qInstallMessageHandler(previousMsgHandler);
qApp->processEvents();