Commit Graph

851 Commits

Author SHA1 Message Date
Christian Stenger
01ea60fdd2 Testlib: Do not list unsupported option
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>
2017-09-13 06:27:54 +00:00
BogDan Vatra
f56c797ef9 Android: clang fix implicit conversion warning
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>
2017-09-10 15:48:30 +00:00
Liang Qi
19dd2ca93b Merge remote-tracking branch 'origin/5.9' into 5.10
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
2017-09-06 13:26:31 +02:00
Mitch Curtis
30609e684f testlib: Print event coordinates and window size when event is outside of window
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>
2017-09-05 11:45:46 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
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
2017-08-31 14:31:31 +02:00
Liang Qi
3088f73cf4 testlib: move strings from functions to array in benchmark metric
Change-Id: Ida7ba60d26171b95ba0e9709eec5c6553efeecca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-29 15:52:08 +00:00
Joerg Bornemann
1bb70830d4 Make it possible to override QT_LOGGING_TO_CONSOLE in test cases
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>
2017-08-28 11:01:17 +00:00
Friedemann Kleint
eb93d7b517 Testlib: Format QVector2/3/4D in QCOMPARE
Change-Id: Ia0709e598d2fddd6c2f448633b484749146265f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-27 06:17:32 +00:00
Morten Johan Sørvig
1497e5853b QTestLib: Disable App Nap on macOS
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>
2017-08-22 05:10:43 +00:00
Thiago Macieira
883dfb3d15 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/kernel/qwidget.cpp

