summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix rhi manual test buildLaszlo Agocs2020-09-301-0/+1
| | | | | Change-Id: Ib121a3a9871c29c10c1f3ae720c093444e076e8c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Use QDateTimeParser::locale(), not the default QLocaleEdward Welbourne2020-09-301-2/+2
| | | | | | | | | | QDateTimeParser::parseSection() used the default locale instead of the one configured. Change-Id: Ie31aa87670cc5ceaf8d937a907807445f44bf7f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Re-enable a QDateTimeEdit right-to-left test of its sectionText()Edward Welbourne2020-09-301-8/+11
| | | | | | | | | Use a QScopeGuard to fix its restoration of left-to-right mode after completion. Change-Id: I5ac1e44629e72d993f2d5ba6586b86508d57cdaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* CMake Build: Add direct2d CMake buildCristian Adam2020-09-303-2/+280
| | | | | | | | | Also fixed Direct 2D feature detection test for MinGW. Task-number: QTBUG-83932 Change-Id: I8c89aaa953d34de40fdf7b51e0859c791aeb38ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Eliminate QDateTimeParser's mutable parameters at lastEdward Welbourne2020-09-303-34/+32
| | | | | | | | | | | | | | | | I noticed that QDTP has a mutable member, text, which gets set at the end of each call to parse(); this makes all the in-out parameters redundant, since relevant methods can simply access - and modify - text, if it's set *at the start* of parse instaed. (There are no early returns to complicate matters.) This also makes StateNode::input redundant. At the same time, rename the mutable member, as several methods shadow it with parameter or local variable names; it is too generic. Change-Id: I2259cd87de5c84201b25c9633d11e59a4a4d57a1 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Standardize #include order and form in qdatetime.cppEdward Welbourne2020-09-301-20/+16
| | | | | | | | | There were duplicates; there was neither rhyme nor reason to the order. One was conditioned on a deprecated old define. Change-Id: Iba390f4a83758418379fb5fc522f08ada3e41d12 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Deal with {und,ov}erflow issues in QLine's length handlingEdward Welbourne2020-09-303-47/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use std::hypot() instead of sqrt() of a sum of squares. This ensures length() can't be zero when isNull() is false. Use length() in QLine::setLength() rather than duplicating that. Clarify and expand some documentation; isNull() never said what constituted validity, nor did unitVector() mention that is should not be used on a line for which isNull() is true. Make clear that lines of denormal length cannot be rescaled accurately. Given that we use fuzzy comparison to determine equality of end-points, isNull() can be false for a line with displacements less than sqrt(numeric_limits<qreal>::denorm_min()) between the coordinates of its end-points (as long as these are not much bigger); squaring these would give zero, hence a zero length, where using hypot() avoids the underflow and gives a non-zero length. Having a zero length for a line with isNull() false would lead to problems in setLength(), which uses an isNull() pre-test, protecting a call to unitVector(). (It was already possible for a null line to have non-zero length; this now arises in more cases.) Restored QLine::setLength() to the form it had before a recent change to avoid division by zero (which resulted from underflow in computing the length of a non-null line) but allow for the possibility that the unit vector it computes as transient may not have length exactly one. Add tests against {ov,und}erflow problems in QLine. Reworked the test added during the divide-by-zero fix to make it part of the existing test. Pick-to: 5.15 5.12 Change-Id: I7b71d66b872ccc08a64e941acd36b45b0ea15fab Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* QTestResult: Don't pass a nullptr file to addFailure()Ulf Hermann2020-09-307-58/+84
| | | | | | | | addBFail() asserts on the file being non-null. The convention seems to be "Unknown File" for cases where we cannot determine the file. Change-Id: I3a4d0130352d77d75f264fad6f3bd47c6700ef4c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Strip binaries and libraries upon installationAlexandru Croitor2020-09-301-1/+1
| | | | | | | | | | | | | | To avoid big artifact sizes, strip the binaries and libraries upon installation. This achieves stripping similar to QTBUG-69767 and QTBUG-81301 but arguably in a cleaner CMake way. See comment on PS34 of the unmerged commit 90b09fee44b08b65a436fd15fda2526e242f7b21 for details. Task-number: QTBUG-86053 Change-Id: I3ed929a8a7c74b88c480543212fc9551d8bde77f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use universal references in QtConcurrentSona Kurazyan2020-09-309-188/+281
| | | | | | | | | | | | | | Changed QtConcurrent algorithms to take the passed sequences as universal references, where it makes sense. In addition to avoiding to create extra copies when passing rvalues, this change allows passing temporary container adaptors to QtConcurrent::map (e.g. see the example in the ticket and the new test-cases). Task-number: QTBUG-83170 Change-Id: Ia7c0833f4ec1d860294fa5214cd53934b65ff084 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Emit QScreen::geometryChanged when the logical DPI changesFriedemann Kleint2020-09-302-6/+11
| | | | | | | | | | | | | | | | | | | | Add the missing call to QScreenPrivate::emitGeometryChangeSignals() along with an emission of physicalDotsPerInchChanged() since that is calculated from geometry and physical size. Rearrange the code in QGuiApplicationPrivate::processScreenGeometryChange() to prevent duplicate emissions of geometryChanged(), physicalDotsPerInchChanged() which this change would introduce. Amends 5290027e3bab75f14fc0a2b7c206594d9cb91e76. Pick-to: 5.15 Task-number: QTBUG-76902 Task-number: QTBUG-79248 Fixes: QTBUG-86604 Change-Id: I3dc2ec5ccd9c6413e92f9246242f323e8afc5e57 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QPrinter: unit tests fail when default printer supports duplexAndreas Buhr2020-09-301-3/+2
| | | | | | | | | | | When the default printer supports a duplex mode other than DuplexAuto, the unit tests change to QPrinter::PdfFormat and expect that the pdf printer is in duplex mode then. However, the pdf printer does not support duplex mode. This patch removes this check. Change-Id: If394f9f23fd244713bbb1ecce9d3802cbd281d90 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* rhi: Manage buffer data without QBALaszlo Agocs2020-09-309-63/+119
| | | | | | | | Use a simple and straightforward container that only does what we need here. Change-Id: I1a81b53a58bc91d533e3d7df5471a1362046825d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Fix incorrectly placed closing bracket in Q_PROPERTY codeKai Koehne2020-09-301-2/+2
| | | | | | | | Amends cb3152086c61e7c Pick-to: 5.15 Change-Id: I1615a686a53da7ca5ae454565283c9e83399d947 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QList: don't detach on squeeze when holding raw dataMårten Nordheim2020-09-303-1/+8
| | | | | | | | | To match QString and QByteArray behavior Change-Id: Ifce4a5dee6fc9077e855a24499f11f911e359cf5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: Remove CapacityReserved on squeezeMårten Nordheim2020-09-301-0/+3
| | | | | | | | | | Even if we don't reallocate or detach. Change-Id: I44928c261f037b304de8ee6135b96f00dd217c51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Fix ChangeHandler notification for eager propertiesFabian Kosmale2020-09-303-11/+19
| | | | | | | | | | | | | | ChangeHandler's evaluated the binding to detect if the value actually changed. This is a valid strategy for lazy bindings, but eager bindings were already evaluated at that point, and thus the change would not be detected. Change the binding loop test, so that there isn't a fixpoint in the binding loop, and we can still detect it. Changing the binding loop detection code to deal with this case is left as an exercise for the future. Change-Id: Ia5d9ce2cd98a5780e69c993b5824024eb186c154 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove license header templates from qtbaseJani Heikkinen2020-09-3011-344/+0
| | | | | | | | | After 66d6030924e968dffd98ba88d1382e8b08cc521d those are located in qtqa instead Pick-to: 5.15 5.12 Change-Id: I2b07638d30affe3e2826a231a31d34cfe7e9e4c6 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Eliminate compilation warningsXie Chuan2020-09-301-1/+1
| | | | | | | | When converting a const variable to a non-const variable, use the conversion operator  Change-Id: Ib1c8f3defbf9ccce1af5c90e7e9c508bc8c039d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add logging categories to image handlersAllan Sandfeld Jensen2020-09-309-28/+61
| | | | | Change-Id: Ia0c47826d08b3f641c17d8a585f62d008a8b095b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove workaround for MSVC 2008Allan Sandfeld Jensen2020-09-303-84/+9
| | | | | | | We don't build on platforms without stdint.h Change-Id: Iee9de3e71a7bcae524f2d1377919cf074a713960 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: Change metatype in convert() even on failureFabian Kosmale2020-09-302-2/+13
| | | | | | | | | | | | | | The documentation of convert promised that “If the cast cannot be done, the variant is still changed to the requested type”. This was not the case so far, because we returned too early if canConvert returned false. This commit changes the behavior of the method to reflect its documentation. The documented behavior seems more useful than the alternative of not changing the metaType, at least for common use cases inside qtdeclarative. Change-Id: I09b5a5efb7344e76e93de278e35c7fb2b2f87dcd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc warning from documentation of internal APIVolker Hilsheimer2020-09-301-7/+0
| | | | | | | | | QXmlString is an internal class, so qdoc cannot tie the member function documentation to anything. Since "swap" is rather self-explanatory anyway, we can just remove the (somewhat oddly placed) documentation. Change-Id: I3d47219a628ba3d3e5ecd0c825eeff71908d07e9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CMake: use HostInfo when QT_HOST_PATH is setSamuli Piippo2020-09-301-0/+3
| | | | | | | | | HostInfo is used in places whenever QT_HOST_PATH is set, regardless whether CMAKE_CROSSCOMPILING is set or not. Make sure that HostInfo is available when QT_HOST_PATH is set. Change-Id: I39763a61d77e97dc9c4cc3875bce4deb942f870a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "Blacklist tst_QWindow::exposeEventOnShrink_QTBUG54040"Liang Qi2020-09-301-1/+0
| | | | | | | | | | | | This reverts commit b1ef104866f78ae5bbc1214ae524bad4120ef0e2. This test is BPASS on openSUSE_42_3 for 5.12 and PASS on openSUSE_15_1 for 5.15. Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ia1d81ed38491c27c01f270623c5082663f4da699 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QJsonObject: fix sorting after parsing from JSON textThiago Macieira2020-09-292-37/+54
| | | | | | | | | | | The logic was complex and missed the UTF-8 UTF-8 case. It ended up calling the UTF-8 to Latin1, resulting in an improperly-sorted container, which in turn meant keys were not found when searched. Fixes: QTBUG-86873 Pick-to: 5.15 Change-Id: I0d3ff441bec041728945fffd16379dec418637ca Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix assumed version typoAllan Sandfeld Jensen2020-09-301-2/+2
| | | | | | | Deprecated from 6.0, but necessary for migration. Change-Id: Idb1264e6ecca9400086970c15270b803c8fd391b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix ubsan errorsAllan Sandfeld Jensen2020-09-302-1/+7
| | | | | | | | Nullptr memcpy, memmove and 36 bit shift of integer. Change-Id: Ib79c8a98a710d021fc93b6aaec6c0ba9bde5f91e Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add {add,sub,mul}_overflow detection when one operand is a constantThiago Macieira2020-09-292-149/+252
| | | | | | | | | | | We were missing 64-bit signed mul_overflow on 32-bit platforms and in those where we did have it, the detection was awful (both for signed and for unsigned). So if one of the parameters is a constant, we can simplify the code generated. Change-Id: Ia99afccf0c474e20b3ddfffd162a60d269eb1892 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use Q_RELOCATABLE* instead of Q_MOVABLE* wording in docsAndrei Golubev2020-09-291-8/+8
| | | | | | | | Movable in Qt is confusing since C++11. Our code also relies on wording with "relocatable" and "movable" is mostly a backwards-compatibility thing Change-Id: I28f5a61b4482aa1dd26c7b760d78be031d11ef10 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Improve docs for QFuture::{result*, takeResult*}Sona Kurazyan2020-09-291-4/+10
| | | | | Change-Id: I559f2fd73a9aae3d126be18cb259f8a9abe0efaf Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Improve docs for QtConcurrent::{filter, blockingFilter}Sona Kurazyan2020-09-291-6/+18
| | | | | | Change-Id: Ibe3a038ad6853da1a6c9246b1157cd7ada4b9f32 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Further blacklist network tests on Windows MinGWTony Sarajärvi2020-09-291-0/+48
| | | | | | Task-number: QTBUG-87009 Change-Id: Ic855ae87b69c02f76519a2957de05f4af7bf9a6d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QObject: use more categorized loggingGiuseppe D'Angelo2020-09-291-33/+34
| | | | | | | | | Introduce a category for debug/warning prints coming from connect() and related functions. As a drive-by, rename and complete the usage of logging categories for connectSlotsByName(). Change-Id: Ieb2d8641df856c8c60317757eda80dc5f9375130 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* rhi: vk: Do not copy the entire BufferOp struct for host writesLaszlo Agocs2020-09-292-7/+11
| | | | | | | | Take only the three things we need. Otherwise we waste time on copying data that is not even relevant to buffer updates at all. Change-Id: I5ed6ae647e23c6f1d0f5f1d973bead2e008f06cc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: gl: Skip nice but not essential uniform checks in releaseLaszlo Agocs2020-09-291-0/+2
| | | | | Change-Id: Ic258f128d691a221670d930d2bfe90cda74a4c75 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Drop QBitArray usageLaszlo Agocs2020-09-293-8/+26
| | | | | Change-Id: I4ae92e6c8c91111a4593c51ee05443b3bc806c35 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Improve layout compatibility test performanceLaszlo Agocs2020-09-298-9/+36
| | | | | | | | | Also bump the non-heap buffer size in the binding list to 16, in order to accommodate complex Quick3D materials with many associated texture maps. Change-Id: Id190e5f8304f5941cffc41a2605fce45dfeb72f0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: gl: Pre-sort uniform metadata based on offsetLaszlo Agocs2020-09-291-7/+11
| | | | | | | | | Because we will iterate through this list and issue a memcpy for each entry. Better to keep it sorted based on offset to be more cache friendly. Change-Id: Ie9dcb259e9a543937cbdcdea85aec9eb92dba1b1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Disable moving of QPropertyLars Knoll2020-09-295-151/+54
| | | | | | | | | The semantics are not very intuitive, and it opens a can of worms with regards to what should happen with observers that observe that property. Change-Id: I6fb00b7693904b968224cc87d098bbd0ea776ba3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QProperty: fix QBindingStoragePrivate::reallocate related codeFabian Kosmale2020-09-293-1/+41
| | | | | | | | | | In the internal hash map implementation, we have to ensure that the index is in the interval [0, size - 1]. Moreover, in setBinding we have to refetch the binding storage in case a reallocation happened. Change-Id: I11c6264f16537699c8908b647e2355a39ce87648 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: fix sdkBuildToolsRevision not being set for user appsAssam Boudjelthia2020-09-292-26/+25
| | | | | | | | | | | Add qt6_android_get_sdk_build_tools_revision() function to get the Android SDK build tools revision, the logic is moved from QtPlatformAndroid to Qt6AndroidMacros. The update QtPlatformAndroid header comments. Task-number: QTBUG-85982 Change-Id: If3e5b46fa583f929a24794792c9d5a52beb83990 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Do not parse low-level PNG colorspaces if they are not usedAllan Sandfeld Jensen2020-09-291-5/+5
| | | | | | | Minor cleanup. Change-Id: I92c271f737d82c5f853b79c418db5a6cedfaa399 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Reimplement non-antialiased cosmetic penAllan Sandfeld Jensen2020-09-291-193/+98
| | | | | | | | | Simplify rounding to get rid of hacks to make lines meet up again. This also results in better looking drawing results in general. Task-number: QTBUG-25896 Change-Id: I48f08f0e7bd7ff869d6767f7bac2a18c2d280615 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QSsl: Remove enum value gapsMårten Nordheim2020-09-291-2/+2
| | | | | | | | These value gaps were there for binary compatibility, but we don't need those in Qt 6. Change-Id: I72a40d601b61f90e14562578e88493b0d54ff398 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Docs: Update default redirect policy enumerationMårten Nordheim2020-09-291-3/+4
| | | | | Change-Id: Ia72151cc0fbcb325572e7b623ef9a4b3236d797f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QPrinter: fix unit tests for special case when no printer is defaultAndreas Buhr2020-09-291-1/+7
| | | | | | | | | | | | | The unit tests of QPrinter assume that a printer which is default- initialized is the same printer as the default printer. However, when no printer is set to default, this is not the case. When no printer is the default printer, a default-initialized QPrinter will be the first printer found. This patch adapts the unit tests to work also when no printer is the default printer, even though printers are available. Change-Id: I4967e5b1c4fb8a7c33c911184289ec5cd283fc58 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tests/xcb: fix tst_QWidget::updateWhileMinimized() - againLiang Qi2020-09-291-1/+2
| | | | | | | | | | | This amends 4403ec3bc1501cde454b0546759d4c27f9b6cb1b. CentOS 8.1 uses GNOME in XDG_CURRENT_DESKTOP. Pick-to: 5.15 Task-number: QTBUG-68862 Change-Id: Ia9a6f7f4c47853fc53d9860dad070109271a438e Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Blacklist QTcpSocket::connectToHostErrors in Windows 10 buildsTony Sarajärvi2020-09-291-1/+2
| | | | | | Task-number: QTBUG-87009 Change-Id: I63c1bcb77a359cea82f2831b02f1e29b46060a66 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Doc: Qt GUI: Depend on qtprintsupport documentation moduleTopi Reinio2020-09-291-0/+1
| | | | | | | | | | This adds 'Inherited by:' links to print support classes deriving from Qt GUI types. Pick-to: 5.15 Task-number: QTBUG-77126 Change-Id: I84ecee5df8cae0635d42653b1483db6b3c6074ee Reviewed-by: Paul Wicking <paul.wicking@qt.io>