summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tst_qobject: fix the detection for GCCGiuseppe D'Angelo2021-03-261-4/+14
| | | | | | | | | | | | | | Q_CC_GNU is defined on compilers that masquerade as GCC (Clang, ICC), so using it to work around GCC-specific bugs is wrong. Introduce a local define for _only_ GCC and use it in place of Q_CC_GNU. Drive by: version-fence a test we now know it's been fixed upstream, and correct the link to the corresponding bug report. Change-Id: I9059d6e6bf86157aca71590ac22afb1a1c114313 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 8b9c8d417b8ff2d4f60d83f9cc69c148632d1046) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-03-263-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | fillRule() contained a major blunder: instead of checking if the d-pointer was allocated, and return a default value if it wasn't, it checked whether the path contained any points. This means that QPainterPath p; p.setFillRule(x); Q_ASSERT(p.fillRule() == x); was failing. As a drive-by to test this change, fix another mistake in clear(): clear is documented to clear the elements in a path, but instead it also changed the fill rule. This commit partially reverses 697910e5fbd382e78bc1bcbac3f5824aded059b4. Change-Id: Ieb8145694b672439c3380d9ccb87d1206a2dd115 Done-with: Milian Wolff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0b4ccbf81ee2009051169f2f0918442b56512b20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix qconfig.cpp embedded prefix in the CIAlexandru Croitor2021-03-262-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the CI on a windows we configure Qt with the following prefix -DCMAKE_INSTALL_PREFIX:PATH=\Users\qt\work\install Note the lack of the drive letter. This is intentional, so that we can abuse CMake's DESTDIR installation mechanism to install into a custom path. This causes trouble for static Qt builds in the CI. Specifically when there is no qt.conf file next to qmake, qmake -query will report a QT_INSTALL_PREFIX:/Users/qt/work/install and ultimately qmake will fail to locate the module .pri files in such a path, showing errors like: Project ERROR: Unknown module(s) in QT: core gui? If a qt.conf is placed next to qmake (even an empty one), a differenct code path is used in qmake to resolve the prefix, which returns a path with a drive letter. In a shared build, because the 'relocatable' feature is enabled by default, a different code path is used and thus the prefix is also successfully resolved. So the problem is specific to static Windows Qt builds that have no qt.conf file next to qmake. This is the exact scenario that we encounter when running static Qt tests (tst_qmake in particular). To circumvent the issue, prepend a drive letter to the prefix hardcoded into qconfig.cpp. Do that with get_filename_component(REALPATH) which apparently resolves to a fully qualified path. Task-number: QTBUG-87580 Change-Id: I17c885f29bfdee45bec1d6aac7c3b26723e761a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 59c3be711728ab0aa644bfdf50e91a1b020f95bb)
* CMake: Get rid of the Core_qobject static libraryAlexandru Croitor2021-03-262-49/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Core_qobject target was problematic for a few reasons. In the very beginning, Core_qobject was an OBJECT library, explaining its existence with the following comment "requires to spill internals into users". The object library contained qobject.cpp and qproperty.cpp and their manually generated moc files. It was was a dependency of Core. Afterwards it got converted into a static library instead, presumably to circumvent some issues with metatype generation. Unfortunately making it a static library was wrong, because it leads to linker failures (undefined symbols) in a static Qt build when trying to link a project that uses only QtCore. Both Core and Core_qobject refer to each other's symbols, and whichever library came first on the link line, many of its symbols were discarded by the linker. Transforming Core_qobject back into an object library could be an option, but that leads to trouble with creating proper prl files (our infrastructure doesn't quite support that for object libraries yet). Furthermore, there was some internal discussion and concern about how to merge the two metatype json file lists (Core and Core_qobject) into a single file. Instead of using an object library, move qobject.cpp and qproperty.cpp to be directly a part of Core again and remove the Core_qobject target. In order to do that, we have to circumvent some issues with AUTOMOC. First, we have to disable AUTOMOC for qobject.cpp and its headers. qobject.cpp contains Q_GADGET, Q_NAMESPACE, etc keywords in its doc comments. That confuses AUTOMOC, because it expects a qobject.moc file which is not included by qobject.cpp. See e2ff9e3b9957f844d6530cc92096bed3c16fa46a for some details on the Q_GADGET + AUTOMOC issue. We still need to run moc on on qobject.h and compile moc_qobject.cpp, so we manually run moc on the header file. Because qobject.cpp directly includes moc_qobject.cpp, we need to adjust the header include path to the generated file. Second, we remove the direct inclusion of moc_qnamespace.cpp in qobject.cpp to prevent duplicate symbol compilation, because the symbols were compiled both as part of qobject.cpp and mocs_compilation.cpp. Finally, because manual moc is used on qobject.h, the generated json file needs to be explicitly passed to Core's metatype generation step. Amends e57a94cbd8f28ccab8b3368afc4365237c533a4f Amends 3c4c02b3f1cec8ebc0134fd05b0e51f1f771937d Task-number: QTBUG-87580 Change-Id: I859a7d2f95508eda211a0a0b4ec132540b78bda4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 04df85bbecdc034876d509b9c96a4f17fc990293) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation with experimental x11 paint engine featureEskil Abrahamsen Blomfeldt2021-03-262-6/+8
| | | | | | | | | | | | | | | | | Adding support for vertical subpixel positions in d79a9b1a4f694a227ce62ccab9b44685a9755916 changed some private APIs which were used from the xcb-native-painting feature. This fixes this (it does not implement vertical subpixels but simply sets the vertical subpixel position to 0). It also adds a missing "override" which triggered the warnings-are-errors when compiling for me. Fixes: QTBUG-92011 Change-Id: If214a0d19a41e623ca9ef8e6215bc145f9846ae9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 70251867a50f9f606a7ceaf2338375a67e413b83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: vulkan: Prevent a misplaced assert from triggering in debug buildsLaszlo Agocs2021-03-251-1/+1
| | | | | | | | | | | | | | One place where this popped up was the qrhi autotest (in debug builds). This check is meant for VkRenderpass objects for texture render targets, should not bother with it for the "main" renderpass. Amends 19384f2e8f50bad0a0775f7b2e10aff3372bcbb5 Change-Id: I877a2458fe17fe339b4741d4aa8af3fbda4dabcc Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 3c85f8e9fc1977cf2a650b17b43d3eac4960155e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix no mapping for SysReq keyAndrey Butirsky2021-03-251-0/+1
| | | | | | | | | | | | | | | | | | XKB_KEY_Sys_Req keysym is currently unmapped to any Qt::Key. Implication of this it is uncapable to participate in any keyboard shortcuts. This patch adds the missing mapping. Detected by testXkb KWin unit test Fixes: QTBUG-92087 Change-Id: I2440c218e265c5636fc1d2703f14d8bfe033967e Reviewed-by: Andrey Butirsky <butirsky@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> (cherry picked from commit 40193c2b6919875a714e84f5029ba2bcc1f9e258) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix deprecated macrosVolker Hilsheimer2021-03-252-3/+5
| | | | | | | | | | | | | | | The QTextCharFormat::fontFamily methods are deprecated as of Qt 6.1, not as of Qt 6.0. Mark them as obsolete in the documentation and point to the replacement there as well. Address API review comment. Change-Id: Id71ea1ebab6f7a385c8c3f286a35f88ba1177857 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 42e659b3205871649c921873365606b9f7b3f924) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't attempt to add to a target that doesn't existMårten Nordheim2021-03-251-2/+4
| | | | | | | | | | | When configuring a benchmark using the standalone-test script the 'benchmark' target is not available, causing a configure error. Change-Id: I8e480c9e72b47783c0910428187f0092049e89db Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1d6a35c5363944ce59eba114f827b1992f31bde3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add a way to install versioned hard-links for toolsJoerg Bornemann2021-03-255-3/+69
| | | | | | | | | | | | | | | | | Add the option argument INSTALL_VERSIONED_LINK to qt_internal_add_tool and qt_internal_add_app. For tools/apps with this argument we create an install rule that creates a versioned hard link. For example, for bin/qmake we create bin/qmake6. Note that this only applies to prefix builds. Apply this argument to qmake. The qt_internal_add_app change is necessary for qtdiag and in qttools. Pick-to: dev Task-number: QTBUG-89170 Change-Id: Id32d6055544c475166f4d854aaeb6292fbb5fbb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warning from syncqt.pl about header inclusion pathEdward Welbourne2021-03-251-1/+1
| | | | | | | | | | | | After a "QtCore: WARNING:" intro (separated to avoid being mistaken for a footer) syncqt.pl said: .../qtbase/src/corelib/kernel/qjnienvironment.h includes QScopedPointer when it should include QtCore/QScopedPointer Change-Id: Iaa1f025367b7321af9c5de27196ebf271f9179df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 968f4001a86d4a3321ac41f6b2808ccb3b1271fe) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rework the failure macros in the Qt CTest kitAlexey Edelev2021-03-242-5/+17
| | | | | | | | | | | | The _qt_internal_test_expect_fail macro fails when the test fails during the configuration step. Rename this macro to _qt_internal_test_expect_build_fail and add the _qt_internal_test_expect_fail macro that expects inverted test result. Change-Id: I4635e99152f7a32f5c48202e84fec59800453d34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit fec5b8e81c976b8b0cdf45b459f7d481222e86d7)
* xcb: use QXcbScrollingDevice for a touchpadShawn Rutledge2021-03-242-10/+26
| | | | | | | | | | | | | | When using XQuartz on macOS, the virtual pointer device is detected as a touchpad, not a mouse; but QXcbConnection::xi2HandleScrollEvent() expects the device to be an instance of QXcbScrollingDevice for storage of some state. A touchpad that has the scrolling capability must be that type, not a plain QPointingDevice. Fixes: QTBUG-91402 Change-Id: I1b82766d4a3f87f656e56c0d8904def26fb0979a Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit f85e70c569f4aa979004889d20de8acec9a790bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restore support for reading /etc/timezone for system zone nameEdward Welbourne2021-03-231-7/+15
| | | | | | | | | | | | This restores one of the two mechanisms removed in commit b0383cbd388336f698ceeac11a4f50cdff931dd9, transformed to fit in with the new cached system-zone determination. Fixes: QTBUG-87326 Change-Id: Ic270acb0d958e17dbc74a0ff93a5a1843c939678 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 824d963700a91294ba4a543ebb486aedbd650284) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make it even more obvious on what to do when tst_toolsupport failshjk2021-03-231-0/+7
| | | | | | | | | Triggered by 6778b247. Change-Id: Ic8e7136cd82eb8d3891450cfa8994f43b7cc09fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8403fc7796aca7b6f45a88ecaef6485f731dc431) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add plugins to Qt tools and executables for static buildsCraig Scott2021-03-235-33/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In static builds, we cannot allow any part of the main build to make a call to find_package(Qt6...) where such a call may load a Qt6*Plugins.cmake file. That would add additional dependencies to the main module targets, setting up a circular dependency in the set of *Config.cmake files which cannot be resolved. This scenario would be triggered by per-repo builds or user projects. But Qt's tools and other executables still need to load some plugins in static builds. Sometimes a platform plugin may be enough, other times we may want all supportable plugins (e.g. Qt Designer). Therefore, add all plugins we can identify as relevant for an executable that is part of the Qt build, but add them directly to the executable without affecting the linking relationships between the main module libraries. Also remove the now unnecessary check for QT_BUILD_PROJECT_NAME in top level builds because there should be no difference between per-repo and top level builds any more (as far as linking static plugins is concerned). Examples that build as part of the main build will still build successfully after this change, but they will not run if they require a platform plugin. Examples need to be moved out to a separate build where they can call find_package(Qt6) without QT_NO_CREATE_TARGETS set to TRUE to be runnable (see QTBUG-90820). Fixes: QTBUG-91915 Change-Id: I8088baddb54e394ca111b103313596d6743570ba Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 5807e1ae8168a5702ad0f6890d2b35223cfebdee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix invalid pointer return with QGridLayout::itemAt(-1)Zhang Yu2021-03-232-3/+54
| | | | | | | | | | | QGridLayout::takeAt() and QLayoutItem *itemAt() only check the upper bound. If the index < 0, these function will return invalid pointer. Fixes: QTBUG-91261 Change-Id: Idfb9fb6228b9707f817353b04974da16205a835c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit c47bb4478a4c3a29c0505d7d89755f40601b326f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProperty: markDirty should be internalFabian Kosmale2021-03-221-0/+3
| | | | | | Change-Id: If69a6f37c32ce0d7f824794a2a1c52bad82d84cc Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix alpha handling of QImage::setPixelAllan Sandfeld Jensen2021-03-223-18/+87
| | | | | | | | | | | It was treated differently depending on format, made it consistently behave the same for all formats (following the behavior of the primary formats). Change-Id: Ie24e19957d076fdf3ebd333074e26ede187489eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c32cd44d34910cfd42e32537578e4a573138a282) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make unreleased resource warnings available in release buildsLaszlo Agocs2021-03-221-4/+7
| | | | | | | | | | | | | | | | | ...but tie to an environment variable still. When destroying a QRhi object, it has the ability to print warnings for each QRhiResource that got created from the QRhi and is still alive. This includes only QRhiResources that own native objects underneath. It can be handy to enable this in release builds as well. Therefore, make this possible by setting QT_RHI_LEAK_CHECK=1. In debug builds this continues to be always on. Change-Id: I5283676594284fadf2adf4f123b4fc6adb6db1f7 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 8a0dd6191123bc7ec7ea8707908884bc3bfd33b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unnecessary $<BOOL:...> generator expressionCraig Scott2021-03-221-4/+1
| | | | | | | | | | The $<NOT:...> genex already guarantees to return a value of 0 or 1, so there's no need to wrap it with $<BOOL:...>. Change-Id: Iff4ad64ed8deaa846e1b5bc22d2e5d9dbcd77cc7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit df121fd7f74ecfb3de20867edea1c1f3ebf035c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_bench_qmetaobject: Fix testFabian Kosmale2021-03-211-3/+4
| | | | | | | | | | | The code has apparently been broken for quite a while, probably since the change that made the QObject constructor invokable. Fixes: QTBUG-91710 Change-Id: I8b7e6c8a579913b3d0e2a364ffdbffe8d404c72b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit ed3df88846d3d92baf7110063cc7b82b7c45d1ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Don't draw scrollbar handle when there is no rangeAndy Shaw2021-03-201-1/+1
| | | | | | | | | | If the minimum and maximum is set to be the same then we should not draw the handle. An empty groove should be shown instead. Change-Id: Ie79f55cd761f9a8f614967c40c23a7f59e700a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit aac33296e618e617ab9e05b3c71682a13f2d5dfc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Get rid of the Core_versiontagging object libraryAlexandru Croitor2021-03-191-17/+4
| | | | | | | | | | | | | | | | | | We don't currently handle object libraries when creating prl files for static Qt builds, so it's best to compile files as part of the main Core target. Use source file COMPILE_OPTIONS to add the -fno-lto flag to the global/qversiontagging.cpp source file. Amends 2d4a40f93fd3f0fd31110ef7d19a12fc56c00967 Change-Id: Iac1d37ecb4caa7c9889d44b3a103a9bdafec49f3 Reviewed-by: Christophe Giboudeaux <christophe@krop.fr> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d68486547aaf05994f39786f8527bcb454c6db3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Consistently check for nullptr in QGraphicsTextItem::inputMethodQueryVolker Hilsheimer2021-03-191-8/+10
| | | | | | | | | | | | | If dd->control is nullptr, then it's nullptr all the way, so don't dereference it in the calls to dd->controlOffset. Fixes static analyzer warning 9c33d9bc9b8cf438dccb63aa52afcbe0. Change-Id: I7a61b6438422373678d4fcb66255b750c550724d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 7edf0fbb9e8cca2e2f2695a1b5dc7a0a143bc211) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make it possible to clone a QRhiRenderPassDescriptorLaszlo Agocs2021-03-1913-64/+191
| | | | | | | | | Task-number: QTBUG-91888 Change-Id: Ib6d2e639e6c24f3e9a733c6563dc8a6d6da47719 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 19384f2e8f50bad0a0775f7b2e10aff3372bcbb5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QContiguousCache: Remove redundant conditionWang Yu2021-03-191-3/+1
| | | | | | | | | The reverse condition was already checked three lines before. Change-Id: I2f78262004871ec2f3730e2a25f26fe22636cde7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 852b070529d2721d2d4e1e7ec1c90d8fe536b088) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update bundled libjpeg-turbo to version 2.0.6Eirik Aavitsland2021-03-1926-150/+235
| | | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.6 Change-Id: I3e308d241853edf3c1d616955cda203220a258d8 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit ede0082f861146d441df641d93f815dbe63a9076) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid undefined color values in corrupt xpm imageEirik Aavitsland2021-03-191-1/+1
| | | | | | | | | Issue reported by Codechecker. Change-Id: I1a5aa2203fb31e0ce3b630a11e450925aee81fb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f651e6a26cb59f7b7c7671cded8a10b9f98f5c71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAsn1Element: Avoid overflow in QAsn1Element::toIntegerRobert Löhning2021-03-181-2/+3
| | | | | | | | | | Fixes oss-fuzz issue 29534. Change-Id: I51d0b8238c73e5860c40d3b74577ddb8926647a3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 11a3eab1e168256778c45090b56e998e50c08c55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't combine enum values from different enum typesVolker Hilsheimer2021-03-181-2/+2
| | | | | | | | | | | | | Address static analyzer warning dceb66e05690ed1fb2f1455a9eb517f6. C++20 is deprecating arithmetic operations between unrelated enumeration types, and not all of the enums involved here are clearly bitmasks. Change-Id: I61c9dcdc42ccd2b01a6208e067d216107672cc4d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 20639d565bf26b01d915db2e42daedf3f905f399) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* openssl: fix the build on LinuxShawn Rutledge2021-03-182-1/+5
| | | | | | | | | | | | | | | qtbase/src/network/ssl/qtls_openssl.cpp:1527:34: error: ‘qScopeGuard’ was not declared in this scope qtbase/src/network/ssl/qtlsbackend_openssl.cpp:227:9: error: ‘QDirIterator’ was not declared in this scope; did you mean ‘QSetIterator’? qtbase/src/network/ssl/qtlsbackend_openssl.cpp: In function ‘QList<QSslCertificate> QTlsPrivate::systemCaCertificates()’: qtbase/src/network/ssl/qtlsbackend_openssl.cpp:387:10: error: aggregate ‘QDir currentDir’ has incomplete type and cannot be defined tbase/src/network/ssl/qtlsbackend_openssl.cpp:414:13: error: ‘QDirIterator’ was not declared in this scope; did you mean ‘QSetIterator’? qtbase/src/network/ssl/qtlsbackend_openssl.cpp:415:20: error: ‘it’ was not declared in this scope; did you mean ‘Qt’? qtbase/src/network/ssl/qtls_openssl.cpp:1527:34: error: ‘qScopeGuard’ was not declared in this scope qtbase/src/network/ssl/qtlsbackend_openssl.cpp:229:45: error: variable ‘QDirIterator iterator’ has initializer but incomplete type Change-Id: Ibcf4c7731b04f3f4be59d95130e088114f1536df Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Prevent static plugin triggering autogen dependency on reconfigureCraig Scott2021-03-181-7/+15
| | | | | | | | | | | | | | | | | | | | | A call to file(WRITE) will unconditionally update the file's timestamp even if the file's contents don't change. The *Plugin.cpp file was being written using configure_file() which avoids that, but the .cpp.in file it was configuring from was being written out using file(WRITE) every time CMake ran. Autogen saw that file as a dependency and then regenerated the mocs_compilation.cpp file, which in turn results in unnecessary rebuilds and relinking when nothing is actually changing. The file(WRITE) - configure_file() dance is no longer needed anyway, since the generated *Plugin.cpp file is very simple with no substitutions required. Therefore, we can simplify that file's generation with a single file(WRITE) that only executes if the file contents will change or the file is missing. Change-Id: I2b7d1ff678b85ea7811969d656555592c9b6865f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 63a0d263cf233ddf85a60678829298b50e8d1f26) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port away from deprecated QVariant::typeVolker Hilsheimer2021-03-171-3/+3
| | | | | | | | | Use QMetaType instead to silence compiler warnings. Change-Id: Ic28b3406ddcd51935f42779e7708ea8a459d3a9e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5c396be4e3995f8eed2cb54341f3099c35458fa9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qnetworkreply's benchmarkTimur Pocheptsov2021-03-171-3/+0
| | | | | | | Remove the include of qsslsocket_openssl_p.h, it does not exist anymore. Change-Id: I5fc0a06fb381204855634b42f43deb02662746b7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix compiler warnings in 32-bit buildsRobert Löhning2021-03-171-2/+2
| | | | | | | | | | comparison of integers of different signs: 'unsigned int' and 'qsizetype' (aka 'int') [-Wsign-compare] Change-Id: Ia27f79ab4abca8b757b65ef5f1d30151842088fe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit bc5fecf948f0038032d575d640ad4428ffbe89fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Suppress warning (MSVC, C4250)Timur Pocheptsov2021-03-172-1/+11
| | | | | | | | | | | | This design decision was intentional and reflects the fact that we cannot have inheritance tree 'linear' as before, since the base interface is an abstract class without any data-members. Also, fix a warning about size_t -> int implicit conversion. Pick-to: dev Fixes: QTBUG-91866 Change-Id: Icbc73c22d8adf72bbd8949125d4404ea6da69c6d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: make sure to collect Android dependencies for pluginsAssam Boudjelthia2021-03-173-42/+67
| | | | | | | | | | | | | androiddeployqt relies on *-android-dependencies.xml files to know what dependencies like jar files and permissions a Qt module requires. CMake create those files under Qt prefix's lib dir but CMake was not accounting for module plugins. Fixes: QTBUG-90812 Change-Id: Ib3b2e2bb237159b4851ac0f23dc75f8e56af3f7a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit d6367aca869ee30e15a3861b2990baafb9972aa1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mention QPromise in the QFuture docsSona Kurazyan2021-03-161-3/+4
| | | | | | | Change-Id: I5f6930116da534dd1dea41c4724c42104de38877 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 0477f6b15a2d71d47c39e52b5da140d19aa76f31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Stop using QSslConfigurationPrivate inside the plugin codeTimur Pocheptsov2021-03-1612-249/+334
| | | | | | | | | | | | | | | | | | | | It was reasonable while backends were a part of QtNetwork. Now if moving them outside (or just trying to implement a new backend as a plugin), accessing data-members of QSslConfigurationPrivate means that any plugin knows about memory layout actual only for the version of Qt it was built with/for. Instead, we have to use the public class. Since it does not have all needed setters and some data-members have no access at all, we provide an API in QTlsBackend (which stays a part of QtNetwork) that knows the actual memory layout. Task-number: QTBUG-65922 Pick-to: dev Change-Id: I5ca1de4f982b4b11d9a87c4b40413367dcb83c16 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Convert QSslSocket(Backend)Private into pluginTimur Pocheptsov2021-03-1644-2527/+3244
| | | | | | | | | | | | | | All backend-specific code is now separated and removed from QSslSocket(Private) code. The original code is mostly preserved to avoid (as much as possible) regressions (and to simplify code-review). Pick-to: dev Fixes: QTBUG-91173 Task-number: QTBUG-65922 Change-Id: I3ac4ba35d952162c8d6dc62d747cbd62dca0ef78 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* rhi: metal: Stop using BufferOp for no good reasonLaszlo Agocs2021-03-151-6/+8
| | | | | | | | | | | | Do what the Vulkan backend does, and just take the offset and the QRhiBufferData. There is no reason to store a full QRhiResourceUpdateBatchPrivate::BufferOp struct within the backend. Change-Id: I67528029de40320b3e4f031346d40dfc0bb9ab52 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit adf6ba7eaeba97fb2561394e52ee265d94e1c6e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: metal: Skip unnecessary writes when updating the entire bufferLaszlo Agocs2021-03-151-1/+4
| | | | | | | | | | | | Follow the similar Vulkan change in 20eb40bce92c3e5460cd2540547f3c404fe6dccc and drop the queued up buffer data for a given slot when the current update covers the entire buffer. This is relevant in particular for Qt Quick 3D where such dynamic buffer changes are common. Change-Id: If1e70d78968586b552a5357bc97af10cc61d9611 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 0c6375a346551dbf2effb2ea54e1df7de56f0849) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QOpenGLTexture: Fix typo in enum valueLaszlo Agocs2021-03-152-3/+8
| | | | | | | | | Fixes: QTBUG-91431 Change-Id: I59c37de527f53339130216997402f325d0badb12 Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 2cfbce4bc61fd1f450f221e6ce733753f6cabb0b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QMetaType benchmarkFabian Kosmale2021-03-151-3/+5
| | | | | | | | | | The benchmark used to crash because QMetaType::typeName would return an empty string, which is not a legal value for newRow. Change-Id: I9e6c6c1cf153943bfa21181cd2cca596a7943ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 1316af2f3ed7861d0955793261a18f8ebf237f6f) Fixes: QTBUG-91711
* QRandomGenerator: remove dead code previously used by qrand()Thiago Macieira2021-03-151-22/+0
| | | | | | | | | | | Commit 9ee554ac1d1af97e7ad5b4bf78e2779f7d1c405f removed qrand() and qsrand(), so commit 81896304dc1fb65da3302deb54ab4cfe060625ff removed the functions accessing QRandEngine, but forgot to remove the actual engine. Change-Id: I26b8286f61534f88b649fffd166c41aecf55d2b1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 420755edb71267f756df4c61955b910099ec9537) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QMultiHash::count(key) crashAndrei Golubev2021-03-142-0/+19
| | | | | | | | | | | | As QMultiHash uses a pointer for the data, nullptr dereference is a thing, so check for valid d before doing anything in count() Fixes: QTBUG-91704 Change-Id: Ia20440cd7bdc03cb09c77f796fb9c5b52765eac5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f226854d256a382a5cc7ff08b10a0d27fbefb0fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump Apple platform minimum versionsAlexandru Croitor2021-03-125-9/+7
| | | | | | | | | | | | | | | | | | | | | | | Includes both minimum deployment targets and minimum sdk versions. As per supported Apple platforms versions which was done in qt/qtdoc at 8807fdedce29cbbd7662fcd745234da30eace3fb For Qt for iOS 6.0.x we only bump the minimum deloyment target because applications seem to crash with iOS 12.4+, and it's better to have a build error than a runtime error. The minimum required sdk will not be bumped for 6.0.x, so we don't accidentally break someone's existing build, given that 6.0 is already released. Task-number: QTCREATORBUG-23574 Change-Id: I3046384164f2d7fdbd0cfd16dcb85e0d60bc56ce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 4b2035cd0f9a7c289c7a9e470fde83dae9351092) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qtdeclarative now directly handles more qml-specific logicCraig Scott2021-03-123-12/+5
| | | | | | | | | | | | | | | | | | Associated changes in the qtdeclarative repo now ensure that arguments for qml plugins are handled on the calling side. This reduces the qml-specific logic needed in qtbase and gives qtdeclarative clearer control over qml build and install locations. As part of that work, the INSTALL_LOCATION keyword used in qt_internal_record_rcc_object_files() has been renamed to INSTALL_DIRECTORY to make it consistent with the keyword used for the same concept in other commands. Change-Id: Iebd319899f63d79fbe15ce965b84ce324c28a508 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 78a64e310efc9f3e91bda855fa8275caf10bea4f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add hyperlink to relevant sectionv6.1.0-beta2Paul Wicking2021-03-121-2/+2
| | | | | | | | Fixes: QTBUG-91734 Change-Id: I3910c7fcf1625ad08a65e691a8eaf9ed6b61779a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b42df9756a8d72cbdfbf72f15e98385b35148eb6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>