This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).

Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
2017-08-08 11:48:10 +02:00
Borgar Ovsthus
8f03656211 Add flowId to messages when logging in TeamCity format
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>
2017-08-04 18:48:48 +00:00
Timo Aarnipuro
5cae29ffc7 Move toString calls after their definition
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>
2017-07-21 06:10:02 +00:00
Simon Hausmann
407302fb1b Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qwindowspipewriter.cpp
	src/widgets/styles/qcommonstyle.cpp

Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
2017-07-19 09:47:29 +02:00
Tor Arne Vestbø
4a7ec2d9b0 testlib: Allow tailing comments in blacklist files
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>
2017-07-18 13:04:08 +00:00
Gabriel de Dietrich
d38fe875c7 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
    src/widgets/widgets/qmainwindowlayout.cpp

Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
2017-07-13 16:36:10 -07:00
Morten Johan Sørvig
ecac1aeb29 Document expose event behavior
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>
2017-07-11 15:25:00 +00:00
Friedemann Kleint
70b976ece1 QtTest: Add msvc2017 detection and keyword to blacklisting
Change-Id: I71162fc7dff0f29a24fd78e1188f8d86c2834d3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-10 07:01:14 +00:00
Kevin Funk
9db09b4700 Fix modernize-use-bool-literals issues
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>
2017-07-08 11:49:55 +00:00
Liang Qi
c2b224a758 Merge remote-tracking branch 'origin/5.9' into dev
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
2017-07-04 16:05:53 +02:00
Jake Petroules
fa7626713b Allow using Xcode Command Line Tools to build Qt
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>
2017-06-29 02:00:12 +00:00
J-P Nurmi
3ee6d8d336 Split QTest::qExec()
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>
2017-06-22 11:32:46 +00:00
Liang Qi
7323cd8dc2 testlib: add key sequence function
[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>
2017-06-22 07:56:18 +00:00
Edward Welbourne
0caaf33d2f Document the ci key in the BLACKLIST file format
Rearranged existing top-level example to let the ci example make some
kind of sense.

Change-Id: I0a5dd6270aef419c8a33d390c801460f23e10667
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-06-08 13:36:25 +00:00
Marc Mutz
09f6227653 QtTest: add support for printing QStringViews
[ChangeLog][QtTest][QCOMPARE] Now supports printing QStringViews in
case of test failures.

Change-Id: I4dc2542cd1013fd63c094c249e721d7102387bde
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-24 19:35:11 +00:00
Marc Mutz
a611a9f537 QCOMPARE: allow mixed-type comparisons
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>
2017-04-21 19:58:51 +00:00
Liang Qi
7950b6b283 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/tools/qbytearray.h
	src/corelib/tools/qdatetime.h
	src/corelib/tools/qstring.h
	src/corelib/tools/qversionnumber.h
	src/plugins/platforms/android/qandroidplatformintegration.cpp
	tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp

Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
2017-04-20 12:31:27 +02:00
Marc Mutz
58a4f41af2 QDate/Time: add toString(QStringView) overloads
[ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads
taking the format as a QStringView.

Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-12 11:12:09 +00:00
Marc Mutz
da1be671cf QtTest: add toString(QUuid)
[ChangeLog][QtTest] QUuids are now printed on failure.

Change-Id: I39a7b9169aef8ab6ef5ce0790920547af23bd1b9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2017-04-11 07:34:38 +00:00
Samuel Gaist
c608ffc56a Improve pair-like class handling in tests
Currently when doing comparison with pair-like classes the fallback
toString method is called which returns a Q_NULLPTR thus not allowing
proper diagnostic of the values that triggered an error. This patch
adds support for QPair and std::pair to improve the tests output
readability.

[ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and
std::pair on failure.

Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 21:46:32 +00:00
Anton Kudryavtsev
5ec57560c0 Prefer rvalue versions of toLatin() and toUtf8()
... to re-use existing buffers.

Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-30 20:31:59 +00:00
Liang Qi
7702fe8602 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
2017-03-27 10:42:08 +02:00
Thiago Macieira
e19fda916a Fix some warnings found by QNX's compiler
-Werror is now disabled for that compiler, but it doesn't hurt to fix.

io/qstandardpaths_unix.cpp:149:32: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
qtestcase.cpp:2330:31: error: narrowing conversion of '(ms / 1000)' from 'int' to '_Timet {aka unsigned int}' inside { } [-Werror=narrowing]

Change-Id: Id92f4a61915b49ddaee6fffd14aea2c1e686e8f2
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2017-03-25 04:51:01 +00:00
Liang Qi
495f914fb5 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-22 07:10:41 +00:00
Liang Qi
65faf45655 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/plugins/platforms/eglfs/eglfs-plugin.pro

Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
2017-03-21 19:07:53 +01:00
Tor Arne Vestbø
6d49311a5d Teach QTestLib to read QTEST_ENVIRONMENT to expand blacklist keywords
Can be used by CI system to set QTEST_ENVIRONMENT="ci", allowing test to
be blacklisted only for the CI.

Task-number: QTBUG-59564
Change-Id: I7088abb888c179bafc621f11191efbc45c37b179
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-21 16:07:53 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Marc Mutz
9e7d769462 Use the same timeout value for all QTest::qWaitForWindow*() functions
Some were 5s, others 1s. Pick one (the higher).

Change-Id: I81929d4f49c2e41b4d4b75c3e2bf8ff75af868ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-08 07:19:45 +00:00
Kai Koehne
fb2732c43d Testlib: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I7ffe7a8afa28fe8b66e00bc5e51595edeac042a9
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:31 +00:00
Ulf Hermann
44af54419e Properly use the "process" feature
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in
qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess
headers, exclude the sources from compilation when switched off, guard
header inclusions in places where compilation without QProcess seems
supported, drop some unused includes, and fix some tests that were
apparently designed to work with QT_NO_PROCESS but failed to.

Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-27 15:44:46 +00:00
Friedemann Kleint
35fa30e65d Revert "testlib: Add qWaitFor to wait for predicate"
This reverts commit 3b38392844.

The change caused test compile failures with MSVC2015 in qqmlsettings;
a variable was not captured in the lambda expression. This appears
to be a compiler bug of MSVC.

Task-number: QTBUG-59096
Change-Id: I3bf5288eb005b2e1661819bb33bc54fb944d0150
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-23 10:07:57 +00:00
Tor Arne Vestbø
3b38392844 testlib: Add qWaitFor to wait for predicate
Reduces duplication of logic and allows other primitives to be
built on top.

Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-21 14:32:28 +00:00
Paul Olav Tvete
7057b19b89 Only define "accessibility" feature once
The "accessibility" feature was defined globally for qtbase, but also
in src/gui. The definitions could end up with different values.

Change-Id: I1a932c3c04a5fc26b9f67eb4f5ff02e524f380e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-20 08:30:07 +00:00
Liang Qi
c577f6edaf Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/plugin/qlibrary_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp

Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
2017-02-16 21:51:11 +01:00
Thiago Macieira
a7ba91bd64 Use Qt::PreciseTimer for the QDeadlineTimers in QTest::qWait*
QDeadlineTimer will eventually support CLOCK_MONOTONIC_COARSE on Linux,
so let's be safe before that change appears.

Change-Id: I9b423f1b71194205b27afffd14a383a7e9f66a9d
Reviewed-by: Stéphane Fabry, Cutesoft <stephane.fabry@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-15 19:04:21 +00:00
Giuseppe D'Angelo
1b488d8b49 Streamline #include <type_traits>
It's included by qglobal.h, so we get it for free in other headers.

Change-Id: I90072156e313271a5354a39cbf78a83a6885c431
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-31 08:24:03 +00:00
Liang Qi
246799d8a7 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	examples/network/network-chat/peermanager.cpp
	src/widgets/util/qsystemtrayicon.cpp
	src/widgets/util/qsystemtrayicon_qpa.cpp
	src/widgets/util/qsystemtrayicon_win.cpp
	src/widgets/util/qsystemtrayicon_x11.cpp

Change-Id: I1c026df83818c0ccaf956980370e7522960627db
2017-01-30 12:46:20 +01:00
Alexander Volkov
30d0e1770c Use std::enable_if instead of QEnableIf
Change-Id: Ideca8283141484cb6da47c50333f5c96e416f082
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-27 10:30:31 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Allan Sandfeld Jensen
374a173d14 Improve QTest::qWait() precision and switch to QDeadlineTimer
Do not wait up to the timeout ms after already having waited several
times. At the same time upgrade to using the QDeadlineTimer which
is designed for this purpose.

Change-Id: Iaf5e4f4655605d5143ce91040c6eb6706752e504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-25 16:40:57 +00:00
Tasuku Suzuki
64e977cfac Fix build without features.temporaryfile
Change-Id: I3f26f122a20aa8e59baaf3f33b89cc776865ff8b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-25 04:54:58 +00:00
Liang Qi
00935bf8c2 Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm

Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
2017-01-14 22:02:55 +01:00
Kimmo Ollila
01cade5050 Fix build for INTEGRITY
Change-Id: I2c41295688e962eb263f2180bebfd1dd37613804
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-01-13 07:52:16 +00:00
Alexander Volkov
dcec1420ea Use QString::asprintf(), QStringBuilder, and the multi-arg overload of QString::arg()
... instead of sequential .arg(const QString &) callings.
It saves memory allocations and prevents unexpected results
if replacing strings contain place markers.
Found with clazy's qstring-arg check.

Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-12 17:54:28 +00:00
Ulf Hermann
cb1a4d8e06 Testlib: Exclude qtest_network.h when building without Qt Network
Change-Id: If085684ed5252a01a682222510f6849be974feea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-01-10 16:52:41 +00:00
Marc Mutz
b2173b54ef Long live QTest::addRow()!
This new function does the same as newRow(), except that it has a less confusing
name (in line with _add_Column()), and accepts printf-style arguments to avoid
the need to newRow(qPrintable(QString::asprintf())), a common pattern in client
code. It uses qvsnprintf() under the hoods, avoiding the need for the QString
const char* round-trip.

Port all in-tree users of newRow(qPrintable(QString::asnprintf())) to the new
function.

Change-Id: Icd5de9b7ea4f6759d98080ec30f5aecadb8bec39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 07:47:26 +00:00
Kai Koehne
04b095b24b Doc: Properly mention valgrind & callgrind
Julian Seward is the author mentioned in valgrind_p.h.
Also call the whole thing valgrind, since callgrind
is part of valgrind.

Change-Id: Iaf5958c520b919c1acf93ce368b0839bd06ccd46
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-01-05 11:18:43 +00:00
Tor Arne Vestbø
2debae1600 Use closest QWindow when waiting for a widget to become active/exposed
A child widget without a native handle would previously not be treated as
exposed or active, even if the closest QWindow actually was, resulting
in qWaitFor returning false and QVERIFY failing.

Change-Id: I9df41cbac7aeab63bfa59d8ac77880591393c085
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-17 14:26:21 +00:00
Peter Varga
8325808dcf QTestLib: Add timestamp to mouse click events
Timestamp is necessary for testing custom mouse event handlers e.g. what
Qt WebEngine uses for handling triple and quadruple mouse clicks.

Based on commit 181ee8f9ff

Task-number: QTBUG-56223
Change-Id: I2bf840f326255333eec83ca8c42f087cb7deb1fb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-12-16 19:18:07 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Tor Arne Vestbø
aec85a53df Disable core dumps for selftests that are meant to be crashing
Task-number: QTBUG-55155
Change-Id: I26a1461f35f916f3980fcb18cdddf3502e22fc90
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-12-08 23:50:44 +00:00
Kevin Funk
6ff4d8c61a QTest::addColumn: Use nullptr instead of 0
Fixes -Wzero-as-null-pointer-constant warning in user code

Change-Id: I59492633d14947e90e91efa7c4fcd14c33fa413e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-06 15:32:00 +00:00
Alexander Volkov
ed6f129026 QtTest: Add missing override
Change-Id: Ibb924f11b82577fb67aa7a1a30b81f4d8d7d36fc
Reviewed-by: hjk <hjk@qt.io>
2016-12-01 12:07:05 +00:00
Jesus Fernandez
4a7f3c327b Doc: Fix QVariant::Type
QVariant::QString does not exist

Task-number: QTBUG-56586
Change-Id: Ic5fe81fc4fc3553f9b755e067ed73c4d1bba9add
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-30 17:04:08 +00:00
Thiago Macieira
40c9e9dc5f Add a macros for disabling deprecated declaration warnings
This is the only warning we disable in a lot of places in Qt 5.8 source
code. If other warnings become common, we can add macros for them too.

Change-Id: Iaeecaffe26af4535b416fffd1489d1968e29c52a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-27 02:31:12 +00:00
Kai Koehne
a5cf8d76c2 Remove second mentioning of cycle.h 3rdparty license
This is now documented in the qt_attribution.json file added in commit
41a7d74385 .

Change-Id: I4f13397a14de7d9f98ba146cabf64dafac5dada4
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-23 09:35:58 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Kai Koehne
ed7f77071d Replace custom type traits with std one's
Remove most type traits from qtypetraits.h, but keep the custom
implementation of is_signed/is_unsigned. This gets rid of
BSD-3 licensed code from Google in a public header (hugh!).

The custom implementations for is_signed/is_unsigned are kept
because the implementations in gcc's standard headers do not
work as we expect for enums - both is_signed and is_unsigned
always returns false there - see also
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027

[ChangeLog][QtCore][General] Qt now relies on type traits from
the C++ standard library.

Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-08 15:31:17 +00:00
Tor Arne Vestbø
e79ceb9734 Merge remote-tracking branch 'gerrit/5.8' into dev
Change-Id: Ib31cae9b57f6fb078739c409162bf2987eb430ad
2016-11-05 01:53:17 +01:00
Kai Koehne
02167870c3 Use new "Files" property in testlib 3rdparty documentation
Change-Id: I4ecef274f4afe0b1a25502fb64b2213a7bdb2853
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-04 15:20:12 +00:00
Liang Qi
d7e4980132 Merge remote-tracking branch 'origin/5.8' into dev
Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS.

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/sdk.prf
	src/angle/src/libEGL/libEGL.pro
	src/platformsupport/fontdatabases/fontdatabases.pro
	src/platformsupport/platformsupport.pro
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	tests/auto/widgets/widgets/qmenubar/BLACKLIST
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Task-number: QTBUG-56853
Change-Id: If58785210feee3550892fc7768cce90e75a2416c
2016-11-02 09:24:11 +01:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
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
2016-11-01 06:02:55 +01:00
Friedemann Kleint
f939e7ea73 Testlib: Move classes inheriting QBenchmarkMeasurerBase to separate header
QBenchmarkTimeMeasurer uses the 3rd party header cycle_p.h which may
include windows.h on Windows (32bit). This can cause clashes in qmltest,
which uses QBenchmarkMeasurerBase. Move the derived classes to a separate
header to prevent this.

Change-Id: I943a11c32a575594e6e79e722e8809b42de35092
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-19 06:21:51 +00:00
Liang Qi
d90b155c60 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/testlib/qtestcase.qdoc

Change-Id: Icefa63056ffb37106f35299a8f19165535571799
2016-10-17 11:02:54 +02:00
Albert Astals Cid
adbafab4ef Specify timeout is in milliseconds
Change-Id: I465b343b6fe64c8d1ce17e34be5f864e8556d374
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-14 10:34:01 +00:00
Liang Qi
dfc177e3a9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	qmake/library/qmakeevaluator.cpp
	(cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools)
	src/corelib/kernel/qcore_mac_objc.mm
	src/gui/painting/qcolor.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
2016-10-13 09:49:38 +02:00
Liang Qi
ef25620ac1 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/features/qpa/genericunixfontdatabase.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/corelib/io/qiodevice.cpp

Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
2016-10-06 20:12:27 +02:00
Liang Qi
3e949b75fd Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	qtbase.pro

Change-Id: I65b5ebca4942a4f295bdd4ac1568e5c347333aea
2016-10-01 22:15:55 +02:00
Marc Mutz
c35eff2ace Add qtest_network.h
... and move toString() implementations there which were repeated in
network tests, or #ifdef'ed in qtest.h.

Since the functions moved from network tests are now in a public header,
had to massage them a bit to pass headersclean:

- replace Q_FOREACH with C++11 range-for
- avoid implicit conversion from QByteArray -> const char* (done by
  re-using toString(QByteArray) instead of calling strdup() manually)

Also made the functions overloads instead of specializations. This
allows to pass the enum by value instead of by const-&.

Like the existing QHostAddress, the newly-added toString() overloads are
marked as \internal. We can decide later whether to turn them into
public API.

Change-Id: I8c23db7a0a6575273567017d42d7b2a957acece8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-09-29 21:46:19 +00:00
Marc Mutz
3f652d578d QtTest: don't use double-underhanded identifiers
Identifiers that match _[A-Z_]* are reserved for use by std
implementations. Qt is not an implementation of the standard,
so it mustn't use such identifiers.

Use plain names for macro arguments and the qt_test_ prefix
for C++ variables declared in expansions of those macros.

Change-Id: I22be167e36676199a5b084df3f4c5ef86c89f000
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-29 13:28:31 +00:00
Liang Qi
06bd93c4ac Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/plugins/platforms/ios/qiosmessagedialog.mm

Change-Id: Icfbf55c3215ec088e552d0b42a5c94d04b17c65f
2016-09-26 21:43:25 +02:00
Kai Koehne
41a7d74385 Document 3rd party source that is part of Qt Test
Change-Id: I8f324e23909232ee80a8d123fba35f5a6fecfaac
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-09-26 07:07:13 +00:00
Erik Verbruggen
3982e710cb QTest: add debugger detection for macOS
Which, in Mach speak, is an exception handler for the process. Also
check if the crash reporter is in a mode that will show a dialog for
any crashed process. If so, leave it to that crash reporter to do stack
traces.

This patch has the nice side-effect that a crashing test won't have both
a debugger and CrashReporter generate stack traces.

You can check the settings for CrashReporter on macOS with the command:

    defaults read com.apple.CrashReporter DialogType

If it is set to 'basic' or 'developer' or 'crashreport', CrashReporter
will show the dialog. If set to 'server' it won't. Any unattended system
should have it set to 'server' (which will have QTest invoke lldb to
generate stack traces):

    defaults write com.apple.CrashReporter DialogType server

Change-Id: I39153e44cff15c00341857f178b1dcfab154f8ee
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-09-19 08:13:27 +00:00
Maurice Kalinowski
aa624a768c winrt: Differentiate between windows and winrt
While there are similarities, we want to keep control over those tests
which affect only one platform.

Change-Id: Id1f6eb9954169148d70cea14969f34f21d1e6690
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-09-07 04:54:22 +00:00
Anton Kudryavtsev
6dbb16a856 Replace QLatin1Literal with QLatin1String
QLatin1Literal is just alias of QLatin1String
for Qt4 compatibility.
So it's style cleanup patch.

Change-Id: Ia3b3e5dc3169f13a1ef819d69be576b8a8bfb258
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-09-03 18:55:56 +00:00
Marc Mutz
bb7e3e2dd7 QTest: allow to mark QFETCH variables const
[ChangeLog][QtTest] QFETCH variables can now be declared const (QFETCH(const T, name)).

Change-Id: I7cc1e4568d7082f27f90d8b5abf53ffafb1c48c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-01 04:41:46 +00:00
Liang Qi
1cc571593a Merge remote-tracking branch 'origin/5.7' into 5.8
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.

defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.

DirectWrite: Fix advances being scaled to 0

Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.

Conflicts:
	configure
	mkspecs/features/uikit/device_destinations.sh
	mkspecs/features/uikit/xcodebuild.mk
	src/corelib/global/qglobal.cpp
	src/corelib/global/qnamespace.qdoc
	src/plugins/platforms/cocoa/qcocoamenuitem.h
	src/plugins/platforms/windows/qwindowsservices.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
	src/widgets/kernel/qapplication.cpp
	tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
	tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp

Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
2016-08-29 15:30:17 +02:00
Liang Qi
2111bf00fe Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I4f4ab05b2de67cd4b1d29b294b96a8c9ffb964b2
2016-08-22 21:58:45 +02:00
Venugopal Shivashankar
4f63051eec Doc: Remove references to Windows CE in Qt Test docs
The platform is not supported since Qt 5.7

Task-number: QTBUG-55331
Change-Id: If6202b347efdfb38eba4c4c3a65dde515d066112
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-22 11:10:15 +00:00
Oswald Buddenhagen
d314819fc0 Merge dev into 5.8
Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
2016-08-22 11:30:01 +02:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Allan Sandfeld Jensen
9f888d2fde Support C++17 fallthrough attribute
Replaces our mix of comments for annotating intended absence of break
in switches with the C++17 attribute [[fallthrough]], or its earlier
a clang extension counterpart.

Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-19 18:38:53 +00:00
Morten Johan Sørvig
960a1e3bf3 QTestLib: Disable window state restore on macOS
For test runs we want to start with a clean slate
and ignore previously saved window state.

This also prevents the “previous restore failed” dialog
from from showing and blocking the test run.

Change-Id: I8e5b87a903cf1d937d628c2b062f917c4c37f176
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-18 08:46:25 +00:00
Friedemann Kleint
60a695ab5e Fix qdoc warnings
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>
2016-08-17 13:18:26 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Shawn Rutledge
d04982dc84 QTest::QTouchEventSequence: add a sleep before each touch movement
In any code (such as QtQuick Flickable) which calculates velocity as
distance / time, it's unrealistic to simulate instantaneous touchpoint
movements.  So, force a slight delay before each event, so that
the touchpoint can only move very fast, but not infinitely fast.
We use qSleep() rather than qWait() because qWait() has a minimum
qSleep(10), and also processes events.  commit() also conditionally
calls processEvents(), and we don't want to make that unconditional.

Change-Id: I3cee890f8951d7ecb8837a6abe216c5a8e0a6e34
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-08-12 19:03:33 +00:00
Topi Reinio
a2ae631c04 Doc: Change instances of '(Mac) OS X' to 'macOS'
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.

Update the instructions on mac-specific Q_OS_* macro usage.

Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.

Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-08-12 08:30:29 +00:00
Liang Qi
8ba384a564 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
2016-08-10 17:43:13 +02:00
Simon Hausmann
4e6440acf8 Improve reliability of callgrind benchmark results
When running under callgrind, do not bother with the use of the watchdog. The
constructor waits for the thread to start, which adds an overall run-time cost
that depends on the OS scheduling.

Change-Id: I162e2e311c43a6892ebc67dea39899e40babb61d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-08-05 14:25:58 +00:00
Edward Welbourne
f6fc34294f Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
2016-08-01 18:20:00 +02:00
Edward Welbourne
6c5de416c9 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery.  Made its addition to the other's.

	src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has.  Discarded the #undef part.

	src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.

	src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.

Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
2016-07-26 10:43:29 +02:00
Mitch Curtis
b828c94eac Document that -nocrashhandler enables debugging of crashes
It's not clear why an assertion triggered while running a test can't be
debugged, while the same assertion triggered while running an
application can.

Even though this documentation might still not be the place people will
look, hopefully having the terms "debugging crashes" here will make
it more visible in search results.

Task-number: QTBUG-54779
Change-Id: I151b04380df57126259d3d7797957a548eb6cd55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-20 07:32:49 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	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
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Anton Kudryavtsev
2788fccd29 Use QStringLiteral more judiciously
Replace it with QL1S in QStringBuilder expressions
and in overloaded functions.

Replace patterns 'QString::number() + QStringLiteral'
and 'QStringLiteral + QString::number()' with
QString::asprintf.

Saves some text size.

Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-08 06:43:02 +00:00
Friedemann Kleint
14c6f80f4b Testlib: Replace QString::arg() formatting by snprintf()
Formatting of values needs to be fast since QTestlib always
pessimistically formats the values passed to QCOMPARE even if
they match.
Speeds up tst_qrect by factor 1.5..2.

Task-number: QTBUG-38890
Change-Id: I3627db77a305a46c1d51a14c04b88db8018faa60
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-08 05:06:32 +00:00
Friedemann Kleint
e7d4760314 Testlib: Format QRegion in QCOMPARE
Output regions as a compact list of rectangles:
QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)

Change-Id: I62e42bd30897a1d31b28e0cbd6afe7fa8ecf2664
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-05 18:49:19 +00:00
Shawn Rutledge
e5ddc9b32a doc: add docs for QTest::createTouchDevice()
Task-number: QTBUG-44030
Change-Id: I4bb6a0d0a257cf94883895baebafba70d0cf0f58
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-06-15 11:27:00 +00:00
Liang Qi
511790fd1a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	mkspecs/features/uikit/sdk.prf
	src/corelib/global/qhooks.cpp
	src/corelib/io/qfilesystemwatcher.cpp
	src/corelib/io/qlockfile_unix.cpp
	src/corelib/tools/qalgorithms.h
	src/gui/kernel/qwindowsysteminterface.h
	src/gui/text/qtextdocument_p.cpp
	src/network/access/access.pri
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/src.pro
	src/testlib/qtestcase.cpp
	src/widgets/kernel/qwidgetbackingstore_p.h
	src/widgets/styles/qwindowscestyle.cpp
	src/widgets/styles/qwindowsmobilestyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
2016-06-13 12:46:46 +02:00
Shawn Rutledge
04e224b19a add QTest::createTouchDevice()
This enables creation of autotests which use touch events, without using
private API.

Task-number: QTBUG-44030
Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-10 13:08:00 +00:00
Liang Qi
57057f76ad Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	.qmake.conf
	config.tests/unix/nis/nis.cpp
	mkspecs/unsupported/freebsd-g++/qplatformdefs.h
	src/corelib/tools/qdatetime.cpp
	src/corelib/tools/qsimd.cpp
	src/corelib/tools/qsimd_p.h
	src/network/access/access.pri
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/network/access/qnetworkreplynsurlconnectionimpl_p.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/printsupport/windows/qwindowsprintdevice.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST
	tests/auto/widgets/widgets/qopenglwidget/BLACKLIST

Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
2016-06-06 09:04:55 +02:00
Leena Miettinen
c2d4c3588c Doc: Fix examples install path
The example directory name for Qt Test module is qtestlib.
Without this change, Qt Creator cannot find the tutorial
files and tags them "broken" in the Welcome mode.

Change-Id: Ib2de0cd2263aa1651abb697f9f03ecd8eb871ca2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-06-03 10:40:47 +00:00
Edward Welbourne
28db26f691 qtestcase: Fix buffer over-run, '\0' appended beyond buffer end
Noticed by Coverity (CID 161673).  If the file being read contains
enough to fill the buffer, read() shall do that and return the nbytes
it was passed; as this was the size of the buffer, subsequently
writing a '\0' at this index in buffer is out of bounds.  Fortunately,
/proc/self/status is typically < 1k so fits well inside the 2k buffer.
All the same, we can safely pass sizeof(buffer) - 1 as nbytes and *be
sure* of not getting a buffer over-run.

Change-Id: Ib620a330fbc94f0579c953737f7c4417ca449968
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-05-31 11:37:01 +00:00
Edward Welbourne
b057fdbb12 Improve documentation of BLACKLIST file format.
In particular, make sure the word BLACKLIST appears in it so it can
actually be *found*.  Mention the comment format, mention version
suffixes, mention negation; expand and clarify the description.
Break it up into paragraphs for ease of reading.

Corrected the example to use osx, not its old platform name.  Gave it
a comment that I wish I'd found in the BLACKLIST file that obliged me
to come looking for this in the first place.  Illustrated the use of
comments to document reasons for ignoring tests.

Change-Id: I78d49b4706c0f70b714f7a410f850fb42ebb77c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-05-25 11:17:28 +00:00
Edward Welbourne
6f59926e67 qtestblacklist: check against duplicating versioned distro
Also check the version is non-empty.
Probably makes no difference, but it's obviously more correct.

Change-Id: I05eee5623ac432d2ea02f7aad874513beeb2ceeb
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-25 11:17:16 +00:00
Edward Welbourne
832715a679 qtestblacklist: only generate the distro and version once
We were looking up distro and version, in order to conditionally add
them to keywords if missing, on every keyword line of each BLACKLIST
that we parsed.  In particular, this meant the static holding the list
of keywords couldn't be const.  Move the distro-handling to an
intemediary function that adds to the raw keywords and supplies
one-off initialization for the list of conditions to match.

Change-Id: Ia383ec060e24b7f72d2c8fd6ae65816318daafd0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-25 11:17:08 +00:00
Allan Sandfeld Jensen
459933708a Do an actual toString conversion for QVariant test failures
A cast is not a conversion. If the value is not already a string type
we are just getting an empty string for all metatypes that can be
converted to string.

Change-Id: I4643cc9fd509c21568fdc2133403c3ed8cb38a10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-05-24 17:11:37 +00:00
Erik Verbruggen
1af802a9a6 QTest: do not generate stack traces when a debugger is attached.
Just leave it to the attached debugger to do it.

Change-Id: I65f2676cccec2a074ea31cb8739e1b3fb626a5da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-05-24 10:23:21 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Mike Krus
03e9c6f4a6 Add support for Apple tvOS
Pass -xplatform macx-tvos-clang to configure to build.
Builds device and simulator by default.

Added ‘uikit’ platform with the common setup.
Also added QT_PLATFORM_UIKIT define (undocumented).
qmake config defines tvos (but not ios).

tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be
embedded in the binary. A new ‘bitcode’ configuration was added.
For ReleaseDevice builds (which get archived and push to the store),
bitcode is actually embedded (-fembed-bitcode passed to clang). For all
other configurations, only using bitcode markers to keep file size
down (-fembed-bitcode-marker).

Build disables Widgets in qtbase, and qtscript (unsupported,
would require fixes to JavaScriptCore source code).

Qpa same as on iOS but disables device orientation, status bar, clipboard,
menus, dialogs which are not supported on tvOS.

Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-05-17 16:11:23 +00:00
Marc Mutz
7248e97669 QtConcurrent/QtOpenGL(Extensions)/QtPrintSupport/QtTestLib/QtXml: add QT_NO_FOREACH
Mark these libraries as what they are: Q_FOREACH-free,
using QT_NO_FOREACH.

Change-Id: I2a567d9fe67e15e9b6f0784525810b553dc50e1f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-12 21:42:10 +00:00
Topi Reinio
72e3fcce38 Doc: Remove repository name from examplesinstallpath
Examples in binary packages now directly match the install path.

Change-Id: Ic1487bc766cfd3b0a0a340cc4ae4ba49d953eaa6
Task-number: QTBUG-52953
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-12 12:15:52 +00:00
Liang Qi
990969655c Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	src/corelib/io/qprocess_wince.cpp
	src/plugins/platforms/windows/qwindowstheme.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qtimezone/BLACKLIST
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
2016-05-12 08:33:08 +02:00
Thiago Macieira
194a56ea79 QTest: Fix printing of values of Q_ENUMs
QMetaEnum::key(n) returns the n-th key, which is not necessarily the one
of value n. For the key of value n, we want QMetaEnum::valueToKey(n).

Change-Id: Ic90fe6b1cbe84978a02fffff141bf4a06074917a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-05-08 08:57:16 +00:00
Giuseppe D'Angelo
3489ab60a9 QTestLib: support explicit bool conversions in QVERIFY
[ChangeLog][QTestLib] It is now possible to use variables of
types with an explicit operator bool in the QVERIFY macro.

Change-Id: I2685df164a616f6a065d689867daa9ea1de78e08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-04 11:29:08 +00:00
Liang Qi
6357813207 Merge remote-tracking branch 'origin/5.7' into dev
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
2016-05-03 15:49:15 +02:00
Mitch Curtis
155533e059 Fix grammar in QSKIP documentation
Change-Id: Ia57dd2c859ae5b025515c45593a7f89a1b7f28ff
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-05-03 10:46:35 +00:00
Liang Qi
b894a8def5 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	mkspecs/features/qt_common.prf
	src/gui/text/qzip.cpp
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/windows/array.h
	src/testlib/qtestcase.cpp
	src/widgets/dialogs/qfilesystemmodel.h

Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
2016-04-29 17:55:20 +02:00
Liang Qi
2e9fc0d3f0 testlib: added env QTEST_FUNCTION_TIMEOUT for single test function timeout
This is a regression with 5.5, it causes some customer test functions
crash. d3d10cf2 introduced the 5 minutes timeout. The timeout could be
changed after this.

Task-number: QTBUG-52402
Change-Id: I8940bbde5004b4d888732b551274f079ddf20563
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-04-27 06:07:16 +00:00
Friedemann Kleint
5469d70418 Fix some qdoc-warnings in 5.7.
qtbase/src/corelib/global/qnamespace.qdoc:101: warning: Undocumented enum item 'AA_SynthesizeMouseForUnhandledTabletEvents' in Qt::ApplicationAttribute
qtbase/src/corelib/global/qnamespace.qdoc:2554: warning: Undocumented enum item 'ImAnchorRectangle' in Qt::InputMethodQuery
qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: Can't link to 'Q_COMPILER_DELEGATING_CONSTRUCTORS'
qtbase/src/gui/image/qiconloader.cpp:160: warning: Cannot find 'QIconCacheGtkReader' specified with '\class' in any header file
qtbase/src/gui/painting/qpaintengine_raster.cpp:1382: warning: No documentation for 'QRasterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)'
qtbase/src/testlib/qtest.h:176: warning: No documentation for 'QTest::toString(const QHostAddress &addr)'
qtbase/src/testlib/qtest_gui.h:77: warning: No documentation for 'QTest::toString(const QColor &color)'

Change-Id: If9ac0807accf2530ec7fc2ca7db71a110f9f79bb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-13 08:06:27 +00:00
Liang Qi
b94773c9c8 Merge remote-tracking branch 'origin/5.6' into 5.7
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
2016-04-13 06:55:37 +02:00
Friedemann Kleint
e108db5a9a QTestlib: Document newly added enumeration value KeyAction:Shortcut.
Amends change 0e342fce4c, fixing
a qdoc warning:
qtbase/src/testlib/qtestcase.qdoc:524: warning: Undocumented enum item 'Shortcut' in QTest::KeyAction

Change-Id: I7a7116bd5ff160c4a13f2fb0f9512f0d71385a4b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-11 13:19:31 +00:00
Frederik Gladhorn
161fbfda70 Improve gdb backtrace handling
Long backtraces would get cut off in the terminal, this is especially
bothersome when having lots of threads.
Make sure that the output is complet by setting height=0 for gdb.

The gdb manual states:
"If you specify a height of either unlimited or zero lines, gdb does not
pause during output no matter how long the output is. This is useful if
output is to a file or to an editor buffer."

Change-Id: I282054bc9e205d67d3076e37d5c928475803b22d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-04-08 10:32:11 +00:00
Marc Mutz
1ed8a7bff5 QTest: support nullptr in QCOMPARE
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>
2016-04-08 05:38:33 +00:00
Friedemann Kleint
8104729e63 QtTest: Remove Windows CE.
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library
and tests.

Task-number: QTBUG-51673
Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-06 10:56:02 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Jani Heikkinen
cd46a2daf5 Unify license header usage.
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>
2016-03-29 10:20:03 +00:00
Liang Qi
a02863234d Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
2016-03-22 07:28:42 +01:00
Liang Qi
6cb8121a44 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	tests/auto/corelib/io/qtextstream/test/test.pro
	tests/auto/corelib/plugin/plugin.pro

Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
2016-03-21 09:02:57 +01:00
Stephen Kelly
6ec89bec0a Fix QFINDTESTDATA when using cmake ninja generator
The Qt CI does not have ninja, but the autotest can be used for manual
regression finding.

 cd qtbase/tests/auto/cmake
 qmake
 make check
 cd build
 cmake . -DHAVE_NINJA=ON
 ctest -R FINDTESTDATA

Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2016-03-19 13:44:21 +00:00
Friedemann Kleint
74c202f913 QtTest: Add formatting for QColor.
When a QCOMPARE of values of type QColor fails, their
name will now be printed.

Task-number: QTBUG-51124
Change-Id: I76565daa338f038ea4f452e47705e638d94eaeee
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-03-17 15:35:05 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Marc Mutz
bc087db590 QtTest: fix UB in QSpontaneKeyEvent::setSpontaneous()
Found by UBSan:

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc33019650 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc33019650: note: object is of type 'QMouseEvent'
  83 2b 00 00  98 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  02 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QMouseEvent'

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc330196e0 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc330196e0: note: object is of type 'QKeyEvent'
  00 00 00 00  f8 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  07 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QKeyEvent'

Fix by providing setSpontaneous() on QEvent as a private function and
befriending QSpontaneKeyEvent. Make setSpontaneous() always-inline to
avoid BiC between 5.6.0 and 5.6.1.

Change-Id: Ic60d82ed6a858f4f13f41fa3d2d1db6e808896b7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-07 16:13:33 +00:00
Milian Wolff
954bd06bc5 Use local result metric instead of global result metric.
This is required for a follow-up commit which adds support for reporting
multiple results in a single benchmark interation.

Change-Id: I8dd7f37ce046cc0f9556be5d0df76f84b82ec1a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-03 09:56:08 +00:00
Milian Wolff
fe04aba46d Enable support for ref-cycles perf counter in QtTestLib.
The ref-cycles counter corresponds to the monotonic timestamp counter
that can be read using the RDTSC assembler instruction. Using it
instead of the default cycles counter is useful as it removes the
effect of dynamic frequency scaling on the measurement.

[ChangeLog][QtTest] The ref-cycles perf counter can now be used.

Change-Id: Id7d56576db362706c20f9a399e5acea35ee799f2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-03 09:55:22 +00:00
Marc Mutz
be84480785 QtTest: eradicate all Q_FOREACH loops
... by replacing them with C++11 ramge-for loops.

In one case, I took the liberty to remove a useless
if(isEmpty()) check around a for loop. Now that we
don't use Q_FOREACH anymore, we don't incur the copy
for empty containers anymore. Left the indention of
the loop level to avoid code churn.

Saves 1.8KiB in text size on optimized GCC 5.3 Linux
AMD64 builds.

Change-Id: I1b1fb34847f6a631f0d580fd5261c7f5fed8475c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-29 07:57:51 +00:00
Allan Sandfeld Jensen
3126fa227b Improve QCOMPARE output of char comparisons
Make actual and expected values of char tests more useful by using
C syntax. This means we can actually read non-printable characters.

Task-number: QTBUG-51294
Change-Id: I031e15916a2882c0499b6217ae1649d4eea09eb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-25 09:45:30 +00:00
Liang Qi
4fe2fbcf82 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 018e670a26.

The change was introduced in 5.6. After the refactoring, 14960f52,
in 5.7 branch and a merge, it is not needed any more.

Conflicts:
	.qmake.conf
	src/corelib/io/qstandardpaths_mac.mm
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp

Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
2016-02-18 20:50:35 +01:00
Tor Arne Vestbø
4a7ccf74ff Disable XCTest support in QtTestLib
In recent Xcode versions it doesn't work as expected, and caused build
failures in downstream modules, so we disable it until the cause can
be investigated further.

Change-Id: Ie54c7256a10d73610ec7e481b9d665b75e396365
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-17 13:12:56 +00:00