aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
Commit message (Collapse)AuthorAgeFilesLines
* Prevent crashes when profiling translation bindingsUlf Hermann2017-11-113-1/+31
| | | | | | | | | The m_v4Function member can now be a nullptr, which means we cannot use it as ID and we cannot retrieve the source location from it. Change-Id: Ibb49a3e68cf961f9ffe2a83b2a0b83f7d04e149e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4Liang Qi2017-11-061-0/+39
|\ | | | | | | Change-Id: I8ede7e36592cd21f3e4a0a9b30dbe26bb40fe69b
| * QQmlEngineDebugService: Check QML contexts for validityUlf Hermann2017-11-051-0/+39
| | | | | | | | | | | | | | | | | | We should not operate on invalid QML contexts and once we have established a context to be valid we don't have to check the result of QQmlContextData::get anymore. Change-Id: I9106115ddf925c3572048f1fd334bdfd9a9cfca7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-08-236-11/+4
|\| | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp Change-Id: I31375151eb239f348bec988d2d0506c2b4d9604c
| * Make sure QQmlDebugProcess correctly reports session as startedUlf Hermann2017-08-177-15/+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>
* | Base QQmlDebuggingEnabler test on QQmlDebugTestUlf Hermann2017-08-181-118/+34
| | | | | | | | | | | | | | | | | | This allows us to reuse the centralized cleanup routine, avoiding leakage on test failures. Also drop the unused init() method and "t" member. Change-Id: I85bf5728599a20cd3a3afdbc1b3ef92432d7b92d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Use centralized initialization also for QDebugMessageService testUlf Hermann2017-08-181-77/+7
| | | | | | | | | | Change-Id: Ia4cc53c364b8035d9df0049ddd460ba77da93b10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tests: Unify debugger tests' connection mechanismsUlf Hermann2017-08-1811-620/+454
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Move QQmlDebugJs test init failures to outer functionUlf Hermann2017-08-171-93/+69
| | | | | | | | | | | | | | | | | | Apparently the blacklisting doesn't catch tests failures outside the test function and using QTest::currentTestFailed() to handle that after the fact is ugly. Change-Id: I101abd3e8e467a5ca258a6019542251d26235139 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move QQmlProfilerService test connect failures to outer functionUlf Hermann2017-08-171-33/+54
| | | | | | | | | | | | | | | | | | Apparently the blacklisting doesn't catch tests failures outside the test function and using QTest::currentTestFailed() to handle that after the fact is ugly. Change-Id: I04fa4b9ba8740696fb2ed11cb3b93b2b7115b846 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tests: Clean up inclusion of util.pri and debugutil.priUlf Hermann2017-08-1713-21/+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>
* | Avoid leaking resources on test failures in QQmlDebugService testUlf Hermann2017-08-171-11/+12
| | | | | | | | | | Change-Id: Id87094c538f80bf18f33dc656c1b98a35e23be89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove hack to make QtC understand that typeof null is "object"Ulf Hermann2017-08-151-1/+1
| | | | | | | | | | | | | | Newer Qt Creators know that. Change-Id: If4d3da5a46b49864a77854fff79e54cef2ea26d6 Reviewed-by: hjk <hjk@qt.io>
* | Ignore qqmldebugjs/profilerservice failures in win/gccSimon Hausmann2017-08-023-3/+64
|/ | | | | | | | | Amends 80e03bbd9a42401d50af450aff5351c3a0c95444 for dev, adapting to tests in dev. Task-number: Task-number: QTQAINFRA-1334 Change-Id: I1aede768f40f42bfc2af7caf342f7cf2d06c523a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Ignore debugger failures with GCC on WindowsSimon Hausmann2017-07-2811-3/+53
| | | | | | | | | | | | | | | Capturing the output of the started process mysteriously fails on Windows with gcc. While the nested event loop is run, the readyRead() signal is never emitted. Only after the timer fired and the event loop is terminated, we receive the output we were expecting. Some tests needed adapting to the initializing sub-function failing in QVERIFY/QCOMPARE calls, in order for the process to not crash and the blacklisting to work. Task-number: QTQAINFRA-1334 Change-Id: I4804d94580e7db65595137d19d7b75d75c243257 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Get rid of the old way of defining builtin functionsLars Knoll2017-05-191-4/+4
| | | | | | | | | | The old calling convention used for builtin functions is very inefficient. It was still being used in a few places. Clean those up and convert them to the new and much more effiecient calling convention. Change-Id: I6b769c6185df7e9be1e80709330fc1ca868576c1 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* V4: Set correct source locations for jumps out of conditionalsv5.9.0-beta1Ulf Hermann2017-03-311-20/+48
| | | | | | | | | | | | | | | | | | | | | We always want to place the jump on the last line of the conditionally executed statement, unless we might never execute the last line. In the latter case, that is if the inner statement is again a conditional, we use some token of the outer condition. This works fine with loops, as the loop condition is actually checked after each iteration, and it's plausible to the user that we jump there. With "if" statements, it's not so great. We cannot really explain why we jump back to the "if" token after executing the conditional statement. However, we have to add some source location to the jump instruction as otherwise it uses the source location of the last statement that had one, which is rather random. Task-number: QTBUG-59204 Task-number: QTBUG-59774 Change-Id: I48e331ce1c1830f236e16b75c9201a2f490d2092 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml Debugger: Make sure all objects have a typeUlf Hermann2017-03-312-15/+57
| | | | | | | | | 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>
* Allow info messages in debug message serviceUlf Hermann2017-03-221-1/+1
| | | | | | | QtInfoMsg > QtFatalMsg, and it was added later. Change-Id: If565ebd491aba57b162c7f8ddb5534e416f7ab44 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QV4DebugService: Reduce unnecessary recursion and redundancyUlf Hermann2017-03-142-60/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | Large parts of the protocol are unnecessary. There is no reason to send a separate chunk of "handles" with almost every reply. The refs are given as part of the regular data and if the client wants to find out more, it can do further lookups. Also, it makes no sense to encode the function and script names as objects, as they are in fact not JavaScript objects. Unfortunately these cleanups require some cooperation from the client. Older clients will misbehave if we just drop the redundancy. Therefore, we introduce parameters which the client can explicitly set with the "connect" message. redundantRefs tells the service if redundant references are required, namesAsObjects tells it if script and function names have to be sent as objects/ Once we can require clients that support these options, we can drop the code that generates redundant data. Also, fix tst_qv4debugger::evaluateExpression() to actually check all the expressions evaluated, not only the first and second one. Task-number: QTBUG-42435 Change-Id: If93d2a2b9d0b8035f85dbef871bc1b03f199171d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Set source location for all loop body-to-front jumpsUlf Hermann2017-03-071-4/+19
| | | | | | | Task-number: QTBUG-59204 Change-Id: Id1a73b228cd3386c7fcc7712c2485f387238b65e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add a source location to the final Jump in a for loopUlf Hermann2017-02-281-0/+26
| | | | | | | | | | Otherwise it will assume the last statement as the location of the jump, and that might be a statement that is never hit. Task-number: QTBUG-59204 Change-Id: I66019a284b061358939b23e649ca0832b5442388 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 Debugger: Don't crash when stepping to the end of a scriptUlf Hermann2017-02-281-1/+29
| | | | | | | | The last instruction is a return, which leads to an invalid context. Don't try to save that context, but rather clear the current one. Change-Id: I468b7420c4ca0842209c9b00478f99cc4dc69726 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make inspector animation speed test more robustUlf Hermann2017-01-182-21/+37
| | | | | | | | | | | | We don't exactly know when the animation speed is actually set and the system clock may play tricks on us. Consider the test failed when the wrong animation speed is witnessed 3 times in a row and successful if the correct one is witnessed 3 times in a row. Also, make sure we don't confuse lines from different hits of the timer. Task-number: QTBUG-58186 Change-Id: Iaa2c35f723a92f32131e36084399b3d32accb7d0 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-143-2/+32
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9d87ed86e95b5901a86cc3aa65d7ac39b0b708c2
| * QML tooling: Make sure we signal object creation also from QQmlIncubatorUlf Hermann2017-01-113-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | V4 Debugger: Add an option to pass additional context for evaluateUlf Hermann2016-12-093-10/+85
| | | | | | | | | | | | | | | | | | | | | | Interpret the "context" option as an ID for a QObject whose QML context is then injected when evaluating the expression. The QObject needs to be tracked by some other debug service for this to work, e.g. the QML debugger or the inspector. Task-number: QTCREATORBUG-17177 Change-Id: I6a9e8b9ae23e8bb67ed1905a2ef73f7c4faeb990 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QmlDebug: Allow specifying debug connectors on the command lineUlf Hermann2016-11-243-37/+83
| | | | | | | | | | | | | | | | | | | | With this change arbitrary debug connector plugins can be loaded by specifying them in the "-qmljsdebugger=..." argument. It was already possible to load them by using startDebugConnector(...), but that requires source code modification. Change-Id: I06ec7f54ec65add7cff2846ed4083ea878a04765 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QmlTooling: Retry local client connection on errorUlf Hermann2016-11-231-8/+3
|/ | | | | | | | | So far the local client connection would give up if it could not connect to the server on the first try. Considering that you cannot reset the connection, this is very harsh. Instead, retry on failure. Change-Id: I68464b7b99b94a4b0fb2722d718a43a1c0889f40 Reviewed-by: hjk <hjk@qt.io>
* Adjust decarative after qtConfig changes in qtbaseLars Knoll2016-08-191-2/+2
| | | | | | | | | Most of the changes are optional, but cleanup our QT_CONFIG usage. Change-Id: I5253d53f72f6fb03c2cfedae1e17d94f424a6bbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML debugger: Fix testErik Verbruggen2016-08-031-4/+3
| | | | | | | Use delete[] on a new[]-ed pointer. Change-Id: Ic5721851bdcec284cdd631b81d2cc96b7a1748fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-7/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-6/+11
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | * Relax QQmlProfilerService test for scene graph eventsUlf Hermann2016-07-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | The scene graph might decide to do an initial rendering, before the first SceneGraphContextFrame. Change-Id: Ie6d96574b5585cfda4dcd258b6031303f9a37715 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QmlProfiler: When flushing data, send it in the right orderUlf Hermann2016-05-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the adapters immediately return dataReady() when reportData() is invoked. This means that there is only one adapter in the start times list then, which in turn causes all the data from that adapter to be sent at once, without caring for the other adapters' timestamps. Change-Id: Ic1e12fdcefb0a691067518fba100368f13c927f7 Task-number: QTBUG-53590 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | V4: Make ExecutionEngine's debugger and profiler privateUlf Hermann2016-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This will allow us to #define them away on -no-qml-debug, saving two pointers per engine. Change-Id: I400cffd32cd7f55ff0e68565734b6002b9f901d5 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>
* | | QmlProfiler: Extend test to check for timestamp orderingUlf Hermann2016-07-061-1/+22
| | | | | | | | | | | | | | | | | | | | | Timestamps should always increase monotonically. Change-Id: Idfd44e160193aab7bce37b58bc42a94ff087d15e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into HEADLaszlo Agocs2016-05-241-0/+2
|\ \ \ | | | | | | | | | | | | Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| | * | V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-247-24/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickopenglshadereffectnode.cpp src/quick/items/qquickshadereffect.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h src/quick/scenegraph/qsgdefaultglyphnode_p.h Change-Id: I3d6874b4e4231a89d2836c04fe8e7f2ef2d698c4
| * | | QmlProfiler: Don't import QtQuick if we don't use itUlf Hermann2016-05-097-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables some of the tests to run in QML-only environments, without QtQuick. Change-Id: Icc7250b6ddab43730cb4744ffc4e0bade8574d26 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | | Fix some test failures with QT_NO_OPENGL buildsAndy Nichols2016-05-061-2/+3
|/ / / | | | | | | | | | | | | Change-Id: I4154084b4a0e0709ee8cb39a856a37a611e2d537 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-082-0/+0
|\| | | | | | | | | | | Change-Id: I48c493b537e65276107ed7ee029312e294947e8b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-082-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| | * Purge sRGB chunks from PNG in tests.Edward Welbourne2016-03-291-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: I9e4dc3aec97cd32bc8ac216fadeaf7669c49647c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Remove empty .pro fileJoerg Bornemann2016-03-241-0/+0
| | | | | | | | | | | | | | | Change-Id: Ia85ced87b9cb0ad2093bdfc4abcf222929bc8bd5 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>