summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Do not mix QByteArray with QString in arithmeticEdward Welbourne2019-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLatin1String + QByteArray + QLatin1String + QString should not be supported. That the compiler let us get away with this is distressing. Exposed by Anton Kudryavtsev's workon extending QString's operator+ support. Change-Id: I0adfaa87e48335928acb680da49e9173639af614 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | manual tests: Fix buildFriedemann Kleint2019-03-072-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix QOverload<void>::of(), causing ../../../../include/QtCore/../../src/corelib/global/qglobal.h: In instantiation of ‘struct QConstOverload<void>’: Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args...) const) const Q_DECL_NOTHROW -> decltype(ptr) and add a missing .pro-file. Change-Id: I19597adc33f2323a9f7dea9ee5ce94546f0e8f12 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | Fix some warnings in manual testsFriedemann Kleint2019-03-073-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: gestures.cpp:46:16: warning: this statement may fall through [-Wimplicit-fallthrough=] gestures.cpp:47:5: note: here gestures.cpp:48:9: warning: this statement may fall through [-Wimplicit-fallthrough=] gestures.cpp:52:5: note: here main.cpp: In function 'QByteArray windowsVersionToString(QSysInfo::WinVersion)': main.cpp:40:12: warning: enumeration value 'WV_CE' not handled in switch [-Wswitch] ... main.cpp: In function 'QByteArray macVersionToString(QSysInfo::MacVersion)': main.cpp:68:12: warning: enumeration value 'MV_10_12' not handled in switch [-Wswitch] ... widget.cpp: In member function 'CustomItem* Widget::checkedItem() const': widget.cpp:238:12: warning: 'item' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: I434784e86d127e56b92663cb45eba7d60d8f8eaf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-03-063-38/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/http2/hpacktable_p.h Change-Id: Ie0c296667dfdebba84f4858056a1ac80c24ee7df
| * | | Hpack - fix the static lookupTimur Pocheptsov2019-03-041-36/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'accept' breaks the order, making the static table unsorted and thus std::lower_bound cannot find it and we always index it in a dynamic table. Also, make this static table accessible to auto-test. Plus fix some warnings quite annoyingly visible in qt-creator. Fixes: QTBUG-74161 Change-Id: I47410f2ef974ac92797c9804aa55cb5c36a436c4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | Fix build with -no-gui on macOSAlex Richardson2019-03-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some directories that depend on QtGui were being included without the appropriate check for qtHaveModule(gui). Change-Id: I7c348c74464d44cbd35a027f188f8a23bb2021d9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Deprecation-fix: don't use QDir::operator=(const QString &)Edward Welbourne2019-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use setPath() instead, as advised in the deprecation warning. Change-Id: I2f22220885938808c8efb85720ad10f7e05801ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | platforminputcontexts: use libxkbcommon compose key APIGatis Paeglis2019-03-013-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our implementation of compose table parser was added on Mar, 2013. libxkbcommon added APIs for the same thing in Oct, 2014 (ver: 0.5.0). After removing RHEL 6.6 from the list of supported platforms we were able to move the minimal required libxkbcommon version to 0.5.0. Now we can use the xkbcommon-compose APIs on all supported platforms. With this patch we can drop nearly 1000 lines of maintenance burden. This patch fixes user reported issues with our implementation. Known issues: - Testing revealed that xkbcommon-compose does not support non-utf8 locales, and that is by design - https://github.com/xkbcommon/libxkbcommon/issues/76 Our implementation did work for those locales too, but it is unclear if anyone actually uses non-utf8 locales. It is a corner case (work-arounds existing) and likely a configuration error on the users' system. - Looking at the release notes for versions above 0.6.1, only one issue that stands out. Compose input does not work on system with tr_TR.UTF-8 locale, fixed in 0.7.1. Compose input works fine when using e.g. en_US.UTF-8 locale with Turkish keyboard layout. Note: With Qt 5.13 we have removed Ubuntu 16.04 and openSUSE 42.3 from CI: Ubuntu 16.04 - 0.5.0 openSUSE 42.3 - 0.6.1 CI for Qt 5.13 has: Ubuntu 18.04 - 0.8.0 RHEL-7.4 - 0.7.1 openSUSE 15.0 - 0.8.1 Currently the minimal required libxkbcommon version in src/gui/configure.json is set to 0.5.0, but we could bump it to 0.7.1 to avoid known issues from above, but that is a decision for a separate patch. [ChangeLog][plugins][platforminputcontexts] Now using libxkbcommon-compose APIs for compose key input, instead of Qt's own implementation. Fixes: QTBUG-42181 Fixes: QTBUG-53663 Fixes: QTBUG-48657 Change-Id: I79aafe2bc601293844066e7e5f5eddd3719c6bba Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-283-0/+255
|\| | | | | | | | | | | | | | | Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
| * | | QListView: Fix Shift+click selection for non-default itemAlignmentAlexander Volkov2019-02-271-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QListView::setSelection() algorithm is designed for items to occupy their cells completely, which is not the case when itemAlignment is used. The middle part of the selection rect goes beyond the column borders and extra items are selected. Use the introduced cellRectForIndex() instead of rectForIndex() to calculate the middle part correctly. Fixes: QTBUG-73684 Change-Id: I4a1e42a056d56e85a16d8ae0ffe18b78d1d6deb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Clear only one device from g_pointIdMap when all points releasedShawn Rutledge2019-02-261-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test tst_QTouchEvent::touchOnMultipleTouchscreens() needs the touchpoint IDs to be predictable, but another test currently has a QEXPECT_FAIL; without release events, g_pointIdMap continued to hold the touchpoints that were there when the test failed. So it's necessary to add QWindowSystemInterfacePrivate::clearPointIdMap() to be able to call it in the test cleanup function. Fixes: QTBUG-73830 Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | | Don't edit the item if we did not get the press event on the same itemAndy Shaw2019-02-261-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a QTreeView it is possible that collapsing an item can cause the item under the mouse to be a new one and over the checkbox area for the new item. As a result, a release can cause it to change the check state even though it did not get the press for that item. This ensures that it only allows the edit if it got the press as well. Fixes: QTBUG-61476 Change-Id: I9a0821466afc84c97c9819755ccbacd729f7fbd7 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | | QTextureFileReader: add support for astc format filesEirik Aavitsland2019-02-274-24/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard astc encoder has its own file format. Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | Update the DNS public suffix list from publicsuffix.orgEdward Welbourne2019-02-271-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regular update in preparation for 5.13, adding tests for additions since 5.9.4/5.10.1/5.11.0's update 7e946030 (the last to record its upstream version sha1). Corrected the license header: it's now published under MPL 2.0 (not 1.1); and our secondary licensing of it is as LGPL3. Deferred full header over-haul until we've worked one out in detail. [ChangeLog][Third-Party Code] Updated DNS public suffix list Task-number: QTBUG-72623 Change-Id: Iabdbbbfd79624830396c2a6fe0a73389bd6ce5b7 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-224-7/+22
|\| | | | | | | | | | | | | | | Change-Id: I9e7cb1b131b7b216aad8ed1b1536669fd1557c21
| * | | Make tst_QUdpSocket::lincLocalIPv6 less sadisticTimur Pocheptsov2019-02-211-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fails on CI (Windows 10). Given our qabstractsocket disables read notifications/stops emitting readyRead if it already has pending data (unbuffered, aka UDP socket type) - make sure we do not suffer from this. The change does not affect the test's logic (unless the logic was to fail), it just makes it more fail-proof. Change-Id: I6c9b7ded20478f675260872a2a7032b4f356f197 Fixes: QTBUG-73884 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | Remove "insignificant" flag from qfilesystemmodel testTony Sarajärvi2019-02-213-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to removal of insignificant flag in tst_qfilesystemmode.pro a bunch of tests will either fail or crash in different operating systems. Task-number: QTBUG-70572 Task-number: QTBUG-70573 Task-number: QTBUG-29403 Change-Id: I44925187acd72e600d2fec4f2604b67c66ecdd6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-216-7/+23
|\| | | | | | | | | | | | | | | Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
| * | | tst_http2::earlyResponse - fix a flaky and somewhat broken testTimur Pocheptsov2019-02-203-1/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Fix erroneous logic, which was triggered in 'h2' mode (non-TLS connection) - after the initial protocol upgrade/POST request was handled, the server (on Windows specifically) was erroneously handling upcoming DATA frames by replying with another redirect response. 2. Make the test less heavy by sending 1 MB of Qt::Uninitialize instead of 10 MB - theoretically this could cause a timeout before the redirected request finished successfully. Task-number: QTBUG-73873 Change-Id: I961e0a5f50252988edd46d0e73baf96ee22eef3f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Fix a couple of SQL testsAndy Shaw2019-02-193-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | One of the tests was not added to the parent subdirectory pro so this is also rectified. Change-Id: I270f1c2882260e3e3fac83d074ed6444c5dece19 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-1955-117/+75
|\| | | | | | | | | | | Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
| * | Add cmdline feature to qmakeJoerg Bornemann2019-02-1854-116/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | Fix OpenGL ES2 build on LinuxJoerg Bornemann2019-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature detection in QOpenGL test project file needed adjustment. This amends commit dd988e20. Change-Id: I7efaaec9fbf564be4033e99a8554dbe51322f494 Fixes: QTBUG-73592 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-154-3/+34
|\| | | | | | | | | | | Change-Id: I8cad26f17834dbc9f7151edc0f17786f9e32025d
| * | winrt: Handle WaitForWindowExposedOliver Wolff2019-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As winrt does not have native windows, exposure check was just done by checking, whether the window is the active window. If a window is shown fullscreen though, winrtscreen will be resized. This resize triggers a resize of every maximized or fullscreen window that is shown. If we enter or leave full screen mode, we have to wait until the screen resize and the subsequent window resizes are done and only then we can consider the windows properly exposed. This patch reverts 54bcb9d42f5ceaafcca426dc2a5cc25d299d5a3d and thus unblacklists tst_QGraphicsItem::cursor on WinRT. Fixes: QTBUG-73545 Change-Id: If469fce319ed6b3a5d56b7bf3cbc11929b72bb11 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | QTextDocument: Do respect white-space:nowrapKai Koehne2019-02-131-0/+22
| |/ | | | | | | | | | | | | | | | | | | Prevent automatic insertion of line-breaks in blocks formatted with 'white-space:nowrap'. This follows the example of white-space:pre. Fixes: QTBUG-54787 Change-Id: If26f6a54106a02fe0e388947f6368ae4e86acf63 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix QSpinBox tests failing after change in the Windows QPAAndre de la Rocha2019-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some QSpinBox tests start failing after reverting to using legacy mouse messages to handle mouse input in the Windows QPA. It seems to be caused by a test that runs before it and moves the mouse cursor. Then when the QSpinBox tests run, they create widgets that appear below the mouse cursor, causing some mouse events to be generating and messing with the events synthesized by the test itself. With the pointer messages being used for mouse input, the legacy mouse messages that are generated under this condition were being ignored. But by reverting to the old implementation, the legacy messages are handled again, causing the test to fail. This change moves the mouse pointer to a safe position during the test initialization, so it does not depend on the state left by previous tests. This change needs to be integrated together or before the change in the windows QPA. Change-Id: I91f7e9376dc495ee61250e0a7d908c1c2b685bc8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix warning in tst_qopengl.cppJoerg Bornemann2019-02-121-0/+2
| | | | | | | | | | | | | | This fixes warning: unused parameter ‘glFormat’ Change-Id: I4865300fb99ea5392b96f8e9f4f594f15f18625c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | [Windows] Fixed regression when creating fallback fontsEskil Abrahamsen Blomfeldt2019-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 3ccdeb4b58b681bb3a0a43f926f81fd94f527680, we removed the specialized multi font engine on Windows, causing us to go through the same code path when loading fallbacks as on other platforms. When combined with 97f73e957756753b09a778daf2ee8f0ddb97f746, this caused an error, because the code in QFontEngineMulti::loadEngine() only overrode the families list, but not the singular family in the request. In the QRawFont test, this would cause the requested fallback font to correctly have "MS Shell Dlg2" as the only font in the families list, but the request.family would still be "QtBidiTestFont", the name of the main font. The singular family in the request was preferred by the windows font database when creating the LOGFONT. We would therefore load the latter for the fallback as well and since it still does not support the characters in question, we would continue searching. Fixes: QTBUG-72836 Change-Id: I1787b57febcf6030d5c5b09bc2ef2c9558f05beb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Add faster path for scaling QRegion with multiple regionsJoni Poikelin2019-02-131-0/+55
| | | | | | | | | | | | Fixes: QTBUG-72821 Change-Id: Ic4fa349087239337a77b0e280be551b46c75af71 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into ↵Liang Qi2019-02-124-2/+32
|\ \ | | | | | | | | | refs/staging/5.13
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-124-2/+32
| |\| | | | | | | | | | Change-Id: Iad53d4f21263718b8ecf15fd2d1170d24c7b675d
| | * Fix two smaller bugs in the BiDi engineLars Knoll2019-02-092-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove wrong code changing the Bido level of line separators. This lead to wrong ordering of the string in case the line separator was meant to be ignored and the string should be rendered in one line. Line breaks are anyways already reset to the paragraph level by the algorithm and reordering is done on a line by line basis, so this will work correctly when doing proper line breaking. Secondly fix a small bug found while testing the above change, where we wouldn't set the correct levels for boundary neutrals and explicit embedding chars because we did that processing before we were fully done with the BiDi algorithm. Change-Id: Id88f91cd58d2ab29be864aef34ca1727c1586611 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix an assertion in the BiDi algorithmLars Knoll2019-02-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The algorithm has been treating DirB inconsistently so far. initScriptAnalysisAndIsolatePairs was treating it differently than generateDireationalRuns leading to assertions. It wasn't visible in our test data, as DirB is in almost all cases the paragraph separator, where we split strings anyway. Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05 Fixes: QTBUG-73238 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix QTextTable:insertRows() for tables with spanning cellsLars Knoll2019-02-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't resize the height of cells spanning several columns multiple times. Fixes: QTBUG-36713 Change-Id: I5eb45892f2008e6a4f85745b56efd04323e25673 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Avoid read-outside-array error by QStringRef over-reachEdward Welbourne2019-02-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Constructing a QStringRef directly from the string, offset and a length is UB if the offset + length exceeds the string's length. Thanks to Robert Loehning and libFuzzer for finding this. QString::midRef (as correctly used in both changed uses of QStringRef, since 432d3b69629) takes care of that for us. Changed one UB case and a matching but correct case, for consistency. In the process, deduplicate a QStringList look-up. Added tests to exercise the code (but the one that exercises the formerly UB case doesn't crash before the fix, so isn't very useful; the invalid read is only outside the array it's scanning, not outside allocated memory). Change-Id: I7051bbbc0267dd7ec0a8f75eee2034d0b7eb75a2 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtWidgets: mark QFileDialog functions as deprecatedChristian Ehrlicher2019-02-121-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QFileDialog::setConfirmOverwrite()/confirmOverwrite() - QFileDialog::setReadOnly()/isReadOnly() Change-Id: I3cc1df76c8e40e95b8e9893ae06ef488fad26fb6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Deduplicate QWidgetPrivate::invalidateBufferTor Arne Vestbø2019-02-121-5/+9
|/ / | | | | | | | | | | | | | | | | | | | | Now that MSVC (presumably) supports templates, we can merge the QRect and QRegion versions of the functions into one. The function has been renamed to invalidateBackingStore to better reflect what it's doing. Change-Id: I0e94a0cabd286cf97f2ba718a42ee0425f59d3ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_QMenu: skip part of menuSize_Scrolling testSamuli Piippo2019-02-091-0/+7
| | | | | | | | | | | | | | | | | | | | Test fails on minimal and offscreen platforms. Task-number: QTBUG-73522 Task-number: QTQAINFRA-2630 Change-Id: I6260454be35a8bbac1ab683d89fb7b262d3b69ab Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Fix deprecation warnings in widget autotestsChristian Ehrlicher2019-02-0823-219/+212
| | | | | | | | | | | | | | | | Fix all deprecation warnings within tests/auto/widgets Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-0837-130/+2758
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Add testlib selftests for double and for non-finite float and doubleEdward Welbourne2019-02-0612-83/+2429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidied up the existing float tests in the process. (In particular, s/SUCCESS/PASS/ since that matches real test output.) These verify that QCOMPARE() handles floats and doubles as intended. Extended the existing qFuzzyCompare tests to probe the boundaries of the ranges of values of both types, in the process. Revised the toString<double> that qCompare() uses to give enough precision to actually show some of the differences being tested there (12 digits, to match what qFuzzyCompare tests, so as to show different values rather than, e.g. 1e12 for both expected and actual) and to give consistent results for infinities and NaN (MinGW had eccentric versions for these, leading to different output from tests, which thus failed); did the latter also for toString<float> and fixed stray zeros in MinGW's exponents (which made a kludge in tst_selftest.cpp redundant, so I removed that, too). That's further complicated handling of floating-point types, so let's just keep an eye on how expensive that's getting by adding a benchmark test for QTest::toString(). Unfortunately, default settings only get runs that take modest numbers of milliseconds (some as low as 40) while increasing this with -minumumvalue 100 or more gets the process killed - and I'm unable to find out who's doing the killing (it's not QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell). So results are rather noisy; the integral tests exhibit speed-ups by factors up to 5, and slow-downs by factors up to 100, between runs with and without this change, which does not affec the integral tests. The relatively modest slow-downs and speed-ups in the floating point tests thus seem likely to be happenstance rather than signal. Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Improve keyboard navigation in QListView when isWrapping is enabledAlexander Volkov2019-02-061-4/+21
| | | | | | | | | | | | | | | | | | | | Search the previous item or the next item in a model instead of searching them on visual layout. This way the cursor will not stop at the beginning or at the end of a row or a column. Fixes: QTBUG-14444 Change-Id: I0ef203a4dcd876e4c50559fb87e61585f07434d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Blacklist tst_QGraphicsItem::cursor on WinRTKari Oikarinen2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | It is the flaky test causing most failures in qtbase at the moment. Task-number: QTBUG-73545 Change-Id: Id9c5db27ebd08a4cf3c119d2fada12fdf1a5d2a0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * Fix QColor::toCmyk() for rgb(0, 0, 0)Eirik Aavitsland2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We translate all pure gray colors into cmyk having c,m,y=0 and only the k value expressing the darkness. But a fix introduced to avoid division by 0 caused rgb(0, 0, 0) to be an exception to this; it ended up being translated as c,m,y,k=1 instead. Fix by catching the potential div-by-0 situation earlier and directly set the orthodox cmyk translation: c,m,y=0,k=1. Fixes: QTBUG-73171 Change-Id: I3774eaf9d96e096ac5c47c55d28881bea2bd1309 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Painter path stroking: fix capping of beziers ending in tight turnsEirik Aavitsland2019-02-051-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | For some overly tight beziers where the start or end point and the next control point are closer than the pen width, the stroker's shifting algorithm will produce a start/end tangent pointing in the opposite direction from what is expected, for one of the sides. This would break the square and round capping logic. Fix by detecting the situation in the capping function and reversing the tangent when necessary. Change-Id: I48f4f017403d7b289b0483dd2b3a7ff1bbd0cf2a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * tst_QHeaderView: fix defaultSectionSizeTest() on High-DPI screensChristian Ehrlicher2019-02-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QHeaderView::defaultSectionSizeTest() fails on High-DPI screens because the default minimum section size is greater than the values used for testing the header sizes. Therefore the test will fail. Fix it by explicitly setting the minimum header size to something smaller than the test values. Also add a debug line to output the default minimum section sizes so other failures due to this problem can be debugged better. Fixes: QTBUG-73309 Change-Id: I257f341cef9381f140aa4d4f68376c5edadc39cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * tests: require widgets explicitlyLiang Qi2019-02-013-0/+5
| | | | | | | | | | | | Task-number: QTQAINFRA-1975 Change-Id: I5ba4e230322dc0dbd063b48cadf9e4f96e0dc140 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * Add some missing expected_*.tap files for the testlib selftestEdward Welbourne2019-02-017-0/+248
| | | | | | | | | | | | | | | | Only for tests that have existing expected_*.* files for other formats, though. Change-Id: I34ca1900d88454f300e04d849a608c378009489b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * generate_expected_output.py: placate FutureWarning from pythonEdward Welbourne2019-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | Regexes have long specified that a [ as the first character inside a [...] is just a literal [, but apparently we need to escape it now, to avoid a "nested set" FutureWarning. Change-Id: I76a48c9aafb0684a1d6b0d5284fe9852c9ea0e43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>