summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Adapt the QSsl* tests to use the resource systemMårten Nordheim2017-11-309-173/+319
| | | | | | | | This lets the tests run on devices which previously did not have access to the files used (WinRT, mobile devices). Change-Id: Ibdd85862eee6ab1a7d4da87ca321ee9bc9880bfa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Thiago Macieira2017-11-30129-713/+1669
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-23129-713/+1669
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-0/+53
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects) on RHEL 6.6 in CI. Conflicts: tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Task-number: QTBUG-64569 Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
| | | * tst_QNetworkReply: Blacklist putToFtp for WindowsFriedemann Kleint2017-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62860 Change-Id: I9cea1414ae3761284f5ac9fab9d0db03c239b65f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * qsslsocket_mac: handle 'OrLater' SslProtocols in verifySessionProtocol()Mikkel Krautz2017-11-151-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The verifySessionProtocol() method in the SecureTransport backend did not properly handle TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater. This commit teaches verifySessionProtocol() about them. It also adds TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater to the protocolServerSide() test in tst_qsslsocket. Backport from 5.10 to 5.9 (LTS). Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 9c765522d1c4f8090b5f5d391b1740fc4bd67664) Change-Id: I58c53bdf43e0f19b4506f3696d793f657eb4dc6f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QAbstractButton: don't clear 'pressed' flag unless left button is releasedRichard Moe Gustavsen2017-11-151-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it stood, we would set 'pressed' to false regardless of which button that was released. This would end up wrong if pressing the left button, and at the same time, did a click with the right button. This would clear the flag prematurely, and cause a release signal not to be emitted when later releasing the left button. tst_QAbstractButton: adding autotest Adding tests to simulate the bug report's cases: 1) left press button 2) click right/middle key 3) move mouse out of button's boundary 4) test if the released() signal triggered properly Taks-number: QTBUG-53244 Change-Id: Ifc0d5f52a917ac9cd2df5e86c0475abcda47e425 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * OCI: Match the constraints on the index_name columnAndy Shaw2017-11-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When looking for the primary index, it is possible that the constraint_name in the all_ind_columns table does not match that of the index_name. Whereas the index_name will match in this case, so the query should set the where clause on the index_name in both tables. Task-number: QTBUG-64427 Change-Id: I1bf1fb580e620b9f75f2fde1ecf408842e377365 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-3/+3
| | |\| | | | | | | | | | | | | Change-Id: I2f8f6b1d196548087219739faa3ad1517626da1e
| | | * tst_qnetworkreply::getFromUnreachableIp - fix win64 alsoTimur Pocheptsov2017-11-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looking at the failures in grafana it appears this test is also failing on Windows 64. The same fix applies then, and we use Q_OS_WIN now. Change-Id: Iafcfd6d1e747f3c816878cad072fbfae3aee19ca Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | test: blacklist ↵Liang Qi2017-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QNetworkAccessManager_And_QProgressDialog::downloadCheck(with-zeroCopy) on Windows. Task-number: QTBUG-64471 Change-Id: I8ec7e86b7734eda606c5a5bf07bd39ed4bb91336 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * | test: blacklist tst_QWidget::multipleToplevelFocusCheck()Liang Qi2017-11-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on all Linux. This amends 3bbeb1e9dce958ddba54f6b102bb409a63c9f889. Task-number: QTBUG-64446 Change-Id: I24ca5b881502fac41922e07908801eefee7f31d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Tony Sarajärvi2017-11-1272-382/+484
| | |\ \ | | | | | | | | | | | | | | | refs/staging/5.10
| | | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-0972-382/+484
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | * Fix tst_QFile::openDirectory for systems using builtin test dataOliver Wolff2017-11-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To obtain "proper" directory behavior, we have to check against the extracted "resources" directory instead of its qrc counterpart. Change-Id: I4996ba74419945f78d356ad953a5b826ff663687 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | | | * Fix tst_QFile::handle for systems using builtin test dataOliver Wolff2017-11-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To obtain the file's handle, we need to obtain it from the extracted test data instead of qrc. Change-Id: I89c5c3f3a7da7e36205a439581a6d83efffdc07c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * Fix tst_QFile::useQFileInAFileHandler for systems using resources for test dataOliver Wolff2017-11-091-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resource files are extracted to m_dataDir in tst_QFile::initTestCase. Instead of trying to access the file from the resource on systems that use qrc for bundling the test data, we have to use the files that were extracted at the beginning of the test. Change-Id: I35453fbdeb27e317d1342ff1cb7bbea9cebea14d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * qfile tests: Make sure files are writable before deleting themOliver Wolff2017-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms (like UWP) files that are copied during qfile auto tests are not writable by default. The cleanup will fail for these files if the permissions are not set accordingly. Change-Id: Id925dcadfc6b505c87f1f55d5ea05e286b60a5a5 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * Set correct datatype for column 'more_data' in PostgreSQLRobert Szefner2017-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63861 Change-Id: Ice9e788841046482bf5c4653eb859d00bc6b1c59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * tst_QNetworkReply::getFromUnreachableIp - fix a failing testTimur Pocheptsov2017-11-081-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch works around Windows X86 on QEMU antics. It appears on this platform the test behaves in some unpredictable manner: - WSAConnect with 255.255.255.255 does not always immediately fail with some error, so socket engine waits for a connection timeout (30 s.), but the test itself - only waits for 5 seconds and then tests that a request has finished with error, which is not true (we are still connecting). To make it work - whenever we have bearermanager feature enabled, set a connection timeout to something reasonable, not 30 s. Since we try to connect to each address twice, make timeout 1.5 s (so it's 3 s. in total and still is < 5 s.). Task-number: QTBUG-64264 Change-Id: I1d40c140667fca8402ec9344e66d313b6df54256 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * Extend blacklisting in qnetworkreplyFriedemann Kleint2017-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Blacklist ioHttpRedirectPostPut for Windows - Amend 84396a3f938453b81e6ecc73bd54ff6b08960e8f: Keys need to be on subsequent lines Task-number: QTBUG-62583 Change-Id: I6360ec7bd87de65a3294a0d22148f13579fcd292 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * qudpsocket.pro - fix dependenciesTimur Pocheptsov2017-11-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the problem found in QTcpSocket auto-test recently. While the failure on CI looks differently (apparently, server process starts but does not print anything), fixing the dependency does not hurt and at least fixes the 'make check' scenario. Change-Id: I8f29f3e492d22410533407a527f5fc8f664e7f5c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | | * tst_qxmlsimplereader::inputFromSocket - fix race condition(s)Timur Pocheptsov2017-11-061-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test was failing recently on Windows 7, mingw, x86. It's not failing now and attempts to reproduce the failure on CI's VM were unsuccessful. Anyway, just reading the code is enough to spot race-conditions: two threads are accessing two shared boolean variables without any protection. It's unclear if these races were the reason why the test was failing, but we fix them for good anyway. Also, a failure to start a thread or to start listening on a TCP socket is not treated as XML-related failure anymore and QSKIPped instead. Change-Id: I5115ce6c33cafc91485f8cf6e7e268d954976556 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * QHeaderView: Honor maximumSectionSize property during resizeSections()Christian Ehrlicher2017-11-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resizing a QTreeeView section with double click or resizeColumnToContents() does not respect the maximumSectionSize when the resize mode is Interactive or Fixed. Since the documentation of maximumSectionSize states that it should honor this property for those cases either the documentation or implementation is incorrect. This patch fixes the latter. Task-number: QTBUG-64036 Change-Id: Ic14c8e444d50b9c50a117efed19d0bca7ec1cf82 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * Run oraArrayBind() test only for Oracle DBMSRobert Szefner2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test contains Oracle specific queries and will fail for other DBMS. Currently it doesn't fail, because it is skipped for drivers that doesn't support BatchOperations and only QOCI supports batch operations. Change-Id: I8f1e7c7244726fa11c841023dec186553747a6b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * tst_QWidget::multipleToplevelFocusCheck(): Avoid overlappingFriedemann Kleint2017-11-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test showed flakyness on Linux. It has been observed that its windows overlap. Position the windows beside each other. Change-Id: I4ff1b9cafaf753a6844b3dfabb576a07f74b396a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | | | * tst_QNetworkReply: Blacklist ioHttpRedirectPolicy for LinuxFriedemann Kleint2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62583 Change-Id: I9723a465f1d36aec823ce3459fd03b9492a3b778 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * Extend blacklisting in qnetworkreplyTony Sarajärvi2017-11-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While removing insignificant flag in commit 38a0909d4ed39b49e0463bd780d20a82ea672d35 and blacklisting autotests that still failed, qtbase builds didn't verify VS2017. That broke qt5 builds which do build VS2017. Task-number: QTBUG-64264 Change-Id: I5fdfa5dac6192f449a05146a9a422e428a710c84 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | | | * QCocoaMenu: Attach menu items when updating the menubarGabriel de Dietrich2017-11-052-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of waiting for the menu delegate to update each item, we can attach an NSMenu to its NSMenuItem as soon as we update the current window's menubar. This is safe to do because we know that this is going to be the main menubar right after, so we're not orphaning any NSMenuItem from its NSMenu at the wrong moment. By doing this, we also ensure that all menus from the active menubar are reachable by the key-equivalent dispatching logic, even before we display the actual menu. This was shown in BigMenuCreator where, under the menubar's ASP and SAP menus, all A*S submenus would be disabled. Furthermore, on the same menus, SAP would show the same issue. Added test in Menurama as well. Change-Id: If6e7311072e6b53ad1cbced73623d1832aa0df8e Task-number: QTBUG-57076 Task-number: QTBUG-63712 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * testlib: start sharing common helper functionsGatis Paeglis2017-11-0454-274/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
| | | | * tests: skip tst_QMenuBar::check_cursorKeys* on UnityGatis Paeglis2017-11-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is flaky on Unity due to regression introduced by QTBUG-39362. Skip the test functions until QTBUG-39362 is resolved. These test functions do not fail on Gnome and KDE, so the functionality tested by check_cursorKeys* will be covered by other linux distributions in CI. Change-Id: Ifd1a7779a9728142424f4956dd6466c822ccde91 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | | * macOS: Blacklist ↵Friedemann Kleint2017-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QSequentialAnimationGroup::groupWithZeroDurationAnimations() Task-number: QTBUG-64109 Change-Id: Iebe5a07d108ba647baa74ded71b730c867bd1c41 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| | | | * tst_QNetworkReply: Blacklist ioHttpRedirectPostPut for LinuxFriedemann Kleint2017-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7db143bbd2e178e944f4cfc6c184850238f3bc8c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * QNativeSocketEngine/Win: fix getting the datagram destinationThiago Macieira2017-11-042-46/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like I never even tested this. There were two problems: 1) when we asked for the recvmsg and sendmsg functions, we used the wrong variable (socketDescriptor was still -1) 2) we extracted the destination addresses, but never set them in the QIpPacketHeader object The added tests confirm that this works on Windows, Linux, Darwin, FreeBSD. There also seems to be a problem, obtaining the destination address on an IPv4 socket with a dual-stack sender (I can reproduce that on FreeBSD, macOS and Windows, plus an old version of Linux). Task-number: QTBUG-63605 Change-Id: I638cf58bfa7b4e5fb386fffd14ea732bddbc0c42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * Skip d-bus tests also on armv7Sami Nurmenniemi2017-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both of the new toolchains (armv7 + arm64) have some problems with d-bus tests. Skip them until the toolchain has been fixed. Task-number: QTBUG-60263 Change-Id: Ic300f419635fb6b49b3ea7f48fa76c19088c88bd Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | | | * Disable window shortcuts if there is a window modal dialogElvis Angelaccio2017-11-041-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a window is blocked by a WindowModal dialog, it should not be possible to trigger window shortcuts on that window if it receives a WindowActivate event. This currently happens if the blocked window gets clicked, because the window becomes the active_window and then QApplication sends it a WindowActivate event (this doesn't happen with application modal dialogs). The correctWidgetContext() function calls QApplicationPrivate::tryModalHelper() only if the shortcut context is ApplicationShortcut. This patch makes it call even if the shortcut context is WindowShortcut. Change-Id: Iff87d85bcae603a6a24128e0cedfa9d33b6485fd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * tst_QNetworkReply::ioHttpRedirectPolicy - blacklist for b2qt 64bitTimur Pocheptsov2017-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test fails often and seems to be flaky. Task-number: QTBUG-62583 Change-Id: Id3af283c89e392634a7af6e11bd05775a4295798 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | | | * tst_QTcpSocket::suddenRemoteDisconnect - fix flakynessTimur Pocheptsov2017-10-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test starts two processes - server and client - and requires an external executable ('stressTest'). In .pro file we have SUBDIRS containing both 'test' (test itself) and 'stressTest' (client/server app), but there is no explicit dependency and as result we run the test before we build 'stressTest' thus failing to start those processes. This patch makes 'test' dependent on 'stressTest'. Task-number: QTBUG-36629 Change-Id: I286b08bcff86b9afc4bbee87a75e887527eaf5f2 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | | | * tst_QMenuBar: Port to QWindow-based mouse test APIFriedemann Kleint2017-10-292-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some helpers to convert the coordinates and change the code to use the QWindow-based mouse test API. Remove mouse presses on the second and third menu from task256322_highlight() since moving the mouse is sufficient to switch menus. Remove blacklisting/skipping of macOS and offscreen. Task-number: QTBUG-63988 Change-Id: If3e94170d11df369aec199d13d54d39382a78723 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | | | * tst_qnetworkreply: Replace insignificant_test with blacklistingFriedemann Kleint2017-10-293-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither the exit crash of QTBUG-21102 nor the Windows failure of QTBUG-24226 appear to be reproduceable. Add verbose error reporting to getErrors() and blacklist getErrors:ftp-host which has been found to fail with timeouts on Linux and ioHttpRedirectMultipartPost. Task-number: QTBUG-21102 Task-number: QTBUG-24226 Task-number: QTBUG-62860 Change-Id: I6b29f6184e83de8ffebf6ff0d80606512dca6419 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | test: blacklist tst_QWidget::multipleToplevelFocusCheck() and setToolTip()Liang Qi2017-11-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on Ubuntu_16_04 and openSUSE_42_3. Task-number: QTBUG-64446 Change-Id: If8fff2823f041428852822470a2f00157795558b Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * | | Blacklist tst_qstandardpaths::testFindExecutable for b2qt/arm64Sami Nurmenniemi2017-11-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-64404 Change-Id: Ie04cf67574c4eb8b8e5bdb78e8e30173042edab7 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * | | QRandomGenerator: add more of the std Random Engine APIThiago Macieira2017-11-111-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings us to almost parity with the C++11 Random Engine API requirements (see chapter 26.5.1.4 [rand.req.eng]). We don't implement the templated Sseq requirements because it would require moving the implementation details to the public API. And we don't implement the <iostreams> code because we don't want to. Change-Id: Icaa86fc7b54d4b368c0efffd14f05ff813ebd759 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | QRandomGenerator: add securelySeeded(), to ensure appropriate seedingThiago Macieira2017-11-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't document how many bytes one needs (it's 2496), it's difficult for the caller to provide just enough data in the seed sequence. Moreover, since std::mt19937 doesn't make it easy to provide the ideal size either, we can't actually write code that operates optimally given a quint32 range either -- we only provide it via std::seed_seq, which is inefficient. However, we can do it internally by passing QRandomGenerator to the std::mersenne_twister_engine constructor, as it's designed to work. Change-Id: Icaa86fc7b54d4b368c0efffd14f0613c10998321 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Change QRandomGenerator to have a deterministic modeThiago Macieira2017-11-111-81/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now only QRandomGenerator::system() will access the system-wide RNG, which we document to be cryptographically-safe and possibly backed by a true HWRNG. Everything else just wraps a Mersenne Twister. Change-Id: I0a103569c81b4711a649fffd14ec8cd3469425df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | QRandomGenerator: remove the per-thread bufferThiago Macieira2017-11-111-1/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we're adding a deterministic generator that inherently does not use syscalls, and people should really use that one by default, there is no point in optimizing the secure generator wrt syscalls. Besides, keeping the random data in memory for longer than needed is likely inadviseable. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ed0871117fe930 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-0837-172/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | tests: Make braces consistentJesus Fernandez2017-11-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the function brace policy consistent. Change-Id: Iaf1f05a63958f19927e9b1953da06f99a4eba644 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | Make QCOMPARE print QColor alpha values on failureMitch Curtis2017-11-036-151/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-3018-58/+596
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40