summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.qdoc
Commit message (Collapse)AuthorAgeFilesLines
* Fix typosJarek Kobus2018-02-131-1/+1
| | | | | Change-Id: Id625efea998f2b4dce9970b903830dc3b3efcd3d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* doc: Fix remaining clang parsing errors in QtTestMartin Smith2018-01-181-2/+53
| | | | | | | | This update also corrects all the remaining qdoc warnings in the mnodule. Change-Id: I1cea2cb1dd515d075a1e49a52ca78fc407c3a324 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qtestmouse: do not qWait for mocked events on macOSGatis Paeglis2017-11-301-4/+0
| | | | | | | | | | | | | | | | | | | | This logic initially was copied from QTest::mouse* widget overload (by d130382776e8b9db491385a0db45a3daaa79890c) which uses QCursor::setPos() to generate mouse move events via the windowing system. The QCursor API was later removed by 1762bf3394219db3a7a9cc99306f4111e6cb8492, but now the redundant qWait logic remained. Later this stray qWait was incorrectly moved to apply for all mouse event types (by 268f41ec70fd70d4aa44a5043d1a4e678df4c5b5), when originally it was needed (arguably) only for mouse move events due to usage of QCursor. This patch also removes the waitForEvents() function as it is not a documented qtestlib API (in qtestlib only the documented functions should be considered public API, no matter what you can find in the header files). Removal does not affect binary compatibility as this is not an exported symbol. And if somebody has used this non public API, updating code is trivial. Change-Id: Id1dec10f5cf276cee1ac0e8c8f8ba2edc493b667 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* testlib: Add qWaitFor to wait for predicateTor Arne Vestbø2017-09-251-0/+15
| | | | | | | | Reduces duplication of logic and allows other primitives to be built on top. Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Document expose event behaviorMorten Johan Sørvig2017-07-111-0/+11
| | | | | | | | | | | | Document that "visible"-but-obscured windows may not get expose events for various audiences: QTestLib users, platform plugin authors and on the QExposeEvent itself. QWindow::exposeEvent() already has this documented and is not changed. Task-number: QTBUG-50414 Change-Id: I91042e8b1c70e48f10e692b2e80367d242a8ccbe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* testlib: add key sequence functionLiang Qi2017-06-221-0/+18
| | | | | | | | | | [ChangeLog][Qt Test] Added keySequence() function. Task-number: QTBUG-53381 Change-Id: Ib7c3f966fe607f00475ae74aaf070cb988d00141 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QCOMPARE: allow mixed-type comparisonsMarc Mutz2017-04-211-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to restrict the LHS and the RHS to the same type like it was done before. That just leads to lots of casting. or use of QVERIFY(. == .) instead of QCOMPARE, with all the disadvantages like no printing of the LHS and RHS values. The rationale given in the documentation for this behavior is incorrect. Ensuring that RHS and LHS have the same type by no means ensures that no implicit conversions take place when calling operator==. Proof: QCOMPARE(QLatin1Char('a'), QLatin1Char('a')); // instantiates qCompare<QLatin1Char, QLatin1Char> // but calls operator==(QChar, QChar) If the intent is to disable implicit conversions of the argument types, then some serious metaprogramming magic would be needed, along the following lines: 1. find out which op== overload is actually chosen 2. find that overload's RHS parameter type, assert it's the same as (possibly cv-qualified) T1. 3. ditto for the LHS parameter type and T2 This is not attempted here. Fix the inconvenience this restriction caused by simply allowing two types. This cannot break existing code, since we didn't actually change anything in the qCompare() overload set. All we do is implement the existing qCompare<T1, T2>() overload. [ChangeLog][QtTest] QCOMPARE can now be used for mixed-type comparisons. Change-Id: I0413dbd3689809852413eaca22827257f1527720 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-171-3/+3
| | | | | | | | | | | | | | | | Conflicts: mkspecs/macx-ios-clang/features/resolve_config.prf src/testlib/qtestcase.qdoc Change-Id: Icefa63056ffb37106f35299a8f19165535571799
* | Fix qdoc warningsFriedemann Kleint2016-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/network/socket/qsctpsocket.cpp:506: warning: Undocumented parameter 'datagram' in QSctpSocket::writeDatagram() qtbase/src/network/ssl/qssldiffiehellmanparameters.cpp:129: warning: Undocumented parameter 'encoding' in QSslDiffieHellmanParameters::QSslDiffieHellmanParameters() qtbase/src/gui/opengl/qopengltextureblitter.cpp:540: warning: Undocumented parameter 'opacity' in QOpenGLTextureBlitter::setOpacity() qtbase/src/gui/opengl/qopengltextureblitter.cpp:522: warning: Undocumented parameter 'swizzle' in QOpenGLTextureBlitter::setRedBlueSwizzle() qtbase/src/testlib/qtestcase.qdoc:1124: warning: Cannot find 'createTouchDevice(...)' in '\fn' QTest::createTouchDevice() Change-Id: Ie8799aa5f63a4ea6c9fe309e2a627fbe3a13b685 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | doc: add docs for QTest::createTouchDevice()Shawn Rutledge2016-06-151-0/+14
| | | | | | | | | | | | Task-number: QTBUG-44030 Change-Id: I4bb6a0d0a257cf94883895baebafba70d0cf0f58 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-031-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/double-conversion/include/double-conversion/utils.h src/corelib/global/qnamespace.qdoc src/corelib/tools/qsimd_p.h tests/auto/corelib/io/qfile/tst_qfile.cpp Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
* | QTest: support nullptr in QCOMPAREMarc Mutz2016-04-081-0/+8
|/ | | | | | | | | | | This allows to write QCOMPARE(ptr, nullptr); instead of QVERIFY(ptr); Task-number: QTBUG-49973 Change-Id: I6e1327d4327bcf17bd9b59de4352fdcaae98ac27 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Unify license header usage.Jani Heikkinen2016-03-291-5/+5
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Testlib: Move documentation from qtestcase.cpp to qtestcase.qdoc.Friedemann Kleint2015-12-021-0/+1278
Previously, one had to skip 1300 lines of documentation before seeing the actual code in this file. Task-number: QTBUG-38890 Change-Id: I5a375cbe6b62575f6040e952a0931ac8ea2dd557 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>