aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/shared
Commit message (Collapse)AuthorAgeFilesLines
* Remove QRegExp from qml autotestsLars Knoll2020-04-031-3/+4
| | | | | | | | QRegExp will get removed in Qt6. Clean up by removing dependencies on QRegExp in the autotests. Change-Id: I8ef8561ba30b98b61cd9ed52907b48c5969f2c49 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Tests: rename connect -> connectToTim Jenssen2020-02-032-2/+2
| | | | | | | avoids strange compiler errors if a QObject::connect is used Change-Id: Ib9f5fc4114a06f7f1d1a0b9a142a15ce19270cec Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Tests: make ConnectResult a Q_ENUM to get nice error messageTim Jenssen2020-01-311-1/+2
| | | | | Change-Id: I0e22eb66109e61a5341388d37f5b596f4125ac99 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtDeclarative: replace deprecated functionsChristian Ehrlicher2019-03-041-1/+1
| | | | | | | | | | | | | | | Replace the deprecated functions with it successors: - QProcess::finished(int) -> QProcess::finished(int, ExitStatus) - QDateTime::toTime_t() -> toSecsSinceEpoch() - QDateTime::setUtcOffset() -> setOffsetFromUtc() - QDateTime::utcOffset() -> offsetFromUtc() - QWindowSystemInterface::handleDrag/Drop(4 params) -> 6-params - QJSEngine::installTranslatorFunctions() -> installExtensions(QJSEngine::TranslationExtension) - QEasingCurve::cubicBezierSpline() -> toCubicSpline() Change-Id: I96b4b2195887396b7a5182fce2749745380f5949 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QmlDebug: Add QQmlInspectorClientUlf Hermann2018-10-243-186/+0
| | | | | | | | We use it in 2 tests and we might use it elsewhere, too. Task-number: QTBUG-66504 Change-Id: I57e52e70044ac857482ecfe863f0d30698ab2e60 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlDebug: Add QQmlEngineDebugClientUlf Hermann2018-10-243-744/+0
| | | | | | | | | We use it in 3 tests already, and we may want to use it in other applications, too. Task-number: QTBUG-66504 Change-Id: Id73b6ccf49a701fbbc79ee3fe1ac638a70c4c939 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Profiler: Test that only one Complete message is sent per sessionUlf Hermann2018-07-102-0/+11
| | | | | | Task-number: QTBUG-65767 Change-Id: I0485092f9a36da73e9e86ef8216be736b6560ec1 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QmlDebug tests: Return the right value from connect(...)Ulf Hermann2018-06-222-32/+80
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.11' into devSimon Hausmann2018-06-191-2/+0
|\ | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-261-5/+11
|\| | | | | | | | | | | | | | | Conflicts: src/imports/imports.pro src/src.pro Change-Id: Icdc39b6169d15b2102acd0e4d550a8d91e4b0744
| * Make the shared test code independent of QtQmlUlf Hermann2018-04-241-5/+11
| | | | | | | | | | | | | | | | | | 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>
* | QQmlDebugProcess: Forward the process' finished() signalUlf Hermann2018-03-212-0/+2
| | | | | | | | | | Change-Id: If7c3bf5e0e679734911195f0f1fd1f408149a18e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlDebugClient: Make stateChanged a signalUlf Hermann2018-03-204-12/+3
| | | | | | | | | | | | | | | | | | | | | | This way we can observe it from the outside and drop all the code that genrated extra signals from the virtual method. Also drop the unused QQmlDebugTestService::stateHasChanged signal to reduce the confusion. Change-Id: Ia37c1eaf8b392e594b0931694f43f84fe09b000c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlDebugProcess: Add a method to return the ProcessStateUlf Hermann2018-03-203-3/+9
|/ | | | | | | | | We want a simple way to query the process state, without parsing the state string. Rename the old state() method to stateString() to make space for the new state() method. Change-Id: I493b769a4ab31148f654c1b67bd95d93e3e3cba7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use QOverload instead of static_cast for connectJesus Fernandez2018-02-151-1/+1
| | | | | Change-Id: I6f43fb3bccb7cc5060852aef1ad21e7811bf79ed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Match QQmlEngineDebugServiceTest to the serviceUlf Hermann2018-01-251-1/+1
| | | | | | | | | | | | The fact that the service transmits QObject properties by their objectNames, rather than as proper references is not very useful and in fact the reason for some strange behavior in QtCreator. However, it's been that way for a long time and we should test what the service actually does. Task-number: QTBUG-65852 Change-Id: I6e489bb9877fae129432b5b3d5d4c7bfb5deaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix remaining race conditions in QQmlDebugProcessUlf Hermann2017-09-062-15/+25
| | | | | | | | | | | | | | | | | If the process generated a "Cannot listen" message before we waitForSessionStart(), we would never quit the nested event loop. Also, unrelated output was not always forwarded, and the event loop was not terminated when the process unexpectedly stopped. Also, the timer was started when the process started, not when we started waiting and we don't want to report the process as crashed if we kill it ourselves. In turn, we remove the remaining blacklists. Task-number: QTQAINFRA-1334 Change-Id: I711aea373911d380f882b00f6d88627edc9f2415 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add some style to QQmlDebugProcessUlf Hermann2017-09-061-13/+32
| | | | | | | Line breaks, Qt5 connects, etc. Change-Id: I13df05722c6ae6cd5d29e28815a602e997de4605 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move QQmlDebugProcess into its own header and source filesUlf Hermann2017-09-065-248/+324
| | | | | | | This way we can easily extract it and test it separately. Change-Id: I05e78ac705a5b52ee978947f3e0aed596e0a03a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-08-231-1/+4
|\ | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp Change-Id: I31375151eb239f348bec988d2d0506c2b4d9604c
| * Make sure QQmlDebugProcess correctly reports session as startedUlf Hermann2017-08-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | If the "Waiting" output appears before we wait, the event loop could run forever. Also, the timeout of 5s was too low. We increase it to 15s. Remove the blacklists and other workarounds in turn. Task-number: QTQAINFRA-1334 Change-Id: Ib1032a8e57ab8dada3e56163ebab1523a7357aeb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tests: Unify debugger tests' connection mechanismsUlf Hermann2017-08-182-1/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the tests do pretty much the same thing in their init() or connect() methods: Create a process, create a debug connection, create some clients and make sure they're all running. We can deduplicate the code by moving all this into a common base class. Furthermore, the QSKIP in the qqmlenginedebuginspectorintegration test was obviously done because the BLACKLIST mechanism doesn't cover failures from internally called methods. As we don't have that problem anymore now, we can use BLACKLIST instead. Change-Id: I6d45d3b4e9645558ecc783a81fd740b00235cdc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tests: Clean up inclusion of util.pri and debugutil.priUlf Hermann2017-08-171-0/+3
|/ | | | | | | | | | | When we include debugutil.pri, we always want util.pri, too. We can as well nest the inclusions. Also, setting the include path is much easier from within the .pri files than from outside. Change-Id: I1205bdc3051e16e635d4ea9626f44e51002ddb50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml Debugger: Make sure all objects have a typeUlf Hermann2017-03-311-0/+1
| | | | | | | | | QQmlMetaType::prettyTypeName() does a better job in finding a valid type name for our objects than we can do ourselves. Task-number: QTCREATORBUG-17741 Change-Id: Ie8a192aceb230e73b5295b745987692548aff641 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML tooling: Make sure we signal object creation also from QQmlIncubatorUlf Hermann2017-01-112-2/+4
| | | | | | | | | | | | We have to call the QQmlEngineDebugService back from QQmlObjectCreator rather than QQmlComponent, as there are more ways to create an object. We also add the new instance to the global instance list if only the V4 debug service is active, as both QQmlEngineDebugService and QV4DebugService use it. Change-Id: I5dcc71b2e91049bc19ec70d7b87959a61c9b6b75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-281-2/+0
| | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-208-136/+96
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Rewrite inspector serviceUlf Hermann2016-01-123-27/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | The inspector service had bitrotted to a point where there was little code to be rescued. Apparently it was never really finished and quite some code didn't make any sense. This change removes some features that were unused or didn't work correctly: 1. Panning and Zooming with mouse wheel and touch interaction. This might be useful in some contexts, but the implementation was so broken that it wasn't worth trying to fix it. The whole idea of doing this on the layer of QQuickItems is not so great because there is no distinction between spontaneous changes triggered by the application and debugging interaction triggered from outside. It might be better to implement such functionality on a lower level, e.g. in the renderer. 2. Reloading the scene with debug changes. Use one of the other debug services to change properties. Clearing the component cache is a rather drastic measure and not necessary here. In turn, we get support for inspecting multiple windows, and all subclasses of QQuickWindow are supported now. Also, show-on-top works now. Task-number: QTBUG-33376 Change-Id: I65497f49c6b46128a600b0e3a31483eeef40313c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make environment for QQmlDebugProcess usefulUlf Hermann2016-01-112-4/+4
| | | | | | | We don't want to replace the system environment, but rather add to it. Change-Id: I0a498682f8f70dc349c529fa4fc3d76ccb815af8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove extra copy of connection from engine debug clientUlf Hermann2015-11-172-20/+17
| | | | | Change-Id: I8e6df629f2be5af9b5058e542980753b9a9053cb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QmlDebug: Restructure QPacket and QPacketProtocolUlf Hermann2015-11-173-70/+49
| | | | | | | | | | | | | | | | | | | | | | We cannot use the same data stream version for the client and server versions of QPacket and QPacketProtocol should not deal with QPackets but with simple byte arrays because the underlying QDataStream is hard to copy. The new QQmlDebugPacket picks its data stream version from QQmlDebugConnector now, which adjusts it when connecting. As there can only ever be one QQmlDebugConnector, we can keep the version static. The clients need to query the connection for the correct version. We may connect to several different servers sequentially or we may have a server running while using a client, and we don't want to confuse the versions between those. With this in place, all remaining occurrences of QDataStream are replaced with QPacket or QQmlDebugPacket. Change-Id: I3f6ba73fcbfad5e8df917c5feb9308116738a614 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move QQmlDebugClient into separate static libraryUlf Hermann2015-10-309-677/+68
| | | | | Change-Id: Ib3daf9da2cf6798bd022cfcf54d11e565c9cb4ca Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Put QPacketProtocol into its own static libraryUlf Hermann2015-10-152-5/+7
| | | | | | | | | | | | We need it in 3 places in qtdeclarative and we could also use it in QtCreator. We don't want to bundle it with the debug client code as it is also necessary for the server. QPacket replaces QQmlDebugStream as it has the same purpose. This also fixes the inconsitent handling of data stream versions. Change-Id: I650fae353f267511c551b427d9169f4d718aa7f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Properly test services arguments for QQmlDebugServerUlf Hermann2015-10-152-1/+29
| | | | | | | | | So far we have only tested that each service is still functional when the services:<service> argument is given on the command line. This test checks that services which aren't specified are indeed not loaded. Change-Id: Ica935da0337b2215898f65cf283d6e11365432a8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Use signal/slot for passing messages through QQmlDebugServerUlf Hermann2015-07-312-9/+1
| | | | | | | | | | | | | | This results in much cleaner code than the previous implementation using QMetaObject::invokeMethod(). We have to use read locks now for adding and removing engines, as we should have done already before. If a condition is waiting on a write lock you cannot acquire a read lock from another thread. So, if we kept the write locks we wouldn't be able to receive messages while the engines are waiting. Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make QQmlDebugService::registerService() private and part of ctorUlf Hermann2015-07-301-1/+0
| | | | | | | | | | | | | | | | By forcing all debug services to register before the thread starts we can get rid of the complicated thread synchronization and have a more natural API for the services. We can also better enforce the thread situation when registering services in QQmlDebugServer now. QQmlProfilerService should not moveToThread() in its constructor as the thread has not been started, yet. The thread affinity of QQmlProfilerService doesn't make any difference anyway, as all relevant methods are protected by mutexes and it doesn't have any slots. Change-Id: I57db9e2bf94ec6884ede694715dadf5bfd687334 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Adapt to deprecation of QProcess::error(...) signalUlf Hermann2015-07-151-1/+1
| | | | | Change-Id: Icf708af4ab968c6592f78f90c3758e30dbe9195d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add option to use a local socket for QML debuggingUlf Hermann2015-06-262-8/+54
| | | | | | | | | | Using a TCP debug server comes with a number of drawbacks. It has a larger overhead than other connection types, the application has to be able to access the network and there has to be an open port we can find somehow. Change-Id: Ia7fb24006b89419988c6504797303d84c3aa1bbc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1210-70/+70
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Fix build: include <qdatastream.h> before using QDataStreamThiago Macieira2015-01-021-0/+1
| | | | | Change-Id: I779e0cd705f664368b47763d4367b9dc377c1770 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QmlDebug: Allow tests to ignore a number of bind errorsUlf Hermann2014-12-052-4/+17
| | | | | | | | Like this we can effectively test the port range feature of the debug server. Change-Id: Id0d0b47525177f0cfbb8c35a267962a82338f047 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2510-190/+110
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix failing autotest due to wrong Qt datastream versionKai Koehne2014-03-282-1/+7
| | | | | | | Actually use the exact version that we decided by the connection handshake. Change-Id: Ib3cbecd57366a3bb52cc48242027968c12213e80 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add the features of QLoggingCategory to QML's debugging methods.Giorgos Tsiapaliokas2014-03-071-3/+0
| | | | | | | | | | It is now possible to modify the output of QML's debugging methods. Also the prefix of "qml" makes it possible to capture the output from the QML files using qInstallMessageHandler. This commit depends on qtbase/4967c7106568d5df0be4d40bf793583c7c6bdb69 Change-Id: I2c7a2cb96a0b91fd3249dc2dacbab63e6ac68243 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qqmldebugclient.cpp: Fix warning about missing return.Friedemann Kleint2013-11-181-0/+1
| | | | | | | | | | | In file included from ../shared/qqmldebugclient.cpp:473:0: ../shared/qqmldebugclient.cpp: In member function 'QString QQmlDebugClient::stateString() const': ../shared/qqmldebugclient.cpp:452:1: warning: control reaches end of non-void function Change-Id: Ic5422dcff41591691621077ade45b6ea3ea3a8f1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Improve output of test caseKai Koehne2013-10-164-1/+51
| | | | | Change-Id: Ib36583120ca42835534f0f8494637aeb9618f317 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Add qml toolAlan Alpert2013-09-171-0/+16
| | | | | | | | | | | | | | | | | | | This tool simply runs QML files using a QQmlApplicationEngine. It is configurable so as to behave, by default, like qmlscene in that it will automatically place non-Window QtQuick 2 Items inside a QQuickWindow with the size of the root item. The configuration is extensible so that other GUI scenes can also use it by altering the configuration files in their installation. On OS X, it is an app bundle, and handles the QFileOpenEvent so that it can be the tool with which qml files are usually launched by double-clicking. (This does not break the ability to use it on the command line too: the options still work, you just have to give the path to the executable inside the bundle.) Change-Id: I6bac813ce188be54842a78d7b532fcf2d54dc443 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>