aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-0312-12/+2
| | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Allow specification of loadable debug services via command lineUlf Hermann2015-08-136-125/+161
| | | | | | | | | We don't want to load the debugger when profiling and vice versa. This makes it easier to prevent unwanted services from getting loaded. Task-number: QTBUG-47623 Change-Id: I28893b6218110274a6d30b27805d89dbb443add3 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Periodically flush profiling data to client.Ulf Hermann2015-08-043-2/+38
| | | | | | | | | | | | | | | | | | | | This reduces memory usage as the data can be deleted once it is sent. It also reduces the time it takes to transmit the data when profiling is stopped. It does incur a runtime cost as the sending now takes place while the application is running. The decision to periodically flush or not is left to the client, who can specify a flush interval when starting profiling. Usage of the flushing feature also relaxes the guarantees regarding the sorting of events before they are sent. Events with higher timestamps are now allowed to arrive before events with lower timestamps. Any clients implementing the flushing need to take this into account. This will eventually allow us to do away with the server-side ordering altogether. Task-number: QTBUG-39756 Change-Id: Idaf4931dc17f224c2bd492078b99e88b1405234e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use signal/slot for passing messages through QQmlDebugServerUlf Hermann2015-07-313-10/+2
| | | | | | | | | | | | | | 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-304-97/+59
| | | | | | | | | | | | | | | | 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>
* Extract minimal interface from QQmlDebugServer and use it.Ulf Hermann2015-07-304-6/+0
| | | | | | | | | | This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer is the interface exposed to connection plugins. The interface exposed to services is renamed to QQmlDebugConnector, as technically it doesn't have to be a "server". Change-Id: Id508b8c0a6960228e889f45a437b73060392db39 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use QVector rather than QList for storing QQmlProfilerDataUlf Hermann2015-07-291-6/+6
| | | | | Change-Id: I94519181e915c5e2df9614ad4e1180fb159252e3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove QQmlDebugService::objectToString()Ulf Hermann2015-07-291-13/+0
| | | | | | | It isn't used anywhere. Change-Id: I73e2f448be30c04dca4d7122d173782e302478bd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove some methods from QQmlDebugServerUlf Hermann2015-07-294-6/+0
| | | | | | | They were only used internally or for redundant checks in the tests. Change-Id: Iaa7d52be030adaa52a07b28fba53bdef9fada879 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove static proxy methods from QQmlDebugServiceUlf Hermann2015-07-294-5/+11
| | | | | | | | | They all internally map to one-liners and just add to binary size and complexity. Especially, the most used one, isDebuggingEnabled(), simply checks if there is a QQmlDebugServer::instance(). Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-294-9/+9
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Make tst_QQmlInspector::reloadQmlWindow() fail more quicklyUlf Hermann2015-07-221-2/+2
| | | | | | | | It's annoying that we have to wait for 5s, just for the confirmation that QTBUG-33376 isn't fixed. Change-Id: I6296cc05d6dc7240ec3182ff10b19e40d5d4e599 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>
* Fix tst_qqmldebuglocal on QNX.Rafael Roquetto2015-07-101-1/+1
| | | | | | | | | QNX does not place library functions on the default namespace. Either use namespace std or explicitly state the namespace prefix. Change-Id: I1037c16316b9545ea6214289a3af9a549e83613c Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-301-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/quick/items/qquickitemsmodule.cpp tools/qml/main.cpp Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
| * Make argument to QQmlDebuggingEnabler::startTcpServer an enumUlf Hermann2015-06-101-2/+2
| | | | | | | | | | | | | | | | | | The bool argument is less intuitive as you don't know if e.g. true means "Yes, run the QML" or "Yes, block the QML engine". Task-number: QTBUG-46565 Change-Id: I6d268e1354cebeb794b065e118bc0c353d7dd59a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add option to use a local socket for QML debuggingUlf Hermann2015-06-266-8/+232
| | | | | | | | | | | | | | | | | | | | 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>
* | Make QQmlDebugService ctor protectedUlf Hermann2015-06-261-2/+2
| | | | | | | | | | | | | | No one needs a bare debug service. Change-Id: I45a2f2437f51197707af2743faad1845b8007053 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of QQmlBoundSignalExpression::ExtraDataLars Knoll2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The extra data was only used to delay initialization of the required FunctionObject to the first time evaluate got called. In addition, the constructor using ExtraData was only ever called from the debugger. In that case performance can't be critical, so we can just as well do function object creation at construction time. This saves one pointer in the object. Change-Id: I46ce9aa325f0fa95b5b0e374e9c07d673e454dd4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Verify that debug client exists before interacting with it.Ulf Hermann2015-06-162-2/+6
| | | | | | | | | | | | | | | | We don't want the tests to crash if the connection cannot be established. Change-Id: Iebd6d008f6a043b229738d607068ea822fcded9d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Don't wait forever in QQmlDebugClient testUlf Hermann2015-06-151-2/+1
| | | | | | | | | | | | | | | | The test is intended to wait for 5 seconds but in fact it waited for 5 * 30.1 seconds. Change-Id: Id2af7513fc7af6ab5e67d04d802a24744483f5e1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Initialize members of tst_QQmlEngineDebugServiceUlf Hermann2015-06-151-0/+2
|/ | | | | Change-Id: Id9fe7d2bd630bcfe79634b3a4465ec7ad764d18c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Avoid namespacing QTEST_MAINRainer Keller2015-05-086-35/+95
| | | | | | | | | | The test tries to be smart but it won't work once GPU blacklists are supported because QTEST_MAIN will contain some imports that cannot be namespaced. Change-Id: Id0538cf1ba3885736d8b177e64064bd06f8fef2e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-1610-10/+10
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler.pro Change-Id: I76d87e3df97ebdba902ca3d7488c1582eca2a83c
| * Use qt_subtract_from_timeout instead of duplicating qt_timeout_valueDaniel Teske2015-04-1410-10/+10
| | | | | | | | | | | | | | | | The same function was duplicated 5 times in qtbase, so create one copy to rule them all and use it also in QtDeclarative. Change-Id: I4e39a7ee0541ce4fe9710cea344e537ee011bbe9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Tests: Make qqmldebugjs significant againCaroline Chao2015-04-081-2/+0
| | | | | | | | | | | | | | | | The test is now passing in CI. Change-Id: I9414e05d40fe373878afa43121fcfa7cf95fcbdf Task-number: QTBUG-28263 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Remove outdated V8 profiler testUlf Hermann2015-04-085-372/+0
| | | | | | | | | | Change-Id: I296a3f94d16c4e7a6f89e566893f627c50b66ba3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Guard profiler service test against unusual clock behavior.Ulf Hermann2015-03-271-60/+168
| | | | | | | | | | | | | | | | | | | | | | Apparently a monotonic timer can return the exact same timestamp multiple times in a row. In this case the events may be sorted in a different way than we expect. By scanning all events with equal timestamps for the one we're looking for, we can still keep the test useful. Change-Id: I08e1d7ed8d74359a127ac34ebc077375aa70f492 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove bogus autotests for invalid portsKai Koehne2015-03-121-68/+0
| | | | | | | | | | | | | | | | | | | | | | Qt itself doesn't prevent opening a socket in the reserved port range. So what these tests actually check is the system configuration, not Qt. Task-number: QTBUG-44952 Change-Id: Iee6d6d1a5a7a0f4d2039300ccbbbe8bf55a519b9 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix qqmldebuggingenabler autotestKai Koehne2015-03-121-1/+1
| | | | | | | | | | | | | | | | | | The test calls itself as a qml debug server. This requires the debugging functionality to be enabled. Task-number: QTBUG-44952 Change-Id: I462d035ff7ed722008f3710c6db90e5640546be2 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1238-266/+266
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-092-3/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * QML: fix warning in testsErik Verbruggen2014-12-091-2/+0
| | | | | | | | | | | | | | Remove unused class field. Change-Id: I90981546e33d4839a91c418a8746e6f2ebc3bf46 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Inspector: Do not assert when trying to stream QModelIndexKai Koehne2014-11-071-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some QVariant's like QModelIndex cannot be streamed in a meaningful way: QDataType::save() will return false for them. However, this leads to a qWarning and Q_ASSERT in QVariant::operator<<(). To prevent this we're calling QDataType::save() manually beforehand. We however throw away the result if it succeeds, and still call QVariant::operator<<() to get the benefits of the QDataStream version handling. The alternatives would be to make QVariant::operator<<() not assert, or blacklist all known types with problems manually. Both seem to be difficult though ... Change-Id: I4f5fe6d5a3a076c24fbc73371a4d12d720de53da Task-number: QTBUG-42438 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> 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>
* | QmlDebug: Test the debugging enablerUlf Hermann2014-12-054-1/+324
|/ | | | | Change-Id: I7c9aff4474850139fe96afc4b300fa0e2ded8874 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2536-707/+419
| | | | | | | | | - 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>
* Add support for conditional breakpoints and evaluate.Erik Verbruggen2014-08-081-19/+17
| | | | | | | | | | | | Also centralized the context state saver and added line number saving, so that the JS jobs for evaluation of breakpoint conditions don't change the state of the current engine context. Task-number: QTBUG-37119 Task-number: QTCREATORBUG-11516 Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-021-2/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quick/scenegraph/openglunderqml/squircle.h src/quick/doc/src/qmltypereference.qdoc src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9
| * Use QSignalSpy instead of waitFor in tst_qpacketprotocolUlf Hermann2014-06-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTcpServer::waitForNewConnection() blocks the event loop and prevents the client, that runs in the same event loop, from sending anything. Also, if the connection is established before waitForNewConnection() is called we're going to wait for another connection, which will never happen. It's not clear if this is actually the cause of the test failures but blocking the event loop is generally a bad idea and the last change to the test that actually made a difference to the functionality added exactly that line, see b36bbe3626bc68ac267d7653fa6408a8f258251d. Task-number: QTBUG-39655 Change-Id: Ic03a4e7cac78155532588476b99449664c343ee2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Test the javascript heap profilerUlf Hermann2014-06-181-3/+64
| | | | | | | | | | Change-Id: I6ac08e520e263ae1cda9eeccd08dea997f6bdd2f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-06-131-46/+52
|\| | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
| * Keep QML and JS messages separate in QQmlProfilerService testUlf Hermann2014-06-061-46/+52
| | | | | | | | | | | | | | | | | | Like that we can deal with misbehaving clocks in the tested application. Task-number: QTBUG-39169 Change-Id: Ia9f9844efb6f20508bccac3ca2d593d01d55fc83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Javascript heap profilerUlf Hermann2014-06-061-0/+13
| | | | | | | | | | | | | | | | | | This profiler tracks every memory allocation and deallocation, by the MemoryManager as well as the V4 VM, and exposes them as a stream of events to the profiler service. Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-042-133/+105
|\| | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Dump all received messages if tst_QQmlProfilerService failsUlf Hermann2014-06-021-0/+21
| | | | | | | | | | | | | | | | Without all the context we can't really tell what happened. Task-number: QTBUG-39169 Change-Id: Ic5192498440a0d55c279549243dfce65f8168317 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * deduplicate and decruft SUBDIRS listOswald Buddenhagen2014-05-261-4/+0
| | | | | | | | | | Change-Id: I56266efbe1623a529c3cf3609254abda443cf940 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Record synchronous and asynchronous events separately in profiler testUlf Hermann2014-05-221-129/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render events as well as frame painting and keyboard and mouse interaction happen largely independently of QML engine events. We cannot rely on a specific composite order of both types. The tests are written in a way that allows us to rely on a specific order within each group, though. Pixmap cache events are a special case and need their own category as the load start events are synchronous while all others are asynchronous. Still, there is a defined ordering between them. Task-number: QTBUG-39169 Change-Id: I35220a22dcb08ea0bb7286e27347c287a5ce7983 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-101-28/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f