aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/shared
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Debugger: Fix crash when app exits while debuggingKai Koehne2013-08-212-0/+13
| | | | | | | | Make sure we don't access an already deleted v8engine any more. Task-number: QTBUG-33100 Change-Id: Ic517577ae30b41375cbf9f787cfe0a29121171e2 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* QmlProfiler: Pixmap CacheChristiaan Janssen2013-04-302-0/+11
| | | | | Change-Id: Ibc237bb162c24030438b89d54fa8802ee66b080a Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Revert "QmlDebugging: Remove 'insignificant_test'"Aurindam Jana2013-04-161-1/+1
| | | | | | | | This reverts commit c4b4b01d8ea708f7a1c4cb5adaed8f4abdc623a3. The testcase is still flaky on OSX. Change-Id: I6970b681c3172f7074c00b38c3362d5f212392ab Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QmlDebugging: Remove 'insignificant_test'Aurindam Jana2013-04-061-1/+1
| | | | | | | | | | | | | The test cases used to depend on a specific port being free for client-server communication. Since, the test cases now use a port range, they should be more stable now. The timeout has also been increased from 5s to 10s to ensure that the application output is read. Task-number: QTBUG-28263 Change-Id: I7f0670713b8a901e4da3c3d62bbb9fc18e38bd25 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Debugger: Accepts port range as argumentsAurindam Jana2013-04-022-1/+12
| | | | | | | | | | Allow a port range to pass on command line, and try to listen on any of the ports in the range. (Re)using the ',' separator allows for backwards compatibility, that is, also Qt 4 will accept a -qmljsdebugger=port:1000,1010 argument, but will only try to listen on port 1000. Change-Id: Ic03fe20e4aee9ecdea86651f46f1df5cb19bd75c Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix warning about use of uninitialized value in QML-debug helpers.Friedemann Kleint2013-03-111-14/+14
| | | | | Change-Id: Ifcba9c1224dfa7db069ef71b1bb39e3c7658a7b5 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Fix warning about adding int to a QString (CLANG).Friedemann Kleint2013-03-111-1/+1
| | | | | | Change-Id: Ibc84dcbe5ca4519bb1ac25e5d5463ef58c48190e Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1010-10/+10
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* When declarative debug tests fail in CI, confirm timeout as reasonShawn Rutledge2012-11-081-0/+2
| | | | | | | | | Hope to correct errors like FAIL! : tst_QQmlInspector::reloadQml() 'QQmlDebugTest::waitForSignal( m_client, SIGNAL(responseReceived()))' returned FALSE. () Change-Id: Iebf29d4de0bc19396041565e5a4cd32561345235 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Allow QQmlDebugProcess to be child of other qobjects.Frederik Gladhorn2012-10-232-3/+4
| | | | | | | | | | | Some tests when failing would leave the process running. For example on my machine tst_qqmlinspector would hang and restarting it would not work because the before started process was still blocking the port. Change-Id: I32dfb4874b18d7dcf34d0f40819b17dedd794ff3 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Allow tests to run despite custom message patterns.Frederik Gladhorn2012-10-231-1/+1
| | | | | | | With QT_MESSAGE_PATTERN some tests would not run without explanation. Change-Id: I68a9eda08fe56508ffaaef209a1f236621aa932e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2310-240/+240
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Do not depend on indirect inclusions: #include and forward-declareThiago Macieira2012-06-271-0/+1
| | | | | | | | | | | QObject is now no longer indirectly included by qpair.h, so let's make sure it's forward-declared before use. qpair.h also no longer includes qdatastream.h, so #include "qdatastream.h" before using QDataStream. Change-Id: I698b905cb55d9dce0637f534dc5efeffe5ff882e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix warnings in declarative tests.Friedemann Kleint2012-06-201-1/+1
| | | | | | | | | | | | - Unused variables and test data. - () around operator &&. - Conversion of false to 0-pointer where QVariant was intended. - Missing enumeration value. - Remove duplicated qqmlecmascript entry from qml.pro (has an internal check for no-widgets). Change-Id: Ie030167e22bce26e3988a4406c630fb460f61a3c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>