summaryrefslogtreecommitdiffstats
path: root/src/testlib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Long live QAbstractItemModelTester!Giuseppe D'Angelo2018-01-094-3/+947
| | | | | | | | | | | | | | | | | | | | | | | | | | AKA the model tester, living in QtTestLib now. Underwent some significant refactoring from the original modeltester: in particular, it will stop testing illegal indices. [ChangeLog][QtTestLib] Added QAbstractItemModelTester, a class to help testing item models. Change-Id: I0e5efed7217330be11465ce3abb3590f3f2601a4 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-041-13/+11
|\ \ | | | | | | | | | Change-Id: I644cd82b0d952b7d139e0228bf5017f147db77e7
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-13/+11
| |\| | | | | | | | | | Change-Id: I3fa5c9e216201bdf7da260c395f65d7fb95cba0b
| | * Correct "developer-build" in QtTest black list featuresThiago Macieira2018-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Q_AUTOTEST_EXPORT is *always* defined. Change-Id: I39332e0a867442d58082fffd150560a6042056fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Update MSVC versions because 2017 is 19.11 too (and 19.12)Thiago Macieira2018-01-021-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | So invert the list and let "msvc-2017" be the latest, at least until we know about a different version. Change-Id: I39332e0a867442d58082fffd1504c316e27f51d0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | doc: fix signatures and missing module headersMartin Smith2017-12-144-45/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The update adds the moduleheader variable to the qdocconf file for qttestlib.qdocconf and qmake.qdocconf. The problem with qmake is that it doesn't have a module header file, but it does have qmake_pch.h, which is used here. This update also corrects several \fn commands in the qttestlib docs. Change-Id: I2202b9db96390bac1ee491ca8a99ca9010057ce3 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add command line switch to help outputJan Murawski2017-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the command line switch added in change 184c5470f534119b27c1a4caec29d699aba9c234 on qtdeclarative to the help output of the qmltestrunner application. Change-Id: I9f42719500e0039afa6a5b0f1f365611855229b3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | QtTestLib: port away from QRegion::rects()Marc Mutz2017-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use begin()/rectCount() instead. Change-Id: I08cef424bf24ecf3c058e9b87411f2a5775ffb33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | qtest_gui.h: remove incorrect #ifdefGatis Paeglis2017-11-301-3/+0
| | | | | | | | | | | | | | | | | | | | | Originated from 6c06e14a49773ce5572935864ed6b9be219c610 Change-Id: Id93f33c8a00850c7b41593c85521d75e5293b36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | qtestmouse: do not qWait for mocked events on macOSGatis Paeglis2017-11-302-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-233-2/+115
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-1/+114
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * testlib: start sharing common helper functionsGatis Paeglis2017-11-042-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This header file is a convenient staging area for helper APIs, eventually some could be moved to public QTest API. This header file utilizes the same pattern as other qtestlib header files - wrapping functions with QT_${LIBNAME}_LIB to automatically enable certain APIs based on what is in the projects dependencies, e.g. QT += widgets. Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Testlib: Fix developer-build with clang 4v5.10.0-beta4Robert Loehning2017-11-061-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | "implicit conversion increases floating-point precision: 'float' to 'double'" Change-Id: Id6f4315316e63c849f1a5ddb6c77abc2bab0b2a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Make QCOMPARE print QColor alpha values on failureMitch Curtis2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when two colors are equal except for their alpha values, QCOMPARE produces the following failure message: FAIL! : tst_Test::test() Compared values are not the same Actual (colorA): #ff0000 Expected (colorB): #ff0000 By using the HexArgb format instead of the default HexRgb, we can see the full hex string, with alpha values included: FAIL! : tst_Test::test() Compared values are not the same Actual (colorA): #88ff0000 Expected (colorB): #ffff0000 Task-number: QTBUG-55574 Change-Id: Id82c60a1b473ac6025a6f6ac560fce95a910d782 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove references to obsolete platformsJake Petroules2017-11-051-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-172-11/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | QTest: make toString(QHostAddress) workThiago Macieira2017-10-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know why this needs to be a template specialization instead of overload, like all the other toString overloads. With GCC 7, it was calling QTest::toString<QHostAddress>, which returns nullptr. Change-Id: I638cf58bfa7b4e5fb386fffd14ea7add0eef8f87 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Fix spelling in qWaitFor commentTor Arne Vestbø2017-10-121-1/+1
| | | | | | | | | | | | | | | Change-Id: I0ac67de3371ee36c21e124e88845aaae63a73f6e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Ensure result of all QTest::qWaitFor are verifiedTor Arne Vestbø2017-10-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Workaround GCC 6 parsing error ("used but never defined")Thiago Macieira2017-09-271-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 and other compilers compile this code just fine. GCC 6 fails, so this is clearly a compiler bug. So revert the implementation of the qWait() function back to the original, to make the problem disappear. qtestsystem.h:58:42: error: ‘bool QTest::qWaitFor(Functor, int) [with Functor = bool (*)()]’ used but never defined [-Werror] Change-Id: I0b48fc8e90304e0dacc3fffd14e8110138cc9f45 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Fix build: move Q_REQUIRED_RESULT to the right positionThiago Macieira2017-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you're using GCC 7 or Clang 4, Q_REQUIRED_RESULT expands to [[nodiscard]] that must appear in as specific place on the line. qcompilerdetection.h:1182:29: error: attribute ignored [-Werror=attributes] qtestsystem.h:58:12: note: in expansion of macro ‘Q_REQUIRED_RESULT’ static Q_REQUIRED_RESULT bool qWaitFor(Functor predicate, int timeout = 5000) ^~~~~~~~~~~~~~~~~ Change-Id: I0b48fc8e90304e0dacc3fffd14e80ede168d5c6b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | qpa: enhance mouse event with type and button dataGatis Paeglis2017-10-101-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and deprecate QWSI APIs that accepts mouse event without mouse button/ type data. In the early days of Qt5 it was decided to centralize mouse button/type handling in QGuiApplication (because of limitation of some now unknown platform). This has proven to be problematic as mouse handling details differ across platforms (e.g on X11 we do not receive mouse release event when closing popup windows or ordinary windows that are closed from the mouse press event). Instead of hacking around platform specific behaviors in Qt Gui, we should move this task back to platform plugins (similar to how this was done in Qt4 with native APIs sending mouse details directly to QApplication). There are even cases where it simply is not possible to deduce (from QGuiApplication) which button caused the event (e.g. when more than one button is involved and some event goes missing). Besisdes, throwing away information which is already available at QPA level (for free) and trying to deduce it again at Qt Gui level seems impractical, fagile (as probably noticed by people fixing all the unexpected issues) and adds unnecessary complexity. Note: Removing the deprecated QWSI APIs from offscreen plugin depends on fixing autotests that rely on QOffscreenCursor::setPos() logic. For the convenience of testing use QT_QPA_DISABLE_ENHANCED_MOUSE to restore to the old code path where QGuiApplication does the mouse state deducing. Other platforms have similar issues. I do not have all supported platform available on my desk, so other platform maintainers will need to take care of porting those platforms to the new APIs. And mainly, I don't want to deal with all the hacks that other platforms have added to workaround this broken mouse logic. In Qt6 we need to remove deprecated code path from QGuiApplication. This patch: - Extends QWindowSystemInterfacePrivate::MouseEvent ctor with QEvent::Type and Qt::MouseButton. We use this extra data when processing mouse events in QGuiApplication. This actually is similar to KeyEvent, where we do pass the type (press or release) to QtGui. - Refactors QGuiApplicationPrivate::processMouseEvent and qtestlib to use the new APIs. Task-number: QTBUG-59277 Task-number: QTBUG-62329 Task-number: QTBUG-63467 Change-Id: If94fd46a7cccfea8264dcb1368804c73334558b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QTestLib: flush DeferredDelete events between every testDavid Faure2017-10-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes qtestlib behave more like real Qt applications with an event loop, where exiting the application does indeed flush deleteLaters. And since every test method is supposed to be independent from other test methods, we should even cleanup between tests. For "app less" tests, no flushing happens. Real life use cases: * A unittest for some code (e.g. KIO job) which uses a socket, runs an event loop until the socket communication is done, and ends. However slotDisconnected() does, as recommended, socket->deleteLater(). So the test finishes before the socket has a chance to actually get deleted, and memory leak tools flag a memory leak, which doesn't actually happen outside the unittest. * Deleting a QWebEngineView with deleteLater is even worse than a memleak, it leads to an assert (from a global object destructor) in QtWebEngine if the view deletion hasn't actually been processed. Change-Id: I18fc822fd26988a0fa4e75313c1947fcaa7d9e56 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-266-31/+67
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | testlib: Add qWaitFor to wait for predicateTor Arne Vestbø2017-09-254-28/+64
| | | | | | | | | | | | | | | | | | | | | | | | Reduces duplication of logic and allows other primitives to be built on top. Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-2/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| | * Testlib: Do not list unsupported optionChristian Stenger2017-09-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This option is listed when displaying the help of Quick tests, but was never actively supported as it had been removed before Qt5.0 was finally released. Change-Id: I4cdf8d86471ab72e289f27a07a5f04c0338bfdbd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-061-2/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * testlib: Print event coordinates and window size when event is outside of windowMitch Curtis2017-09-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives the user a much clearer understanding of which part of the test caused the warning. Old warning: WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event occurs outside of target window. New warning: WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event at 501, 179 occurs outside of target window (450x450). Change-Id: I2943d79bab5a808e9b5b721758db216b91a07bbd Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-1910-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-194-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Android: clang fix implicit conversion warningBogDan Vatra2017-09-101-7/+7
|/ / | | | | | | | | | | | | | | | | | | The error message was: error: implicit conversion increases floating-point precision: 'float' to 'double' [-Werror,-Wdouble-promotion] Change-Id: I2cbf035d4e7b223d1280d53255d54b2a6c48ea37 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Make it possible to override QT_LOGGING_TO_CONSOLE in test casesJoerg Bornemann2017-08-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is currently impossible to get output from autotests in Visual Studio or Qt Creator when running under the debugger. Qt Creator's cdb integration cannot distinguish between the inferior's console output and cdb's console output. If the inferior's output came from OutputDebugString we'd be able to catch and display it. Pave a way to force QTestLib's logging facility use OutputDebugString. Task-number: QTCREATORBUG-16161 Change-Id: Iccd69c283626266ee4384a6163a8b72bb0e7df27 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | testlib: move strings from functions to array in benchmark metricLiang Qi2017-08-291-133/+57
| | | | | | | | | | Change-Id: Ida7ba60d26171b95ba0e9709eec5c6553efeecca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Testlib: Format QVector2/3/4D in QCOMPAREFriedemann Kleint2017-08-271-0/+29
| | | | | | | | | | Change-Id: Ia0709e598d2fddd6c2f448633b484749146265f7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QTestLib: Disable App Nap on macOSMorten Johan Sørvig2017-08-223-0/+41
| | | | | | | | | | | | | | | | App Nap may cause stalls or timer delays during test runs. Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42 Task-number: QTBUG-61499 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devThiago Macieira2017-08-082-13/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp This merge also extends the expected output of the pairdiagnostics teamcity output (added in dev in commit c608ffc56ab37f9a9d5b9c34543126adb89e2b08) after the recent addition of the flowId attribute to the teamcity output (commit 8f036562119dd35ce51dc9230304d893b906bd37 in 5.9). Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
| * Add flowId to messages when logging in TeamCity formatBorgar Ovsthus2017-08-042-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Added flowId='name' to each message when using TeamCity logging format. This is necessary to distinguish separate processes running in parallel. [ChangeLog][QtTest] Added flowId to messages when logging in TeamCity format. FlowId is used to distinguish logging from multiple processes running in parallel. Change-Id: I7f5046c1058ff02770404caa2c9b3a5398f97f6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move toString calls after their definitionTimo Aarnipuro2017-07-212-12/+18
| | | | | | | | | | | | | | | | | | | | | | Move two functions that are using toString(const QString &str) from qtestcase.h to qtest.h. This fixes compilation on INTEGRITY platform. Task-number: QTBUG-61702 Change-Id: I5a433126741c7a52621616c5b98203e7d642b330 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-3/+7
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * testlib: Allow tailing comments in blacklist filesTor Arne Vestbø2017-07-181-3/+7
| | | | | | | | | | | | | | Task-number: QTBUG-61987 Change-Id: I27219a6d06d7a81514e3f7b2ad5469676f724e04 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-133-14/+16
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * QtTest: Add msvc2017 detection and keyword to blacklistingFriedemann Kleint2017-07-101-1/+3
| | | | | | | | | | Change-Id: I71162fc7dff0f29a24fd78e1188f8d86c2834d3c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix modernize-use-bool-literals issuesKevin Funk2017-07-082-13/+13
| | | | | | | | | | | | | | | | | | | | | | Reported by clang-tidy. Skipped fixes in implementation files, only changed headers. Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-8/+10
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Allow using Xcode Command Line Tools to build QtJake Petroules2017-06-291-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users don't want to download the full Xcode installation which can weigh upwards of 5 GB download and 20 GB installed. [ChangeLog][macOS / iOS] Qt can now be built using just the Xcode Command Line Tools, without needing to install the full Xcode IDE. Task-number: QTBUG-35928 Task-number: QTBUG-41908 Change-Id: I6d13c9a03ab9087b3ab56e8547f53f0cc2806c7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Split QTest::qExec()J-P Nurmi2017-06-222-30/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split into (internal) QTest::qInit(), qRun(), and qCleanup(), that allow qtquickcontrols2 to initialize the test framework once, repeat the tests for all built-in styles (Default, Material, Universal), and finally cleanup things: $ ./tst_qquickbutton text ********* Start testing of tst_QQuickButton ********* Config: Using QtTest library 5.10.0, Qt 5.10.0 (...) PASS : tst_QQuickButton::Default::initTestCase() PASS : tst_QQuickButton::Default::text() PASS : tst_QQuickButton::Default::cleanupTestCase() PASS : tst_QQuickButton::Material::initTestCase() PASS : tst_QQuickButton::Material::text() PASS : tst_QQuickButton::Material::cleanupTestCase() PASS : tst_QQuickButton::Universal::initTestCase() PASS : tst_QQuickButton::Universal::text() PASS : tst_QQuickButton::Universal::cleanupTestCase() Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted, 2215ms ********* Finished testing of tst_QQuickButton ********* Notice that QTest::qExec() cannot be called multiple times, because it would print the headers/footers/results separately for each round. Change-Id: Ibb24b694491d4e790db32e40837c3a5c6d9d2840 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>