aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
Commit message (Collapse)AuthorAgeFilesLines
* Skip block context within call contexts when searching for parametersUlf Hermann2019-04-291-0/+27
| | | | | | | | | | | Only the call context contains the signal parameters. However, there can be any number of nested block contexts in a function. This manifests itself when the function needs an execution context. The simplest way to trigger this is attaching a debugger. Fixes: QTBUG-75393 Change-Id: Iabdc06a9fe7bf88204525d6940b626575fee1579 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix preview zoom problems on windowsTim Jenssen2019-03-221-6/+6
| | | | | | | | | | Apparently the window is moved to random places on multi-monitor setups on windows. Fixes: QDS-263 Change-Id: I21082c7031fefff3057074c147e82df7a88f4f78 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Raise timeout in QQmlPreview testUlf Hermann2019-03-201-1/+1
| | | | | | | Apparently on some platforms this can time out. Change-Id: I30cd274ff3127319c558b473b6ec7e7f5bc79c38 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix compilation with gcc 4.8Ville Voutilainen2018-12-033-12/+12
| | | | | | | GCC 4.8 doesn't like using QPointers in signal connections. Change-Id: Ide55318374183e52eaf09176a118f7d22b7cfd6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml Tooling: Test that trace events arrive in chronological orderUlf Hermann2018-11-151-0/+6
| | | | | | | | The QML profiler trace client should resolve any deviations from chronological order. Trace receivers should not need to deal with this. Change-Id: I9bbb387bbb5c0b7da9f2b508d228665af9f27d4c Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Qml Tooling: Fix crash in QQmlProfilerService testUlf Hermann2018-11-151-2/+2
| | | | | | | The event counting for failure diagnostics had an off-by-one error. Change-Id: I7f652680a4d154a0624dbfd51af0b026f89cc7ad Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QML Tooling: Fix ordering of memory events in V4 profiler adapterUlf Hermann2018-11-143-1/+32
| | | | | | | | | | | We should not send memory events that are chronologically after the next call event, even if the time threshold given by the profiler service would allow us to do so. When the remaining call events are sent, the chronological order would otherwise be violated. Fixes: QTBUG-71515 Change-Id: Iee27304f836a899b2b35133316cecd3d34f128c6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QML Tooling: Prevent property capture while collecting dataUlf Hermann2018-10-101-1/+1
| | | | | | | | | We don't want additional connections to be formed as result of reporting data to the debugger. Task-number: QTBUG-70989 Change-Id: I78b038a159addac43a8661e402a70e5b14fb222b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Tooling: Don't read properties in order to count themUlf Hermann2018-10-103-1/+90
| | | | | | | | | Reading properties may have side effects and we don't actually need the values here. Task-number: QTBUG-70989 Change-Id: If9f43f3c6a390ebd0ab1d1375fd021189adb10f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlPreview: Add the language file to TESTDATAUlf Hermann2018-10-051-1/+2
| | | | | | | | | It is part of the test and needs to be deployed when running the test on a remote device. Change-Id: I481d183fe917ec59347169842f57a3f06f0c3362 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml Preview: Record more detailed frame statisticsUlf Hermann2018-09-101-7/+17
| | | | | | | | | | | | | Just the number of frames per second doesn't tell us the reason for any low frame rates. The problem could either be GPU-bound, and rendering could take very long, or the problem could be CPU-bound, with synchronizing or the gap between frames being very long. Reporting the rendering and synchronization times in more detail gives the client an idea of what is actually going on. Change-Id: Ib2840a9e1aa9b9738e967730c668769946659be2 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Preview: Use QTranslator::install(QLocale, ...)Kai Koehne2018-08-032-2/+2
| | | | | | | | | | | | See commit e6f6c4aee6951a for the matching change in QQmlApplicationEngine. Also needed to adapt the autotests, since qt_QT is not (yet) a valid locale. Task-number: QTBUG-69196 Change-Id: If92156abbb3e20042a934b8150a8f456d8f770b6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a bunch of test failures for Function.prototype.toString()Lars Knoll2018-08-011-2/+2
| | | | | Change-Id: I36f642e8db7f88698b25eed9e8a64ac2c5896b10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Allow QML preview to change the languageUlf Hermann2018-07-202-0/+9
| | | | | Change-Id: I9afc5a0e1c7807f19dfcca1270267bbf7f718903 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid potential race condition in qqmldebugjs testUlf Hermann2018-07-201-5/+13
| | | | | | | | The stopped() signal could arrive while we are waiting for the result() signal. Change-Id: I6dcc66aaf0b05221d7ad78572c483a506366e2bb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 Debugger: Add command to change break pointsUlf Hermann2018-07-191-2/+127
| | | | | | | | | | | The function to do so has been around for a long time. Finally expose the functionality to the client. It doesn't make much sense to allow the client to set the initial enabled/disabled state, but not to change it later. Task-number: QTCREATORBUG-20795 Change-Id: Ie2cb01ca3ca5578b6bc85650d7ee38d0aad9bbab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 Debuger: Drop namesAsObjects optionUlf Hermann2018-07-181-57/+29
| | | | | | | | There is no client that uses this anymore, and dropping it allows us to eliminate a lot of code. Change-Id: I6b09669c9dd7fcf9c2d249f133bfbb78d2b6f7f4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 debugger: Drop redundantRefs optionUlf Hermann2018-07-182-110/+44
| | | | | | | | No client is using this anymore and we can eliminate a lot of code this way. Change-Id: I454581928fe88e59cd28738c4f7fddd060999181 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Preview: Add a frames per second counterUlf Hermann2018-07-181-0/+18
| | | | | | | | It is instructive to the client to know how many frames per second the current QML can achieve in the preview. Change-Id: I8b73e2b5218410d903a07dfe27c038663c84fdee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Preview: Increase timeouts in testUlf Hermann2018-07-181-11/+22
| | | | | | | | Whenever we wait for the target process to output something, wait up to 30s. Change-Id: I87f79b434b43a2e97740f2813318c39f765c72e0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-161-44/+51
|\ | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickloader.cpp tests/auto/quick/qquickanimations/tst_qquickanimations.cpp Change-Id: I0cb9f637d24ccd0ecfb50c455cc210119f744b02
| * Tooling: Increase timeouts in qqmldebugjs test by a factor of 6Ulf Hermann2018-07-121-44/+51
| | | | | | | | | | | | | | | | | | The CI is slow. It takes up to a minute to start a process, and therefore I'm not surprised the resulting process won't hit a break point within 5s. Let's hope 30s is enough. Change-Id: Idd5b8ad517a866ad577693e3279a4ded031d4eb6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QML Preview: Blacklist paths ":/qgradient" and "/etc"Ulf Hermann2018-07-131-0/+10
| | | | | | | | | | | | | | | | | | | | ":/qgradient" is where the new webgradients introduced in QBrush are stored. We don't want to load them from the client. Replacing target-specific files in /etc with files from the host is also a bad idea. Change-Id: I3228388713dec29dad1841aedb175dca10cfe1e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tooling: Add QML preview debug serviceUlf Hermann2018-07-139-1/+616
| | | | | | | | | | | | Task-number: QDS-181 Change-Id: I02193afb84aa111792d8bebff3bdd9b410f9db5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QML Profiler: Test that only one Complete message is sent per sessionUlf Hermann2018-07-1024-45/+114
| | | | | | | | | | | | Task-number: QTBUG-65767 Change-Id: I0485092f9a36da73e9e86ef8216be736b6560ec1 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Tests: Guard against corner cases in profiler service testUlf Hermann2018-06-221-0/+14
| | | | | | | | | | | | | | | | If the process fails to start, the debug client isn't available and we shouldn't access it then. Change-Id: Ifddbbfeb92b1583345a5f4c954dca5920a0cc53b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QmlDebug tests: Return the right value from connect(...)Ulf Hermann2018-06-223-35/+83
| | | | | | | | | | | | | | | | | | | | | | | | If the process terminates shortly after connecting, we would return the wrong value because the services would be NotConnected again, due to the timeout mechanism we used to detect this. Instead, rather directly react to the stateChanged signals and return as soon as all services are in the correct state (or if the debug connection is dropped before, or on timeout, which are failures). Change-Id: I3f0c1c8519fc450627a803c76ec9b0a703104022 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlDebugConnector: Don't complain about new pluginKey if it's unchangedUlf Hermann2018-06-223-6/+0
| | | | | | | | | | | | | | | | We cannot set the plugin key to a new value if we've already instantiated the plugin. Setting the same value again, is a noop, though. Change-Id: Ib2d2cb3dc20d8d3d7f1673957970f5235e3aeccc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devSimon Hausmann2018-06-192-2/+22
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/qml/compiler/qv4codegen.cpp tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp Change-Id: I010505326d76ee728ffe5fbd4c7879f28adadb12
| * QQmlDebugProcess: Wait forever for debug messagesUlf Hermann2018-06-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | If we don't get the expected message in 15s, output a warning and try again. This will eventually be terminated by the overall test watchdog, but experiments show that starting processes on the CI can take minutes, so it's not worth it to have a separate timeout here. We still output the warning, so that we see in the log when this happens. Task-number: QTBUG-68741 Change-Id: I1ca9d0726753d566d8d89dd682d7d503fcd3a337 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * V4: Set argumentsCanEscape when debuggingUlf Hermann2018-05-301-0/+22
| | | | | | | | | | | | | | | | | | This causes the updated arguments to be reported to the debugger when they are overwritten in the function body. Task-number: QTBUG-68534 Change-Id: I30c22d31aa97da0d58a4bbaaa032180a919669a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fail early if process crashes in QQmlProfilerService testUlf Hermann2018-05-301-0/+2
| | | | | | | | | | | | | | | | There is no point in waiting for a different exit status if we already know that the process has crashed. Change-Id: I9a5129bb4310a851d3852291374ea2de23ef04b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-261-1/+62
|\| | | | | | | Change-Id: I626068886d4440b569dbeb1789b1ebfa480000c5
| * QML Debugger: Don't crash when encoding JSON dataUlf Hermann2018-05-251-1/+62
| | | | | | | | | | | | | | | | | | Apparently QVariant::save cannot deal with QJsonObject and friends. Transform them into QVariants before sending them over the wire. Task-number: QTBUG-68474 Change-Id: I8fc9fade4915c2b40f8d16aea51ea6ff65247dc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLars Knoll2018-05-243-1/+88
|\| | | | | | | Change-Id: I0127f2c16de1d930bdd8cbccd42ec6785f31ab96
| * V4 debugger: Allow retrieval of non-CallContext scopesUlf Hermann2018-05-233-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to encode the scope type properly and we need to return something from the "scope" command. Previously the client didn't even get notified about QML contexts and couldn't actually retrieve anything but call context. The other scope types are not terribly interesting right now, but at least for the global context it should be possible to provide more data in the future. Task-number: QTBUG-68218 Change-Id: I88d3dbc15a93f19b00f6f12365e4fb64ec78862e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Cleanup creation code for builtin functionsLars Knoll2018-05-021-2/+1
| | | | | | | | | | | | | | | | Centralize the code in FunctionObject::createBuiltinFunction and setup function names and length properties there. Change-Id: I21f1d42b475070ee091d96d97387149af1dc47f2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for proper lexical scopingLars Knoll2018-05-021-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | This is still to some extend work in progress as lexically scoped for loops won't yet do the right thing. let and const variables are still accessible before they are declared, and the global scope doesn't yet have a proper context for lexically declared variables. Change-Id: Ie39f74a8fccdaead437fbf07f9fc228a444c26ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-2610-61/+55
|\| | | | | | | | | | | | | | | Conflicts: src/imports/imports.pro src/src.pro Change-Id: Icdc39b6169d15b2102acd0e4d550a8d91e4b0744
| * Make the shared test code independent of QtQmlUlf Hermann2018-04-2410-14/+18
| | | | | | | | | | | | | | | | | | This enables us to drop the QML dependency from a number of tests. This is desirable because we want to test that we didn't do any incompatible changes to the debug framework. Change-Id: I937dd45d3079eac15c200c9d68bb4c911f61afc0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Make QtQmlDebug independent of QtQmlUlf Hermann2018-04-241-47/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means QtQmlDebug needs its own qqmlprofilerdefintions.h. This is a good thing because this way we notice if we change the definitions in an incompatible way. The test uses QtQmlDebug after all. Also, qqmldebugserviceinterfaces_p.h is not available anymore, which means the service names have to be spelled out. This, also, is beneficial as it prevents us from accidentally changing the names. In the context of QmlDebug we don't need to namespace the profiler definitions, either. This simplifies some code. Task-number: QTBUG-60996 Change-Id: Ibb39e48c9b758687d68b8ce4431f45eb26939a09 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Bring JS grammar in line with ES7 specLars Knoll2018-04-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This basically updates all grammar rules in the qqmljs.g file to be in line with the ES7 specification. Some special handling for the lookahead rules appearing in the spec was needed and is implemented through empty lookahead rules in the grammar, that might push an additional token into the token stream. Renamed some classes in the AST to be in line with the names used in ES7, and removed some other ones (SourceElements) that are no longer used. The ES7 grammar rules contain lots of variations of the base rules (with In/Return/Yield/Default suffixes). With the exception of the In and Default rules, these are implemented through state tracking in the parser and lexer. Change-Id: I4017d97cd050ed816c1dad11833e882cba30801a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-04-092-6/+23
|\| | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp Change-Id: Ifb27c6096297c729caff68945b3f710ce2009521
| * QQmlDebuggingEnabler test: Relax output string conditionUlf Hermann2018-04-061-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Apparently the "qml: " prefix to strings output via console.log() is not reliable. We can also get "qml <function> - ", as seen in the test log. Also, increase the timeouts. The test log indicates that they are too small. Change-Id: Icb0da329e52273f9300504047b79b1ad41c02892 Task-number: QTBUG-67505 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QmlProfiler test: Keep recording until we receive the needed eventsUlf Hermann2018-03-281-2/+15
| | | | | | | | | | | | | | | | We can apparently catch the engine at a point where it has already registered but not compiled anything. Change-Id: I09cd7fefe731a61a6f2095e125516ecf57c602cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-281-0/+39
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I8276669e257f35a76768ef7f8795a8605cf4c9bc
| * Qml Profiler: Store and send URL of compile eventsUlf Hermann2018-03-271-0/+36
| | | | | | | | | | | | Task-number: QTBUG-67354 Change-Id: I7251095570d5ba8d0a62d854cfcbc339b2455747 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QML Tooling: Wait for QML trace to be started in QML profiler testUlf Hermann2018-03-271-0/+3
| | | | | | | | | | | | | | | | | | | | If we don't wait for anything else, we need to wait for at least the "trace started" message before we disable profiling. Otherwise we might disable the profiling before the first engine registers, which will give us no trace at all. Change-Id: I9fb64e82bd05c60640ffbbd2ece5e99edfa97f4a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-211-0/+24
|\| | | | | | | | | | | | | Conflicts: tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I25e264df273c01832f64dbd31923d8529f1d1900
| * QML debugger: Don't crash when creating objects on engine destructionUlf Hermann2018-03-191-0/+24
| | | | | | | | | | | | | | | | | | | | You can create further objects while the QML engine is being destroyed. The debug service is not interested in those because they will be rather short lived anyway. Task-number: QTBUG-62458 Change-Id: If5395ef058268e0e956d159bc636495da1c0c98f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>