summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix QString::toHtmlEscaped() for >2Gi character stringsMarc Mutz2022-08-061-7/+7
| | | | | | | | | | | | | | More unfinished int → qsizetype porting. Manual conflict resolutions: - _L1 → QLatin1String - but keep the QLatin1Char → u'' changes as a drive-by Fixes: QTBUG-105104 Change-Id: I3470de31c476b3d7736661550916828e43546573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit c1991c63fc081a42ed3e6a28f82f395c54ef42a1)
* macOS: Check m_platformWindow before processing key event after shortcutTimur Pocheptsov2022-08-051-1/+1
| | | | | | | | | | | | Processing shortcut events may result in the window being deleted, so we need to check if m_platformWindow is still valid before continuing with the key press event. Fixes: QTBUG-105160 Change-Id: I9cd362873b19c078a4fced3ac3c815d70bfc7fbe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 6a5cadb9557ebac00b8ddacf623dc38baa716680) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix return type of QLEInteger/QBEInteger post-in/decrement opsJoerg Bornemann2022-08-051-4/+4
| | | | | | | | | | Those operators return a value, not a reference. Fixes: QTBUG-104940 Change-Id: I117892f12d20c6bf32a12f37c1bdfec1817614c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d336cfba8ad740dc812b8987bc04fb9f6da80666) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QStringIterator: fix UB [1/2]: use has{Next,Previous}() moreMarc Mutz2022-08-051-6/+6
| | | | | | | | | | | | | | | | | Replace - pos > i with hasPrevious() - pos < e with hasNext() Everything is inline, so there's no difference in assembly, but less source code lines to fix later. Change-Id: I3f9cf2716c96b811b29b75fa20f88cc3b461771a Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 34800d1f09447e921203561c0e4804c4f095136f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QByteDataBuffer: assert an undocumented preconditionMarc Mutz2022-08-051-0/+1
| | | | | | | | | | | | The alternative would be to return a null QByteArray, but the current implementation makes calling read() on an empty QByteDataBuffer UB, so this is behavior-preserving, just with a bit nicer error message. Change-Id: Ia9db7acbfa47e601b466d6cc6a728859065c27b5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit 011b68d3cd95295890b1ed724aa4331ff5680eed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Statically assert that the __mips_dsp code is only active on 32-bitMarc Mutz2022-08-051-0/+4
| | | | | | | | | | | | | | | | | I was told this is 32-bit-only code in Qt 5, where it didn't really matter, because only QStringView could handle > INT_MAX character strings. Put up a big stop sign now in Qt 6 to enforce that this information is correct, incl. notes for when it turns out it isn't. Task-number: QTBUG-59150 Task-number: QTBUG-103531 Change-Id: I4620a43e2e67776cc67531fa993a7bb8e01cffed Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 753079b7074b06d237a0ae7a58281c28df134fc0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QString::arg() for format strings with a huge amount of placeholdersMarc Mutz2022-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | QString::arg()s placeholders are limited to triple-digits, so 1000 different ones. By the same token, the length of any one of them is bounded to five (%L?\d{,3}). But the total possible length of escape sequences is _not_ 5000B, because there's no limit on the number of _equal_ placeholders, so a format string where the total escape sequence length exceeded 2Gi characters, e.g. QString("%L100").repeated(INT_MAX/5 + 1).arg(42); would produce corrupt data. Task-number: QTBUG-103531 Change-Id: Id27ee02579387efcbb5928de1eb9acbeb9f954c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 15a80cf8a9d59203f8e2b436a5c804197c044807) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port qt_doubleToAscii to qsizetypeMarc Mutz2022-08-053-5/+12
| | | | | | | | | | | | Allows central handling of large buffers. Adjust some callers. Task-number: QTBUG-103531 Change-Id: Ib55974c3de250883cd0f6d11a7eee051c7fd11bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit bd43c245e8c641c3a5c86762647f99658167b4db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port QUtf8BaseTraits to qsizetypeMarc Mutz2022-08-051-2/+2
| | | | | | | | | | | | | It's unclear why the the char8_t overloads have int sizes. At the time 60aa0d086886aea58d6b7a09484645ad1d92a220 added these, the uchar overloads were already using qsizetype. Task-number: QTBUG-103531 Change-Id: I8ed4c5462de29a7d48255e440e34bcd5114755fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit ab512adf12a2ba36b51f36d7c998d1cbdcf6505a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix stringish::simplified() for strings > 2Gi charactersMarc Mutz2022-08-051-1/+1
| | | | | | | | | | | | | | If, after simplification, the result string would have been >2Gi characters in length, the code returned a shorter string, truncated mod INT_MAX, because the algorithm had not been ported to qsizetype. Task-number: QTBUG-103531 Change-Id: I57cfed34e5c69406f8d3f2913962d006b4bc6bd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit ec35efd7f2cea4dcbe0188f0d44cde541803f53e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QString::arg() for format strings > 2Gi charactersMarc Mutz2022-08-051-1/+1
| | | | | | | | | | | | | | The getEscape function truncated the qsizetype position it got from the caller to an int, potentially parsing a previous escape sequence (or, more likely, garbage), by getting the position in the string wrong. Task-number: QTBUG-103531 Change-Id: I3b921c0991d238bbacfe6699c56146fe032134df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 841ff3b73f9951e49b6406007d76302b3f367f55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port QStringIterator to qsizetypeMarc Mutz2022-08-052-8/+8
| | | | | | | | | | | | | | | Most of the API is formulated using iterators, but index() and one of the ctors still used int. Patch users. There appear to be no users of this class outside of QtBase. Task-number: QTBUG-103531 Change-Id: I097ce839d74ff76bd8c1925d09634ffeaaa2fc07 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 4ed2c92bf4d46e6d4c9d8c321a35aa0bfc368fbf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QString::toLatin1() for strings > 16Gi characters on ARM64Marc Mutz2022-08-051-2/+2
| | | | | | | | | | | | More qsizetype truncation to int, this time in the number of chunks in SIMD processing, so the limit isn't 2Gi, but 16Gi. Task-number: QTBUG-103531 Change-Id: Ib584c8dc7aa8dedc1cb8181e7d6f20b582c93f8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 0b5d4c3eae8cd8024bc6e1df6321e2ad5deabb76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QString::vasprintf for strings > 2GiBMarc Mutz2022-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Both format strings > 2GiB, as well as result strings > 2Gi characters were affected by the append_utf8() helper function being left unported from int to qsizetype. There were actually two bugs in that 5LOC function: 1. The len argument was an int, but the caller feeds a difference of pointers (even explicitly cast to qsizetype) to the function, so any stretch of verbatim text > 2GiB in the format would cause the output string to be corrupted. 2. If the result string was already > 2Gi characters in size, a call to append_utf8() would truncate it mod INT_MAX, because the string's size() was stored in an int variable and the used in a resize() call. Task-number: QTBUG-103531 Change-Id: I0a09d27b7782093d3f8ea17bb621ff8dad375072 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit f73833809b87feb4046c7bdc1fedb3b3a14e80ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port qenvironmentvariables.cpp to qsizetypeMarc Mutz2022-08-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | I don't expect environments to allow values or names > 2 Gi characters, so this is just for consistency (int is a code smell these days). As a drive-by, replace QString buffer; buffer.resize(n); with QString buffer(n, Qt::Uninitialized); Task-number: QTBUG-103527 Change-Id: I0e41a6e7e9c44ff1ec22377329735538d5f95181 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c25cc34a05c0838052b9a5d6624336ef2a2ae8ea) Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* macOS: Don't ifdef out code to resolve display name that might be usedTor Arne Vestbø2022-08-051-2/+0
| | | | | | | | | The call to displayName is not guarded by the same ifdef. Change-Id: I169777130ec316a2d2f837621280acb061072501 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit b9a9edc52fd88745f6f45c76e48f1c2e32677e5c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix examples to build as external projects when cross-compilingAlexandru Croitor2022-08-051-4/+35
| | | | | | | | | | | | | | We forwarded the compiler path to the EP but not the flags that might have been set via the CXX environment variable. Make sure to also forward the flags. Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: I0fbf9b595f7885014b1f09d158db52e56a3d5243 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7fb25609a41ab9cc20ddd62e90f30c0536502aef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix Ninja Multi-Config dependency issues for top-level targetsAlexandru Croitor2022-08-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building qtsvg examples as external projects on Windows with Ninja Multi-Config in a prefix build on the CI, the build would fail with an error message like: ninja: error: 'C:/Users/qt/work/qt/qtsvg/lib/Qt6SvgWidgets.lib', needed by 'RelWithDebInfo/svgviewer.exe', missing and no known rule to make it This can be reproduced locally on Windows if one calls 'ninja svgviewer' instead of just 'ninja'. I wasn't able to reproduce it on macOS, although I have seen some peculiarities in the dependencies there as well. External project examples depend on the ${repo_name}_src custom target to ensure all Qt modules are built, so one would expect that dependency to be sufficient. While trying to figure out what's going wrong, I noticed that running 'ninja -t query qtsvg_src:Debug' showed dependencies on Release libraries, which should not happen. The :Release target looked fine though. I'm still not quite sure why the Release libraries are not built on the first ninja run, despite the example having a proper dependency on qtsvg:Release. Running 'ninja svgviewer' a few more times ends up succeeding at one point, because the SvgWidgets Release library does get built in parallel with the failing example, and the next rebuild would succeed. While trying to fix the :Debug target to have proper dependencies, I noticed that we add dependencies to the ${repo_name}_src custom target via the DEPENDS option of add_custom_target(). That is incorrect, that option should only be used for file level dependencies. For target dependencies, add_dependencies should be used. Doing that fixed both the :Debug dependencies as well as the Windows issue, which is good enough for me. Amends 08f46bb40075778e89ba9aed3cef53d990852022 Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: I1888681e2e9362d3237acbdacc83222d6a60b48e Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0e2f218ee7b7ff96cc227f743aa6df11b86a74fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* eglfs: Fix crash when painting the mouse cursor in a multiscreen setupDominik Holland2022-08-051-5/+5
| | | | | | | | | | | | | | | | | Always make sure to initialize the OpenGL functions. Instead of relying on the shaderprogram initialization, which is bound to the current context, check for the d_ptr and initialize when not already done. With this fix QEglFSCursor::draw works regardless of which context is current and checking for that is not needed anymore in paintOnScreen. This is important as the basic render loop only uses one context for painting on all screens, while the threaded render loop uses multiple contexts. Change-Id: I4ac2f5184c2fce27421e92efe1b7f635c71c0e92 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit f9eb2a7bdb9c86166848b3ff96ac7e055a8f567b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix generation of the forward header for QFunctionPointerSona Kurazyan2022-08-052-1/+4
| | | | | | | | | | | | | | | The forward header for QFunctionPointer was being generated by accident, apparently syncqt is confused because of some of the preceding lines. If the lines are rearranged or removed, the header won't be generated. Not sure if there's much value in generating a header for it, but at least one of Qt sources (qeglfsemulatorintegration.h) is using it in an include statment, and there's a chance it's used in the user code as well. Change-Id: Iced505881ddb07e7a8336fcdfb7d3e5397c6466c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8b2145463b38291dfa0ca2acf4a85552b7383a60) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* update function argument of SSL_CTX_set_optionsMichael Saxl2022-08-054-7/+12
| | | | | | | | | | | | | openssl3 uses uint64_t for the options argument in SSL_CTX_set_options, older ones used long. sizeof(long) is not the same on any platform as sizeof(uint64_t) Fixes: QTBUG-105041 Change-Id: If148ffd883f50b58bc284c6f2609337d80fb5c58 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit e995bfc0ea783c15bb173f060099ca24f277c763) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QStringIterator: fix UB [2/2]: use std::less to compare pointersMarc Mutz2022-08-051-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The relational operators <, >, <=, >= do not form a total order for pointers. In particular, they are only defined for pointer pairs that point into the same array (incl. one past the array's last element). Other uses are undefined behavior. The iterators the class works on are user-supplied, so we cannot assume that they are pointing into the same array. In fact, we have a check in setPosition() that tries to catch such misuses, but similar checks are absent from the ctors, e.g. In addition, the implementation itself is checking for next-but-one and prev-but-one in an unsafe way. std::less can be used to provide a total order, so use that everywhere. Change-Id: I32fb0ef9f768d9336ae12cc0542ca18d1bf23adf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 7cf2684e6a11892975946bd57d8cf672fe6dd43e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Explicitly disable bitcode for iOS applicationsTor Arne Vestbø2022-08-051-0/+20
| | | | | | | | | | | | | | | We disabled building Qt with bitcode in e27a0d5a0f8818653ff125409db81, but the default in Xcode 13 is still to build applications with bitcode, leading to build issues when built against a non-bitcode-enabled Qt. For qmake we already explicitly disable bitcode, so do the same for CMake. Change-Id: I3fd542373c3e1326eb1088a173e70955e61ff608 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1d6ce38a826a7ee18165b4994175c1d5479fd90f) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qYieldCpu() for ARM < ARMv7Marc Mutz2022-08-051-1/+1
| | | | | | | | | | | | | | Apparently, we still support these architecture versions, and there's no way to detect ARMv6k-or-greater specifically, so exclude yield for ARM < ARMv7. Amends 877c158c5976bebffd0ff02c39b6b66a842c6344. Fixes: QTBUG-104316 Change-Id: I51a2f0f8e0993dba41e47bb6110473ac8e7cd32a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8128abeaece5b05476f79ff493597b838b223512) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QFocusFrame: fix -WparanthesesMarc Mutz2022-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Says Clang 10: tst_qfocusframe.cpp:73:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>()); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] tst_qfocusframe.cpp:73:28: note: place parentheses around the assignment to silence this warning QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>()); ^ ( tst_qfocusframe.cpp:73:28: note: use '==' to turn this assignment into an equality comparison QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>()); ^ == Amends f1812aad895ed2b8337a6d98d05623714680aba9. Change-Id: I3920ab0da725b76fb6c19bbc7cde7920f351af4a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit a17d6f869b8f56213ab2292cdc491d28e4dc3f9b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add keyword msvc-2022 to testlib blacklistingOliver Wolff2022-08-041-1/+3
| | | | | | | | Change-Id: I04942dc9474fd2abfc341a1dd6434f7c78b6b5bd Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9a5ac4bcb35e1d30bbd9acaf74fa7a581983ee66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove if_types.h workaround for watchOSTor Arne Vestbø2022-08-042-24/+0
| | | | | | | | | | watchOS is no longer supported, nor should the workaround be necessary anymore. Change-Id: Id5898d14b10e8f4aeaf6ce42ab39dbfdff9338ef Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 8669949f0df98610d9e4ce71cb80368357cd78ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtHttp: Lower the severity of some log outputMårten Nordheim2022-08-041-5/+4
| | | | | | | | | | | | | | | The output was only printed if the request was no longer available queued, meaning that it had been removed before the socket had finished its connection attempt. That means the result of the attempt is not of much interest to the user so we should not print it out as a warning. The reason for why the request was removed from the queue would be the interesting bit, but it's not covered here. Task-number: QTBUG-85248 Change-Id: Iac483b8bb600e1577fe88c3699e46d50615bfccb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 373285857f5b68537db48244d61de3f755b0d95f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* moc: handle attributes in class declarationsFabian Kosmale2022-08-032-1/+4
| | | | | | | | | | | | | We already had code to handle attributes on funtcions, but we didn't handle them correctly for classes so far. Fix this by simply skipping over the attribute. Fixes: QTBUG-105310 Change-Id: Ic4149f940e74820de4f2fa9540d9dc5b4e626a3a Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 84ab6c1aa1fe4051edb9f96714f0f691d639b725) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix single standalone tests to use same Qt C++ language stdAlexandru Croitor2022-08-032-1/+5
| | | | | | | | | | | | | | | | | | When using qt-cmake-standalone-test, we didn't tell CMake to use the same C++ language standard that Qt used when it was configured. We did tell CMake to do that when configuring tests with qt-internal-configure-tests via the qt_build_tests macro. To ensure the proper standard is set, we also need to find_package(Qt6Core), because the std flag is derived from the QT_FEATURE_cxxyz flag which is set by Core. Change-Id: Ia41f2a24983ddab0107a6446743f7b054df8c033 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit effd6f63f1a4b7dc7b5e6bca41594f1d1562a713) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update SQLite to v3.39.2Andy Shaw2022-08-033-5775/+10259
| | | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated SQLite to v3.39.2 Fixes: QTBUG-103675 Change-Id: Ic75ffacc53cf17c08e328921dcc0f7abe09ed1ac Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 41c4f9a47ad8fdd3d7ee645b6fa821ad416b2b43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSysInfo::prettyProductName(): add missing macOS product namesYuhang Zhao2022-08-031-2/+9
| | | | | | | | Change-Id: I9163917187b7a4cbf48e443303313b25473b229f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 870cfa4e17c42698b77504cfc19728acfbf7d659) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Relax constraint on not having feature values changeAlexandru Croitor2022-08-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if qtbase was built with feature A set to ON, then building qtsvg, then rebuilding qtbase with feature A set to OFF, trying to build qtsvg would fail with an error message at configure time saying that the feature value has changed. This check was added quite early in the Qt CMake port, presumably to catch accidental reconfigures that might cause long rebuilds. This has dubious benefit though. We constantly had people telling us they get the error without knowing what to do. The usual advice was to remove CMakeCache.txt and reconfigure. Instead of forcing people to suffer this dance, relax the constraint by issuing a warning instead of an error, and make it more clear why a rebuild might happen (a changed feature value might change the generated module C++ header file which in turn might be included by various project sources). Amends 20633d97abed0f6025572f87c9359272b4713384 Fixes: QTBUG-95834 Change-Id: I992bd61024958869f3b995471b4c7ff75e3a33a0 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 15117f84bb9a5fd191105b2a4d8ebafc6c819fb9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGtk3Theme: Respect xcb_xlib config optionIlya Fedin2022-08-032-0/+7
| | | | | | | Change-Id: I4b01a694e8a13a6f009296d8ccfa8f8eb21043e4 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit dbe858bf80f554c4d916ee230fc9dcde01699bd7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: gl: Reset the buffer bindings on beginExternalLaszlo Agocs2022-08-031-1/+7
| | | | | | | | | | | | | | | | | | | | Play nice with old renderers like the OpenGL paint engine for QPainter. When combining Qt Quick and QPainter targeting the same GL window, calling QQuickWindow::beginExternalCommands() is not currently sufficient to ensure problem-free operation, it also needs a QQOpenGLUtils::resetOpenGLState() afterwards to get rid of the buffer bindings. (which is important when using legacy code with client-side vertex arrays) Which in turn is not what the documentation promises, so resetting the bindings is now ensured on the rhi level when Qt Quick calls beginExternal(). Fixes: QTBUG-104801 Change-Id: Ibd82753996768aad0118bff87d4e1f8bcc388c58 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 4fdadd2348eb2c952650fbd8b9e5d18ed41405dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* eglfs: Fix screen cloning when atomic is enabledLaszlo Agocs2022-08-031-5/+6
| | | | | | | | | | | | | The problem was introduced in the atomic code path only, the legacy one has always specified the correct crtc id. Amends 56149c0fbb19946050a3249acef4e86e511d3cd4. Change-Id: Ie3a99ec4bc24901e1303631097a395fde8dbe110 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 61806a058a17e35f082dfbf59719a9216b2aebf7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qUtf16Printable: avoid creating a copy of a QStringSona Kurazyan2022-08-031-1/+1
| | | | | | | | | Amends daa7f5375c58464bbe92744599f1e2258445e259. Change-Id: I569efc4556341bfbce452bdf169c50a3b4be9ca7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 357db9ceabddcdce95ee1bc7f534eb00e6e10bad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGtk3Theme: Ensure gtk uses the same windowing system as QtIlya Fedin2022-08-011-0/+9
| | | | | | | Fixes: QTBUG-69354 Change-Id: I254c5bf98bc3b2cc2577159e475a2105438bb96b Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 3d45f23b022878444454ec1a47c25678b88868c6)
* Fix race condition with QTest::ignoreMessageAndré Klitzing2022-07-301-0/+9
| | | | | | | | | | | | If another spawned thread will log at the same time a crash was possible because IgnoreResultList was not thread-safe. Task-number: QTBUG-104840 Change-Id: I251c83bb28cb75e55d477706bf2524c061a6eab7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit d1dd9442392f3a1ab90a081bc58a84444a7a64c6) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build with missing qml-root-pathAndré Klitzing2022-07-281-1/+1
| | | | | | | | | | | | | | Commit 42d0089d44bec5628884d8cf6bf2b910a298a141 added support for multiple root paths. This works fine but it also added "options->inputFileName" as fallback if nothing was provided. The inputFileName cannot be used as root path (directory). So let's use absolutePath() of that file. Change-Id: Id76a2cd79a82966bdac8240644b3c03ac4248066 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 7da51c14d9fba59288535d0a5acca5a6479f18a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "CUPS: Add support for accessible IPP printers"Volker Hilsheimer2022-07-281-5/+2
| | | | | | | | | | | This reverts commit 2f5f276b4a2a19b9f2669b84f28ce8e970aaa39f, after which valid printers are no longer listed anymore. Fixes: QTBUG-105242 Change-Id: I6a388acff2a8033ad1052319edcf7e41a2f72c8f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit f387bb55d4060c6bfac0cd6da736c80dd9a47066) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit)Axel Spoerl2022-07-271-5/+8
| | | | | | | | | | | | | | | | | | Drawing PE_PanelLineEdit in QStyleSheetStyle with the default argument widget = nullptr causes a segfault. drawPrimitive tries to fall back to a container widget's render rule and therefore calls containerWidget() - which crashes when called with nullptr. Container widget fallback is pointless when drawPrimitive() is called with widget == nullptr. This patch skips it in that case. Fixes: QTBUG-104917 Change-Id: I09e57dccfebb81a308944c233846d5b9ef58819e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit effc8be3ce848770a093d51d5651908c375e83f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Make sure qtbase examples are installed into the correct pathAlexandru Croitor2022-07-273-6/+6
| | | | | | | | | | | The find_package calls need to happen after we set INSTALL_EXAMPLEDIR to ensure that INSTALL_EXAMPLEDIR is overridden if necessary. Task-number: QTBUG-102879 Change-Id: I3c2e6c5a68a8c6ff9b98b79dbd6c83445d8da052 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 818a15234c8fb80cd9adad54bd726cf69726fa79) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix install destination of in-tree examplesAlexandru Croitor2022-07-272-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we called _qt_internal_override_example_install_dir_to_dot in Qt6CoreConfigExtras.cmake as part of a find_package(Qt6 COMPONENTS Core) call, and we assumed that the Extras file would always be included in each example project. But our package dependencies handling code skips calling find_package(Qt6Core) if Qt6Core_FOUND is already set to TRUE, which will definitely happen due to root-scope find_package calls when configuring other repos. That means we wouldn't override INSTALL_EXAMPLEDIR to "." and the install destination would end up being something like ${CMAKE_INSTALL_PREFIX}/example_relative_path/example_relative_path aka a double nested path. Make sure we call the _qt_internal_override_example_install_dir_to_dot function in Qt6ConfigConfig.cmake in addition to Qt6CoreConfig.cmake. That way, even if Qt6Core is skipped during dependency resolution, it's still handled by the Qt6 package itself. Because the function is defined in the Core package, guard the call with an if(COMMAND) and only call the function if it wasn't previously called within the current or ancestor scopes. Amends ac4a913f333561803003650817de453f43be924d Fixes: QTBUG-102879 Change-Id: Id47e3ce06faec6d156ae1473942dae0f9b90cb46 Reviewed-by: Christophe Giboudeaux <christophe@krop.fr> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 0e0352ab4d38ca31bb8e488783e35c2f8955e540) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QMetaType: merge flags and flagsStaticlessThiago Macieira2022-07-263-53/+52
| | | | | | | | | | And rewrite them with templates. QMetaType::typeFlags() simply calls flags() anyway. Change-Id: I3859764fed084846bcb0fffd170323f9d8c80466 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit aae882b02f346740f5a6b6d8b4d2bcf7f90bdc09) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: prepend build dir for examples buildSamuli Piippo2022-07-261-6/+6
| | | | | | | | | | | | | In cross-compilation, the CMAKE_FIND_ROOT_PATH will have path to the host Qt and examples build will pick up wrong Qt6Config.cmake unless the build dir path is prepended. Fixes: QTBUG-104270 Change-Id: I7fc7499369a2e5446e1c5257155f81c72716fef7 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 18ed6a8979a1f1910f1285b5b2e5a28c397b37aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: include the libexecdir in generated pkg-config filesEli Schwartz2022-07-261-0/+1
| | | | | | | | | | | | | | | | In Qt6, the installed tools can be in one of two different locations, depending on whether it is considered a helper or not. This means that when migrating from Qt5 to Qt6, the pkg-config files no longer reliably described where to find tools such as moc, uic, and rcc, which third-party projects need to know about in their build systems. Add this information in, to match qmake -query and Qt6CoreConfigExtras.cmake Task-number: QTBUG-105051 Change-Id: I6692a76e0491a1c5e28982aa5fbe8b8aec8dec56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit d8f9ac784e919064ab2620a3bd77794d6e730c9a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Make tst_qdbusabstractadaptor depend on qmyserverAlexandru Croitor2022-07-261-0/+1
| | | | | | | | Change-Id: I8a38c6e2de7639ac8cd07e36a4f6d79830d34dc8 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Dimitrios Apostolou <jimis@qt.io> (cherry picked from commit 84c9a79a69f05bcc42bdd68ad3e5708fa14116e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Ensure build instructions are always shown the first timeAlexandru Croitor2022-07-261-1/+8
| | | | | | | | | | | | | Regardless of the current log level. Somewhat similar to dd5c860a7b5f5bf347b698b9145c45d369325e42 Amends e2a0ddbb69640c94b4ee107260a088d5c1c7e273 Change-Id: Ib7bc87f07e195125c858dcece2df6e82303dd01c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 12629c6b808e476b474e6db98ae5ded64f5fc44f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Include the QRegularExpression porting docs in Qt 6 porting guideSona Kurazyan2022-07-261-245/+6
| | | | | | | | | | | | | | | | | | | The instructions for porting away from QRegExp to QRegularExpression in the Qt 6 porting guide were mostly copied from the similar docs for QRegExp, which are moved to doc/global/includes/corelib/port-from-qregexp.qdocinc. The later now covers everything that the docs from porting guide did and doesn't have the issues listed in QTBUG-89702. Remove the old docs and include the docs from doc/global/includes instead. Task-number: QTBUG-89702 Change-Id: Ifdb79d5775bc0cadd02c21299d58adb27ae13337 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 93f7291387c03367e828b16299ddcbaf1f804e25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>