diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
commit | 7063fefe4b5e866b27001bb9b911fc2f68034e40 (patch) | |
tree | 1ce35139475d83399572a3265414c2da3443a321 /tests/auto/qml | |
parent | f3446071da8357620d0c8593a04e3b4fbba88f21 (diff) | |
parent | 4f3379352a265bab00a7265f85ffc38a9ca4ffe4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
Diffstat (limited to 'tests/auto/qml')
102 files changed, 194 insertions, 50 deletions
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 4ab1ac0a4c..98ef590317 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -98,7 +98,7 @@ bool tst_QQmlDebuggingEnabler::init(bool blockMode, bool qmlscene, int portFrom, if (qmlscene) { process->start(QStringList() << QLatin1String("-qmljsdebugger=port:") + - QString::number(portFrom) + QLatin1String(",") + QString::number(portTo) + + QString::number(portFrom) + QLatin1Char(',') + QString::number(portTo) + QLatin1String(blockMode ? ",block": "") << testFile(QLatin1String("test.qml"))); } else { diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h index 440cf34e81..d544a89ff2 100644 --- a/tests/auto/qml/debugger/shared/debugutil_p.h +++ b/tests/auto/qml/debugger/shared/debugutil_p.h @@ -35,6 +35,17 @@ #ifndef DEBUGUTIL_H #define DEBUGUTIL_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QEventLoop> #include <QTimer> #include <QThread> diff --git a/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js index 720b39dd54..720b39dd54 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js +++ b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js diff --git a/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js index 3762842461..3762842461 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js +++ b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js diff --git a/tests/auto/qml/parserstress/tests/ecma/README b/tests/auto/qml/parserstress/tests/ecma/README index 91f174ab61..91f174ab61 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma/README +++ b/tests/auto/qml/parserstress/tests/ecma/README diff --git a/tests/auto/qml/parserstress/tests/ecma_2/README b/tests/auto/qml/parserstress/tests/ecma_2/README index 6da6cdd514..6da6cdd514 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/README +++ b/tests/auto/qml/parserstress/tests/ecma_2/README diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js index cc7907d006..cc7907d006 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js index 5153d25f9d..5153d25f9d 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js index 8ea446a248..8ea446a248 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js index 9cc837d8ef..9cc837d8ef 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js index 7a763a895c..7a763a895c 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js index 1662ae566b..1662ae566b 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js index 1a9b1b3437..1a9b1b3437 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js index 03c0f16fb9..03c0f16fb9 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js +++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js index 0436b8c1e0..0436b8c1e0 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js index b55430b44e..b55430b44e 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js index 4e277e6da5..4e277e6da5 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js index ee426a0cec..ee426a0cec 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js index 95ee7f7a92..95ee7f7a92 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js index fe9f8fc71e..fe9f8fc71e 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js index 36cf1478d2..36cf1478d2 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js index c869d7bff4..c869d7bff4 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js index f750ffb449..f750ffb449 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js index 61b1de6ef1..61b1de6ef1 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js index d79b60b996..d79b60b996 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js index b197dcb9c2..b197dcb9c2 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js index e3b073e7ec..e3b073e7ec 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js index 6fbe85e19f..6fbe85e19f 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js index f303199b51..f303199b51 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js index fd47d5d86b..fd47d5d86b 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js index 8f387c1349..8f387c1349 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js index 99af0f87c5..99af0f87c5 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js index 05f9622ce2..05f9622ce2 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js index 64e426888a..64e426888a 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js index d5af3b86d4..d5af3b86d4 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js index 78005560a7..78005560a7 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js index e159c4c87f..e159c4c87f 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js index 10ee26f929..10ee26f929 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js index e3fa070e5a..e3fa070e5a 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js index 2897ece555..2897ece555 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js index d3962004e3..d3962004e3 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js index 0473fe4956..0473fe4956 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js index 5d3307e4a7..5d3307e4a7 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js index c48565ba5f..c48565ba5f 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js index 671faceb81..671faceb81 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/README b/tests/auto/qml/parserstress/tests/ecma_3/README index eebd421c2e..eebd421c2e 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/README +++ b/tests/auto/qml/parserstress/tests/ecma_3/README diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js index d68b86c2ed..d68b86c2ed 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js index 9d462359fa..9d462359fa 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js index 2e3d044b74..2e3d044b74 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js index dd2f540f6c..dd2f540f6c 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js index 8680b7bcfd..8680b7bcfd 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js index a24a07bb2b..a24a07bb2b 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js index a9b00d317c..a9b00d317c 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js index b097fbc3d7..b097fbc3d7 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js index 41ebf0a731..41ebf0a731 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js index dfd53a9922..dfd53a9922 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js index 923c1e5ab3..923c1e5ab3 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js index 236eb00d28..236eb00d28 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js index 6e7339f9e9..6e7339f9e9 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js index 437dcbd5c5..437dcbd5c5 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js index 3cd858e845..3cd858e845 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js index ffc5c5a4cc..ffc5c5a4cc 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js index 0c78a372ee..0c78a372ee 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js index 6e735fd1d2..6e735fd1d2 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js index f57f3a4f98..f57f3a4f98 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js index 1f21d19739..1f21d19739 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js index ecd5a2dd42..ecd5a2dd42 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js index 27ddfab51d..27ddfab51d 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js index 97c3ca3136..97c3ca3136 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js index e1ebdb6e30..e1ebdb6e30 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js index 003cd0fa42..003cd0fa42 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js index 733cd713d8..733cd713d8 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js index 9610238cc3..9610238cc3 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js index 59564b272e..59564b272e 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js index bb10ac6f7a..bb10ac6f7a 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/browser.js index 2339522cb6..2339522cb6 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/browser.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/browser.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js index f941cb7800..f941cb7800 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js index b69e9d065a..b69e9d065a 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js index d7074d9128..d7074d9128 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js index 85e684882f..85e684882f 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js index 5d15ce31a9..5d15ce31a9 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js index a5f5fb769b..a5f5fb769b 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js index 40c7e8dd81..40c7e8dd81 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js index 9966269115..9966269115 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js index 446adb95a6..446adb95a6 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js diff --git a/tests/auto/qml/parserstress/tests/ecma_3/template.js b/tests/auto/qml/parserstress/tests/ecma_3/template.js index 4dedd5a0e3..4dedd5a0e3 100755..100644 --- a/tests/auto/qml/parserstress/tests/ecma_3/template.js +++ b/tests/auto/qml/parserstress/tests/ecma_3/template.js diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 4c7dba9f90..39bc8b2e5f 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -155,7 +155,7 @@ private slots: void callConstants(); - void installTranslatorFunctions(); + void installTranslationFunctions(); void translateScript_data(); void translateScript(); void translateScript_crossScript(); @@ -172,6 +172,16 @@ private slots: void translateScriptUnicodeIdBased(); void translateFromBuiltinCallback(); + void installConsoleFunctions(); + void logging(); + void tracing(); + void asserts(); + void exceptions(); + + void installGarbageCollectionFunctions(); + + void installAllExtensions(); + void privateMethods(); void engineForObject(); @@ -1480,6 +1490,8 @@ void tst_QJSEngine::gcWithNestedDataStructure() // The GC must be able to traverse deeply nested objects, otherwise this // test would crash. QJSEngine eng; + eng.installExtensions(QJSEngine::GarbageCollectionExtension); + QJSValue ret = eng.evaluate( "function makeList(size)" "{" @@ -3171,7 +3183,7 @@ void tst_QJSEngine::callConstants() QCOMPARE(exceptionResult.toString(), QString("TypeError: true is not a function")); } -void tst_QJSEngine::installTranslatorFunctions() +void tst_QJSEngine::installTranslationFunctions() { QJSEngine eng; QJSValue global = eng.globalObject(); @@ -3182,7 +3194,7 @@ void tst_QJSEngine::installTranslatorFunctions() QVERIFY(global.property("qsTrId").isUndefined()); QVERIFY(global.property("QT_TRID_NOOP").isUndefined()); - eng.installTranslatorFunctions(); + eng.installExtensions(QJSEngine::TranslationExtension); QVERIFY(global.property("qsTranslate").isCallable()); QVERIFY(global.property("QT_TRANSLATE_NOOP").isCallable()); QVERIFY(global.property("qsTr").isCallable()); @@ -3597,6 +3609,107 @@ void tst_QJSEngine::translateFromBuiltinCallback() eng.evaluate("[10,20].forEach(foo)", "script.js"); } +void tst_QJSEngine::installConsoleFunctions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + QVERIFY(global.property("console").isUndefined()); + QVERIFY(global.property("print").isUndefined()); + + engine.installExtensions(QJSEngine::ConsoleExtension); + QVERIFY(global.property("console").isObject()); + QVERIFY(global.property("print").isCallable()); +} + +void tst_QJSEngine::logging() +{ + QLoggingCategory loggingCategory("js"); + QVERIFY(loggingCategory.isDebugEnabled()); + QVERIFY(loggingCategory.isWarningEnabled()); + QVERIFY(loggingCategory.isCriticalEnabled()); + + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtDebugMsg, "console.debug"); + engine.evaluate("console.debug('console.debug')"); + QTest::ignoreMessage(QtDebugMsg, "console.log"); + engine.evaluate("console.log('console.log')"); + QTest::ignoreMessage(QtInfoMsg, "console.info"); + engine.evaluate("console.info('console.info')"); + QTest::ignoreMessage(QtWarningMsg, "console.warn"); + engine.evaluate("console.warn('console.warn')"); + QTest::ignoreMessage(QtCriticalMsg, "console.error"); + engine.evaluate("console.error('console.error')"); + + QTest::ignoreMessage(QtDebugMsg, ": 1"); + engine.evaluate("console.count()"); + + QTest::ignoreMessage(QtDebugMsg, ": 2"); + engine.evaluate("console.count()"); +} + +void tst_QJSEngine::tracing() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtDebugMsg, "%entry (:1)"); + engine.evaluate("console.trace()"); + + QTest::ignoreMessage(QtDebugMsg, "a (:1)\nb (:1)\nc (:1)\n%entry (:1)"); + engine.evaluate("function a() { console.trace(); } function b() { a(); } function c() { b(); }"); + engine.evaluate("c()"); +} + +void tst_QJSEngine::asserts() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtCriticalMsg, "This will fail\n%entry (:1)"); + engine.evaluate("console.assert(0, 'This will fail')"); + + QTest::ignoreMessage(QtCriticalMsg, "This will fail too\n%entry (:1)"); + engine.evaluate("console.assert(1 > 2, 'This will fail too')"); +} + +void tst_QJSEngine::exceptions() +{ + QJSEngine engine; + engine.installExtensions(QJSEngine::ConsoleExtension); + + QTest::ignoreMessage(QtCriticalMsg, "Exception 1\n%entry (:1)"); + engine.evaluate("console.exception('Exception 1')"); +} + +void tst_QJSEngine::installGarbageCollectionFunctions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + QVERIFY(global.property("gc").isUndefined()); + + engine.installExtensions(QJSEngine::GarbageCollectionExtension); + QVERIFY(global.property("gc").isCallable()); +} + +void tst_QJSEngine::installAllExtensions() +{ + QJSEngine engine; + QJSValue global = engine.globalObject(); + // Pick out a few properties from each extension and check that they're there. + QVERIFY(global.property("qsTranslate").isUndefined()); + QVERIFY(global.property("console").isUndefined()); + QVERIFY(global.property("print").isUndefined()); + QVERIFY(global.property("gc").isUndefined()); + + engine.installExtensions(QJSEngine::AllExtensions); + QVERIFY(global.property("qsTranslate").isCallable()); + QVERIFY(global.property("console").isObject()); + QVERIFY(global.property("print").isCallable()); + QVERIFY(global.property("gc").isCallable()); +} + class ObjectWithPrivateMethods : public QObject { Q_OBJECT diff --git a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp index e01ea73e1b..52d676ef3c 100644 --- a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp +++ b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp @@ -110,7 +110,7 @@ QJsonValue tst_qjsonbinding::valueFromJson(const QByteArray &json) // QJsonDocument::fromJson() only handles objects and arrays... // Wrap the JSON inside a dummy object and extract the value. - QByteArray wrappedJson = "{\"prop\":" + json + "}"; + QByteArray wrappedJson = "{\"prop\":" + json + '}'; doc = QJsonDocument::fromJson(wrappedJson); Q_ASSERT(doc.isObject()); return doc.object().value("prop"); diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp index c3d95a10fb..6553baea76 100644 --- a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp +++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp @@ -2436,7 +2436,7 @@ void tst_QJSValue::prettyPrinter() QFETCH(QString, function); QFETCH(QString, expected); QJSEngine eng; - QJSValue val = eng.evaluate("(" + function + ")"); + QJSValue val = eng.evaluate(QLatin1Char('(') + function + QLatin1Char(')')); QVERIFY(val.isCallable()); QString actual = val.toString(); QSKIP("Function::toString() doesn't give the whole function on v4"); diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index 2a534b5913..28d687bd1c 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -84,7 +84,7 @@ void tst_qmlplugindump::builtins() if (dumper.error() != QProcess::UnknownError || dumper.exitStatus() != QProcess::NormalExit) { qWarning() << QString("Error while running '%1 %2'").arg( - qmlplugindumpPath, args.join(QLatin1String(" "))); + qmlplugindumpPath, args.join(QLatin1Char(' '))); } if (dumper.error() == QProcess::FailedToStart) { diff --git a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp index 6b2add309a..6f2febaccf 100644 --- a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp +++ b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp @@ -73,7 +73,7 @@ namespace { QString toString(const QQmlDirParser::Plugin &p) { - return p.name + "|" + p.path; + return p.name + QLatin1Char('|') + p.path; } QStringList toStringList(const QList<QQmlDirParser::Plugin> &plugins) @@ -88,7 +88,9 @@ namespace { QString toString(const QQmlDirParser::Component &c) { - return c.typeName + "|" + c.fileName + "|" + QString::number(c.majorVersion) + "|" + QString::number(c.minorVersion) + "|" + (c.internal ? "true" : "false"); + return c.typeName + QLatin1Char('|') + c.fileName + QLatin1Char('|') + + QString::number(c.majorVersion) + QLatin1Char('|') + QString::number(c.minorVersion) + + QLatin1Char('|') + (c.internal ? "true" : "false"); } QStringList toStringList(const QQmlDirComponents &components) @@ -104,7 +106,8 @@ namespace { QString toString(const QQmlDirParser::Script &s) { - return s.nameSpace + "|" + s.fileName + "|" + QString::number(s.majorVersion) + "|" + QString::number(s.minorVersion); + return s.nameSpace + QLatin1Char('|') + s.fileName + QLatin1Char('|') + + QString::number(s.majorVersion) + '|' + QString::number(s.minorVersion); } QStringList toStringList(const QList<QQmlDirParser::Script> &scripts) diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index e186c364c3..5a7732fa9a 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -4203,9 +4203,7 @@ void tst_qqmlecmascript::importScripts() QFETCH(QStringList, propertyNames); QFETCH(QVariantList, propertyValues); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory() + "/remote"); + ThreadedTestHTTPServer server(dataDirectory() + "/remote"); QStringList importPathList = engine.importPathList(); @@ -7117,6 +7115,7 @@ void tst_qqmlecmascript::onDestruction() QObject *obj = c.create(); QVERIFY(obj != 0); delete obj; + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } { @@ -7128,6 +7127,7 @@ void tst_qqmlecmascript::onDestruction() QQmlComponent c(&engine, testFileUrl("onDestruction.qml")); QObject *obj = c.create(); QVERIFY(obj != 0); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } } @@ -7326,7 +7326,7 @@ void tst_qqmlecmascript::sequenceSort_data() for (size_t t=0 ; t < sizeof(types)/sizeof(types[0]) ; ++t) { for (size_t s=0 ; s < sizeof(sort)/sizeof(sort[0]) ; ++s) { for (int c=0 ; c < 2 ; ++c) { - QString testName = QLatin1String(types[t]) + QLatin1String("_") + QLatin1String(sort[s]); + QString testName = QLatin1String(types[t]) + QLatin1Char('_') + QLatin1String(sort[s]); QString fnName = QLatin1String("test_") + testName; bool useComparer = c != 0; testName += useComparer ? QLatin1String("[custom]") : QLatin1String("[default]"); diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp index 4f559b0d33..2f581e296a 100644 --- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp +++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp @@ -96,8 +96,8 @@ private: QList<QByteArray> actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ diff --git a/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml new file mode 100644 index 0000000000..6a14e72a31 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml @@ -0,0 +1,4 @@ +import Test 1.0 + +MyCompositeBaseType { +} diff --git a/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml new file mode 100644 index 0000000000..d34e4650b3 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml @@ -0,0 +1,6 @@ +import Test 1.0 + +RegisteredCompositeTypeWithAttachedProperty { + RegisteredCompositeTypeWithAttachedProperty.objectName: "test" + property string attachedProperty: RegisteredCompositeTypeWithAttachedProperty.objectName +} diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 985acc2539..c64fda5ea1 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -1086,6 +1086,7 @@ class MyCompositeBaseType : public QObject public: enum CompositeEnum { EnumValue0, EnumValue42 = 42 }; + static QObject *qmlAttachedProperties(QObject *parent) { return new QObject(parent); } }; Q_DECLARE_METATYPE(MyEnum2Class::EnumB) @@ -1100,6 +1101,7 @@ QML_DECLARE_TYPE(MyRevisionedSubclass) QML_DECLARE_TYPE(MySubclass) QML_DECLARE_TYPE(MyReceiversTestObject) QML_DECLARE_TYPE(MyCompositeBaseType) +QML_DECLARE_TYPEINFO(MyCompositeBaseType, QML_HAS_ATTACHED_PROPERTIES) class CustomBinding : public QObject, public QQmlParserStatus { diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 6b6d52ca34..5a93013dfe 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -160,6 +160,7 @@ private slots: void receivers(); void registeredCompositeType(); void registeredCompositeTypeWithEnum(); + void registeredCompositeTypeWithAttachedProperty(); void implicitImportsLast(); void basicRemote_data(); @@ -281,8 +282,8 @@ private: QList<QQmlError> errors = component.errors(); \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ @@ -2540,9 +2541,7 @@ void tst_qqmllanguage::basicRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); url = server.baseUrl().resolved(url); @@ -2587,9 +2586,7 @@ void tst_qqmllanguage::importsRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); qml.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); @@ -2682,9 +2679,7 @@ void tst_qqmllanguage::importsInstalledRemote() QFETCH(QString, type); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QString serverdir = server.urlString("/lib/"); engine.setImportPathList(QStringList(defaultImportPathList) << serverdir); @@ -2749,9 +2744,7 @@ void tst_qqmllanguage::importsPath() QFETCH(QString, qml); QFETCH(QString, value); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); for (int i = 0; i < importPath.count(); ++i) importPath[i].replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); @@ -3174,6 +3167,7 @@ void tst_qqmllanguage::initTestCase() qmlRegisterType(testFileUrl("CompositeType.DoesNotExist.qml"), "Test", 1, 0, "RegisteredCompositeType2"); qmlRegisterType(testFileUrl("invalidRoot.1.qml"), "Test", 1, 0, "RegisteredCompositeType3"); qmlRegisterType(testFileUrl("CompositeTypeWithEnum.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithEnum"); + qmlRegisterType(testFileUrl("CompositeTypeWithAttachedProperty.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithAttachedProperty"); // Registering the TestType class in other modules should have no adverse effects qmlRegisterType<TestType>("org.qtproject.TestPre", 1, 0, "Test"); @@ -3365,12 +3359,24 @@ void tst_qqmllanguage::registeredCompositeTypeWithEnum() delete o; } +// QTBUG-43581 +void tst_qqmllanguage::registeredCompositeTypeWithAttachedProperty() +{ + QQmlComponent component(&engine, testFileUrl("registeredCompositeTypeWithAttachedProperty.qml")); + + VERIFY_ERRORS(0); + QObject *o = component.create(); + QVERIFY(o != 0); + + QCOMPARE(o->property("attachedProperty").toString(), QStringLiteral("test")); + + delete o; +} + // QTBUG-18268 void tst_qqmllanguage::remoteLoadCrash() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Text {}", server.url("/remoteLoadCrash.qml")); @@ -3859,9 +3865,7 @@ void tst_qqmllanguage::compositeSingletonQmlDirError() // Load a remote composite singleton type via qmldir that defines the type as a singleton void tst_qqmllanguage::compositeSingletonRemote() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QFile f(testFile("singletonTest15.qml")); QVERIFY(f.open(QIODevice::ReadOnly)); diff --git a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp index 519ee7ac26..d26c1c584b 100644 --- a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp +++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp @@ -625,7 +625,7 @@ void tst_qqmllistmodel::enumerate() int expectedStringCount = sizeof(expectedStrings) / sizeof(expectedStrings[0]); - QStringList r = item->property("result").toString().split(":"); + QStringList r = item->property("result").toString().split(QLatin1Char(':')); int matchCount = 0; for (int i=0 ; i < expectedStringCount ; ++i) { diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index ba3f72f2c1..030af07a70 100644 --- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -676,7 +676,7 @@ void tst_qqmllocale::addDateTimeFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; @@ -768,7 +768,7 @@ void tst_qqmllocale::addDateFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; @@ -860,7 +860,7 @@ void tst_qqmllocale::addTimeFormatData(const QString &l) int i = 0; while (formats[i]) { QByteArray t(locale); - t += " "; + t += ' '; t += formats[i]; QTest::newRow(t.constData()) << l << QString(formats[i]); ++i; diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index 0e326abad9..89477609ca 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -110,8 +110,8 @@ void tst_qqmlmoduleplugin::initTestCase() QList<QByteArray> actual; \ for (int ii = 0; ii < errors.count(); ++ii) { \ const QQmlError &error = errors.at(ii); \ - QByteArray errorStr = QByteArray::number(error.line()) + ":" + \ - QByteArray::number(error.column()) + ":" + \ + QByteArray errorStr = QByteArray::number(error.line()) + ':' + \ + QByteArray::number(error.column()) + ':' + \ error.description().toUtf8(); \ actual << errorStr; \ } \ @@ -202,8 +202,11 @@ void tst_qqmlmoduleplugin::incorrectPluginCase() caseSensitive = false; QString libname = "PluGin.dll"; #endif - if (!caseSensitive) - expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\""); + if (!caseSensitive) { + expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + + QLatin1Char('"'); + } #endif QCOMPARE(errors.at(0).description(), expectedError); @@ -236,9 +239,7 @@ void tst_qqmlmoduleplugin::importPluginWithQmlFile() void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(m_dataImportsDirectory); + ThreadedTestHTTPServer server(m_dataImportsDirectory); QQmlEngine engine; QQmlComponent component(&engine); diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index 47bf151a37..68f85daacd 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -621,7 +621,7 @@ void tst_qqmlxmlhttprequest::send_options() QVERIFY(!object.isNull()); QString url = server.baseUrl().toString(); if (url_suffix != "/") - url.append("/"); + url.append(QLatin1Char('/')); if (!url_suffix.isEmpty()) url.append(url_suffix); object->setProperty("url", url); diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp index dc6e2fa561..aca809a137 100644 --- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp +++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp @@ -93,8 +93,8 @@ void tst_qquickfolderlistmodel::checkNoErrors(const QQmlComponent& component) QList<QQmlError> errors = component.errors(); for (int ii = 0; ii < errors.count(); ++ii) { const QQmlError &error = errors.at(ii); - QByteArray errorStr = QByteArray::number(error.line()) + ":" + - QByteArray::number(error.column()) + ":" + + QByteArray errorStr = QByteArray::number(error.line()) + ':' + + QByteArray::number(error.column()) + ':' + error.description().toUtf8(); qWarning() << errorStr; } |