summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix "see also" linkHEADdevDavid Boddie20 min.1-1/+1
| | | | | | Pick-to: 6.9 6.10 Change-Id: Ib0dea34c435d48e8d2188bbdd7492d5fd20d738e Reviewed-by: Fabian Kosmale <[email protected]>
* Cocoa: make headers self-containedTim Blechmann20 min.7-2/+16
| | | | | | | | | | | Clang-based IDEs like QtCreator try to parse the headers in isolation and warn if some types are not defined. Including the required headers makes the codebase more robust. Task-number: QTCREATORBUG-33334 Pick-to: 6.10 Change-Id: I7819d0ca947a7c857a49d85ce3076d4e965afa72 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Cocoa: add tracing to removeFromSuperviewTim Blechmann21 min.1-0/+1
| | | | | | | | | QNSView has tracing for all reparenting methods except for removeFromSuperview. Adding it helps a bit with debugging. Pick-to: 6.10 Change-Id: Ib3443431b30b5a25b5743ae1b10bf9ac95471e4d Reviewed-by: Tor Arne Vestbø <[email protected]>
* Introduce UseToolchainFromTargetDir feature for tests that are built at test ↵Alexey Edelev21 min.2-11/+21
| | | | | | | | | | | | | | | | stage The feature allows controlling which toolchain should be used when building tests. Since WoA supposed to build tests using the crosscompiled Qt in native host environment, this option allows preparing the correct build environment and use the crosscompiled 'target' Qt. Drive-by change the way prefix.bat is called for native WoA configuration. Pick-to: 6.10 Change-Id: Ifec7593b4216ee2e2ffe185ae0dc0559d501762b Reviewed-by: Alexandru Croitor <[email protected]>
* Avoid hardcoding the crosscompilation requirements when building WoAAlexey Edelev21 min.1-4/+17
| | | | | | Pick-to: 6.10 Change-Id: Id725bb5ab404d9fb7f644896434ae1afc4ca4ef2 Reviewed-by: Alexandru Croitor <[email protected]>
* Consider cross compilation when detecting host tools requirementsAlexey Edelev21 min.1-1/+3
| | | | | | | | | | | | | | | | | If Qt is crosscompiled it's not necessary that it always require host tools to compile the application. That's why the pre-stored assumpion in Qt6Dependencies.cmake is incorrect. When moving the Qt toolchain to the target platform, this Qt becomes the native toolchain for this platform, so the requirement is incorrect since this moment. The detection should consider the CMAKE_CROSSCOMPILING flag and put the host tools requirement only in this case. Also if user predefined QT_HOST_TOOLS it also makes sense to require them and look for the Qt6HostInfo package. Pick-to: 6.10 Change-Id: I4c715eb2592ce79565787645aac172ff60b91493 Reviewed-by: Alexandru Croitor <[email protected]>
* Upgrade Harfbuzz to 11.4.1Eskil Abrahamsen Blomfeldt21 min.69-1530/+2140
| | | | | | | | | | [ChangeLog][Third-Party Code] Upgraded Harfbuzz to version 11.4.1. Pick-to: 5.15 6.5 6.5.10 6.8 6.9 6.10 Task-number: QTBUG-139288 Change-Id: Iae118af070490a048870c70459b1f59851c4bafa Reviewed-by: Eirik Aavitsland <[email protected]>
* Handle top-level Tool windowsAllan Sandfeld Jensen3 hours3-13/+14
| | | | | | | | | | | | Undo most Qt::Tool and Qt::Popup overlap, and keep just basic logic of dealing with transientsParents and positioning. Amends 4eba0b5305a585e4454e1935bd93b8e1b3b71681 Pick-to: 6.10 Fixes: QTBUG-139250 Change-Id: I0ea4275740f41b54f0604fced86ec828919c3ae7 Reviewed-by: David Edmundson <[email protected]>
* Fix QRegion ifdef inconsistenciesTasuku Suzuki4 hours1-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary platform guards that caused inconsistencies between header and implementation files: 1. Remove dead code for operator+=(const QRect&) that was guarded by #if !defined(Q_OS_UNIX) && !defined(Q_OS_WIN) This condition is never true since all platforms define either Q_OS_UNIX or Q_OS_WIN. Even if such an environment existed, this fallback implementation would work, but the build would fail anyway due to missing implementations of QRegionPrivate and core constructors that are incorrectly guarded by the opposite condition. 2. Remove #if defined(Q_OS_UNIX) || defined(Q_OS_WIN) guard around QRegionPrivate and related implementations (lines 1066-4320). This condition is always true, but the header file declares these unconditionally. If this guard were false, it would cause linker errors for all QRegion constructors and methods. These changes ensure header and implementation files are consistent and eliminate dead code. Pick-to: 6.10 6.9 6.8 Change-Id: Ibd3caddfd68273a091b11d0a40909d0e44eb6947 Reviewed-by: Marc Mutz <[email protected]>
* QQuaternion: fix SiC in fromEulerAngles() overload setMarc Mutz4 hours3-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before ba21e89c2f7b3e162cffa8a716ca3d835b8c9bd4, fromEulerAngles({-90, 0, 0}) would call the QVector3D overload of fromEulerAngles(). After said commit, the call was ambiguous, because the unnamed braced initialization could init a QVector3D as well as a QQuaternion::EulerAngles. While this is technically allowed, because unnamed braced initializer arguments don't enjoy SC protection (otherwise a user passing {} would block any overload being added), we can, as Fabian pointed out, fix the SiC in this case by marking the QVector3D overload as Q_WEAK_OVERLOAD. We need to mark the old one, because that one is only conditionally available and because we want to default to the newer API. This changes the mangling of the function, which matters because this non-polymorphic class is needlessly exported (though pre-programmed to not be anymore in Qt 7), so we need to switch the Q_WEAK_OVERLOAD on and off for removed_api.cpp to maintain BC. Move the definition of the function into the class body because we don't have a Q_WEAK_OVERLOAD_IMPL to slap in front of the out-of-body definition. Amends ba21e89c2f7b3e162cffa8a716ca3d835b8c9bd4. [ChangeLog][QtGui][QQuaternion] Added fromEulerAngles() overload taking the new EulerAngles struct as an argument. Done-with: Fabian Kosmale <[email protected]> Task-number: QTBUG-138199 Change-Id: I64481b017073fb01e9a023e5dd47c8c66d4dcafc Reviewed-by: Volker Hilsheimer <[email protected]>
* Revert^2 "QQuaternion: long live EulerAngles / eulerAngles()"Marc Mutz4 hours3-8/+111
| | | | | | | | | | | | | | | | This reverts commit 35cdc0cb834535a5ae339164a01fcbfda73a12d5. Reason for revert: The original change was correct. Users can't expect SC if they pass untyped braced initializers to Qt functions. If we had to maintain SC for such calls, we could never add new overloads (someone could pass `{}`, after all). This is similar to taking the address of a Qt function: you have no protection if you don't cast to a particular type of function pointer. Task-number: QTBUG-138199 Change-Id: Ice1f40cbd2bc0fbd97a11aa8d72580f1225db9fb Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* QString: fix unintended copy in asprintf() returnMarc Mutz5 hours1-1/+1
| | | | | | | | | | | | | | | | | | | On GCC, this function is NRVO'd, but depending on the definition of va_list, a compiler may be unable to NRVO this function, in which case the const on 's' prevents the implicit return by move. Found by Coverity. Fix by dropping the const. It doesn't hurt readability in such a short function, shuts up Coverity, and may improve codegen on some platforms. Amends d251cae7b7370af328307948aca9bb63def22fe4. Coverity-Id: 474158 Pick-to: 6.10 6.9 6.8 Change-Id: I4f842f690ea45c8db4c02f32f858d2700f57d128 Reviewed-by: Edward Welbourne <[email protected]>
* QXmlStream: don't use Structured BindingsMarc Mutz5 hours1-4/+4
| | | | | | | | | | | | | | | | | | | | | Decoder::operator() already returns a proper struct with named members, so decomposing that using SB can do no good, except introducing a dependency on the order of the struct, which is counter-productive. Fix by receiving the result in a proper variable and using the struct's member names. Amends 53622aca2ad0d13bd16d8307dc28f915c8878b75. The idea may have been to avoid churning the surrounding code, but follow-up c08766abf2267f4eeda159c5688309d22d319722 touched all lines using the result, anyway, so we don't need SB anymore to keep the old names. Pick-to: 6.10 Change-Id: I2890754c2c2189cc2fa395f4500ca6c3cb115d7d Reviewed-by: Edward Welbourne <[email protected]>
* QByteArray/QString: fix a few unintended copiesMarc Mutz5 hours2-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In reallocData() and reallocGrowData(), when we create a completely new QArrayDataPointer, we merely copy-assigned it to this->d in the end. This needlessly ups and downs the atomic ref-count, so use a swap() instead. Found by Coverity, which wants us to use std::move(), but I believe the QtCore maintainer would prefer the swap here, so use "C++98 move". Amends - 20041afe3bdb3d3476c02897b8da288cba6011f4 QByteArray::reallocData() - 287ace562ee5ddff22f7dbf4e49ae5f0520f2308 QString::reallocData() - 4b9ec005340ac0d8aa103009c0f8ceda623de8cc QByteArray::reallocGrowData() - a2b1b0292d3d9909a690ba701f0a447cdf1a66fa QString::reallocGrowData() Pick-to: 6.10 6.9 6.8 Coverity-Id: 425077 Coverity-Id: 425941 Coverity-Id: 426231 Coverity-Id: 427184 Change-Id: I037f38c6541068b91b55343a20f149a772ba79c0 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* qvsnprintf: fail if the result size doesn't fit into an intMarc Mutz5 hours1-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code silently truncated the return value of the fallback implementation. This is dangerous, as the caller might rely on the truncated value to confirm that everything was written when it actually wasn't, incl. trusting the return value to allocate a buffer of a size dependent on the result and then strcpy()ing the data over (which would overflow the target buffer, since the NUL byte is actually at `n` and not at `result`, as the function post-condition would require for a result < n. POSIX specifies¹ that errno be set to EOVERFLOW and -1 be returned, so do that. As a drive-by, replace use of qMin() with std::min() (which statically asserts that both arguments are of the same type, unlike qMin(), which performs integral promotion on the arguments). Use qt_saturate() for now, because 6.5 doesn't have q26::saturate_cast(). A follow-up patch will clean this up for 6.8...dev. [ChangeLog][QtCore][q(v)snprintf] Fixed a bug that would cause q(v)snprintf() to report success on some platforms, even though the result was truncated. Amends the port of Qt containers from int to qsizetype. Didn't check for a particular commit, because a) it's probably several that apply and b) they are so much older than the currently active branches that I didn't feel I need to be more specific than, essentially, "Qt 6.0". ¹ https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html Fixes: QTBUG-138860 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I6de8a99c238539a535462e964a0645bd0c704fff Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* QTextEngine: Pass expanded context to HarfBuzz for shapingJonathan Clark10 hours2-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when laying out text using harfbuzz-ng, QTextEngine would only populate the HarfBuzz buffer with the substring associated with a single item at a time - in effect, semantically breaking the string at format boundaries. While this approach doesn't have obvious effects for some languages, it can make text illegible in languages that have different character forms depending on word position (such as Arabic). This change updates QTextEngine to instead pass the full string to HarfBuzz. By doing so, HarfBuzz can inspect the contents of the string around the current item, and substitute the correct characters at the item boundaries. Note that this change isn't a complete fix for QTBUG-54350. In particular, ligatures will not form across item boundaries, which may cause incorrect text rendering in some situations. However, this fix should address some of the more painful cases, such as label mnemonics breaking Arabic text rendering. [ChangeLog][Text] Improved text shaping with mnemonics in certain languages, such as Arabic. Pick-to: 6.10 Fixes: QTBUG-93371 Change-Id: I3639e50b809269836cd5480609d22328f9deaf82 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* tests: buffer overflow warning in wayland reconnect testLu YaNing11 hours1-1/+1
| | | | | | | | | | | | The display_name buffer size was insufficient for the maximum possible output of snprintf with format "wayland-%d". The compiler warned that output could be 10-20 bytes but the destination buffer was only 16 bytes. Increase buffer size from 16 to 32 bytes to accommodate the worst case scenario (e.g., "wayland--2147483647") and provide safety margin. Change-Id: Id980a0d897f06d1a0c1f2cb2afba9f6cd36c2988 Reviewed-by: David Edmundson <[email protected]>
* QChar::isSpace: optimize by lowering the upper limit checkThiago Macieira14 hours3-3/+14
| | | | | | | | | | | | | | | | Of all the Category categories, separators are the only to currently have assigned codepoints exclusively in the BMP. This allows us to lower the maximum check from the LastValidCodepoint to category-specific one. This will also cause the compiler to dead-code eliminate the check inside of qGetProperty and emit only the BMP check of the property tables: if (ucs4 < 0x11000) return uc_properties + uc_property_trie[uc_property_trie[ucs4 >> 5] + (ucs4 & 0x1f)]; Pick-to: 6.10 Change-Id: I31eda5d79cc2c3560d90fffd74a546d1e7cda7bb Reviewed-by: Edward Welbourne <[email protected]>
* QLocale: fix unintended copy [2/2]: QCalendarBackend::dateTimeToString()Marc Mutz16 hours1-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complained that 'text' was copied when it could have been moved. This is correct, but not trivial to understand: If, in a ternary expression, one of the legs is an rvalue and the other is an lvalue, then the ternary expression is also an rvalue. So the return statement invokes the QString move constructor. But, of course, the lvalue isn't being moved from in this case. Instead, lvalue-to-rvalue conversion materializes a temporary QString as a copy of lvalue, and _that_ is moved instead. This is what happens with 'text' and why Coverity complains about a copy. Note that this is purely due to the use of the ternary: If we write a normal if, then the lvalue leg returns a local object and we get a move from it for free. In fact, the structure of the lambda is such that NRVO should kick in, so neither copy nor move, but direct construction into the caller-supplied storage of the return object. To fix, rewrite the code using a normal if statement, taking care to not break the NRVO the rest of the function so carefully tries to maintain. This likely also fixes CID-469957 where Coverity complains that this lambda's implicit auto return type causes a copy and - incorrectly! - suggests to explicitly return const QString& (which would return a reference to a local object). Amends 1b909695a66500b3cceb0fee668b12a663ed3b8b. Coverity-Id: 469949 Coverity-Id: 469957 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ia858fd6bddbb51d824b29b0e60d26c18c1c7fb5d Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QLocale: fix unintended copy [1/2]: rawStandaloneMonthName()Marc Mutz16 hours1-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complained that 'name' was copied when it could have been moved. This is correct, but not trivial to understand: If, in a ternary expression, one of the legs is an rvalue and the other is an lvalue, then the ternary expression is also an rvalue. So the return statement invokes the QString move constructor. But, of course, the lvalue isn't being moved from in this case. Instead, lvalue-to-rvalue conversion materializes a temporary QString as a copy of lvalue, and _that_ is moved instead. This is what happens with 'name' and why Coverity complains about a copy. Note that this is purely due to the use of the ternary: If we write a normal if, then the lvalue leg returns a local object and we get a move from it for free (NRVO isn't possible, because it's not statically known which of the two possible objects will be returned. To fix, rewrite the code using normal a normal if statement. Amends aa8393c94fea01a4806b204fd3aa343a4e90666b. Coverity-Id: 425487 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ia85346afc50d8a2a1abf8a5f079280c787cd964a Reviewed-by: Edward Welbourne <[email protected]>
* QCalendarLocale: move switch over QLocale::FormatType into accessorsMarc Mutz16 hours2-35/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before, each user of QCalendarLocale was performing the switch by themselves. Even though there was only one user each of month and standalone month, their switch statements were buried in larger functions and contained a default case label with the return from the surrounding function. The default was necessary, because running off the end of the switch was normal operation, but it destroys -Wswitch. Instead of wrapping the switch in a lambda, realize that these switches were also the only users of the fine-grained accessors of QCalendarLocale and move the would-be lambda there as a member function. This means we now have functions containing only one switch each, so we can return from each case label and falling off the end of the switch statement is unreachable. This removes the need for a default case label, re-enabling -Wswitch. It also allows to mark the DataRange objects const in the callers. Found as part of fixing Coverity issue 425487. Amends aa8393c94fea01a4806b204fd3aa343a4e90666b. Coverity-Id: 425487 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: If1dd16f11b96372f00dc4469fd6b12f835bc7877 Reviewed-by: Edward Welbourne <[email protected]>
* tst_QQuaternion: add some more Euler angle testsMarc Mutz16 hours1-0/+9
| | | | | | | | | | | | | | In particular, `xonly-opposite` is there to verify that a replacement of a static const QQuaternion::fromEulerAngles(-90, 0, 0) in QQuick3D (which is a runtime initialization because fromEulerAngles() isn't constexpr) with a direct constructor call (which is a compile-time constant) is equivalent. The others are for symmetry. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I20236d7b43680611daa298c5a3266179dd2d2167 Reviewed-by: Edward Welbourne <[email protected]>
* qTzName(): fix -ftrivial-auto-var-init=pattern performance regressionMarc Mutz16 hours1-0/+1
| | | | | | | | | | | We don't need the compiler to write half a KiB of stack memory here, so add the opt-out macro. Amends 9ff1e6d80bbd5b44b9ec4c0a837d9a4c962698e4. Pick-to: 6.10 6.9 6.8 Change-Id: I0138bf30b451bbfeaa20582298f5cadaa85a938f Reviewed-by: Edward Welbourne <[email protected]>
* qTzName(): eliminate some code duplicationMarc Mutz16 hours1-5/+2
| | | | | | | | | | | | | | | | | Commit f6f68d5f8d494c313d284a8f6aa86c865a7c3611 brought the function into a form where the _UCRT and non-_UCRT paths share a common prefix and suffix (the establishing and ending of the critical section). This commit takes advantage of the new form to extract the common affixes from the platform-dependent sections, avoiding repetition. Amends said commit. Pick-to: 6.10 6.9 6.8 Change-Id: I562bfdfa0a64861003d3a5de85ba3be878e24184 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Giuseppe D'Angelo <[email protected]>
* qTzName(): fix UB (calling strlen(nullptr))Marc Mutz16 hours1-1/+1
| | | | | | | | | | | | | | | | | | | Coverity complained that that we're calling strlen() before checking its argument for nullptr. Calling strlen(nullptr) is UB, so guard the call manually. An alternative would be to use qstrlen(), which can explicitly handle nullptr, but this is very low-level code, so we should probably stick to the bare metal here. Amends f6f68d5f8d494c313d284a8f6aa86c865a7c3611. Pick-to: 6.10 6.9 6.8 Coverity-Id: 487584 Change-Id: I8301f47179d80234408711af5f95563320bd590c Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Giuseppe D'Angelo <[email protected]>
* Windows11Style: Simplify call to buttonLabelColor()Christian Ehrlicher20 hours2-9/+9
| | | | | | | | | | Make buttonLabelColor() a non-static member function so we don't need to pass the colorSchemeIndex and the helper function winUI3Color() can be called directly. Pick-to: 6.10 6.9 Change-Id: Ifa2a8ff9b70ee00493b194fbcbe33225f6ca3b54 Reviewed-by: Wladimir Leuschner <[email protected]>
* Windows11Style: remove double painting for PanelButtonChristian Ehrlicher20 hours1-11/+0
| | | | | | | | | | | When fillBrush() was added, the then unneeded painting routing to draw the fill of a PanelButton was not removed which resulted in a wrong double painting. This amends b3c0b08eb040bbd76b81a7c6172e3846e8ec0000. Pick-to: 6.10 6.9 6.8 Change-Id: If9322f97d8632b8114dbe73c44d276511d3d82b3 Reviewed-by: Wladimir Leuschner <[email protected]>
* Add normalizeTypeInternal() overload with an out QBA parameterAhmad Samir20 hours2-6/+18
| | | | | | | | | | Useful when called in a loop from QMetaObject::normalizedSignature(); avoids allocating a QByteArray for each type in a method's signature. Drive by, add missing include. Change-Id: I423a618f79df2db2be859d41e5df1150b6da9b79 Reviewed-by: Thiago Macieira <[email protected]>
* Widget snippets: Fix indentation in qtreewidget-using exampleOleksii Zbykovskyi20 hours2-17/+17
| | | | | | | | | | | | | Made minor adjustments to the indentation in the qtreewidget-using example to ensure clarity and consistency in the code snippets. At the same time, combine snippets 10 and 11 because they are only used together. Updated related documentation to reflect these changes. Amends 1cf7d9f34f1bc3ddc5fa97ff57a95dd8083f9ae8 Change-Id: I7446341cf4e498004199c1ec9d08e31df9ae5b7f Reviewed-by: Volker Hilsheimer <[email protected]>
* Create a header file for MainWindow classOleksii Zbykovskyi20 hours23-260/+123
| | | | | | | | | MainWindow class was created and used all around widgets snippets. I made a seperated header file for all of these cases to avoid repetitive code. Change-Id: Ic403fc7d5278f77e62d8b5265c4184a154fef1b6 Reviewed-by: Volker Hilsheimer <[email protected]>
* QTest::qWaitFor*: capture the widget/window using QPointerThiago Macieira21 hours2-5/+22
| | | | | | | | | | | | | | | | | | | | So we know if they get deleted before the waiting completes. This avoids a crash if we dereference a dangling pointer or an ABA coincidence in the case of qWaitForWindowFocused. There's currently no way to tell QTest::qWaitFor() that the condition will never become true, so this will result in a timeout. [ChangeLog][QtTest] Fixed a bug that would cause the qWaitForWindow* and qWaitForWidget* functions to crash or misbehave if the window or widget they were told to wait on was destroyed in the process of waiting for it to be shown/focused/activated/exposed. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-136653 Change-Id: Idaef89fa55e869d6946afffd727653a1fee3770c Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Teach QImage::toCGImage() how to propagate the image's color spaceTor Arne Vestbø21 hours1-3/+13
| | | | | | | | | | | | We use qt_mac_toCGImage(), which builds on this API, in the HEIF/HEIC image format plugin, so propagating the color space is important. [ChangeLog][QtGui] QImage::toCGImage() now propagates the color space of the image to the resulting CGImage. Pick-to: 6.10 Change-Id: I3638d70a8cda076295983be248028ff5ded69088 Reviewed-by: Timur Pocheptsov <[email protected]>
* Fix QPixelFormat definition of QImage::Format_ARGB4444_PremultipliedTor Arne Vestbø21 hours1-1/+1
| | | | | | | | | | | | | The pixel format claimed to have alpha last, but that's not what the name would indicate, nor what the logic in QImage::checkForAlphaPixels assumes. Discovered when generating CGImageRefs from the pixel format definition, and seeing obviously wrong pixels values in the written PNG. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Iac8c9961b6e46d4627a579a2129e29b95a4e3343 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QRM: remove unused roleNames() methodArtem Dyomin22 hours2-5/+0
| | | | | | | | QRMImpl::roleNames is not used anymore. Pick-to: 6.10 Change-Id: I99f6f934c82980271d4edf1342687852d79e5274 Reviewed-by: Volker Hilsheimer <[email protected]>
* Blacklist tst_QStyleSheetStyle::emptyStyleSheet on macOSTor Arne Vestbø23 hours1-0/+2
| | | | | | | | | | | | It's not clear what the expected result should be, and what the current expected failure is. The screnshots look the same on both macOS 15 and 26, but one is XFAIL and the other is XPASS. For now, blacklist to make qtbase pass. Task-number: QTBUG-21468 Change-Id: I29c1286c772aeea7564092fb3bb2505497df6db3 Reviewed-by: Volker Hilsheimer <[email protected]>
* windeployqt: Add parameter to extend timeout of qmlimportscannerOliver Wolff24 hours5-7/+28
| | | | | | | | | | | | | | In big projects it is possible that the default timeout for running qmlimportscanner (30 seconds) is not enough. Give the user the option to extend that value. [ChangeLog][Tools][Windeployqt] Add option to control timeout for qmlimportscanner runs. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-138395 Change-Id: I5c9534bd141ec6fcb66d4e990e46cd2dfcef2647 Reviewed-by: Joerg Bornemann <[email protected]>
* wasm: Clear focushelper on inputEven Oscar Andersen25 hours2-9/+17
| | | | | | | | | | | | | | focusHelper needs to have contenteditable set, which causes innerHTML to contain all input received. Fix this by clearing "innerHTML". This assumes focusHelper does not have any children. Pick-to: 6.10 Change-Id: I6d9b04808d347990e99156be223440f32989d1ac Reviewed-by: Morten Johan Sørvig <[email protected]>
* Gui snippets: Don't build clipwindow when configured with -no-widgetsRobert Löhning25 hours1-1/+1
| | | | | | | | | | ...because that snippet requires widgets. Amends 1042c917c36c95cf2650e26ed4234ccb752fb54f Change-Id: Icf409a8e1bf963337d82a1783557da3c6a4214d2 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Oleksii Zbykovskyi <[email protected]>
* Windows11Style: don't modify palette for QAbstractScrollAreaChristian Ehrlicher26 hours1-9/+25
| | | | | | | | | | | | | | Don't modify the palette just to make sure the background of the viewport does not overdraw the widget's frame. Use setAutoFillBackground(false) instead as the style paints the whole area by itself so it's not needed to rely on a clean paint area. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-139051 Task-number: QTBUG-138401 Change-Id: Iaba0c82eaeeefec3e4ad79804df78a14bac9a3a6 Reviewed-by: Nodir Temirkhodjaev <[email protected]> Reviewed-by: Wladimir Leuschner <[email protected]>
* QXmlStreamWriter: replace Q_ASSERT() with static_assert()Marc Mutz26 hours1-1/+1
| | | | | | | | | | | The condition is a compile-time constant expression, so we can check it at compile-time. No run-time check needed. Amends 53622aca2ad0d13bd16d8307dc28f915c8878b75. Pick-to: 6.10 Change-Id: Ia73dd99c3670a279ec7f740eecd623d51ae647d4 Reviewed-by: Thiago Macieira <[email protected]>
* QtCore: private: use Q_UNREACHABLE in qexpectedDmitrii Akshintsev26 hours5-1/+59
| | | | | | | | __builtin_unreachable() might not exist on some platforms, for example, integrity, use Qt API instead Change-Id: Iff2d0759b62d16d3e4acc33ce2bb6e72dbf603a3 Pick-to: 6.10 Reviewed-by: Fabian Kosmale <[email protected]>
* Add Lancelot tests for mnemonics in textEskil Abrahamsen Blomfeldt27 hours3-0/+40
| | | | | | | | | | | | | This adds a new paint command drawAlignedText which allows you to draw text inside a rectangle and provide the text flags. In addition, it adds a test for mnemonics in text to demonstrate the issue this introduces with Arabic ligatures. Pick-to: 6.10 Task-number: QTBUG-93371 Change-Id: Ic3f094f9aa9cdcbecf871a947c71b8e31a97bf44 Reviewed-by: Eirik Aavitsland <[email protected]>
* QString: further optimize the invalid regex warningMarc Mutz34 hours2-13/+18
| | | | | | | | | | | | | | | | | | | Error handling code has no business bloating Qt executable code size, so take two more steps to reduce its impact, on top of the locking it away in a Q_DECL_COLD_FUNCTION: First, split the 'where' argument into 'class' and 'method', in order to facilitate the reuse of the class strings across users. Second, move the QRegularExpression::pattern() call into the warning function, to centralize the temporary QString handling code. Saves half a KiB in text size on optimized Clang 19 Linux AMD64 C++23 builds. Pick-to: 6.10 6.9 6.8 Change-Id: I7fe23bdafc9f63d0d43b801e704866be9961648c Reviewed-by: Thiago Macieira <[email protected]>
* QString: make qt_section_chunk a plain aggregateMarc Mutz34 hours1-6/+4
| | | | | | | | | | | | | | | | | | | | The type doesn't need to have constructors, certainly not a default constructor that doesn't initialize the 'length' member (so that even value-initialization leaves it uninit'ed). Since we don't depend on C++20, yet, this requires the use of {} instead of () for initialization. As a drive-by, fix the errornous spaces inside QStringView{ *this }. Lack of initialization pointed out by Coverity. Amends d807a16e7f9555e02991fc86ac5085ebe0101ef3. Coverity-Id: 54563 Pick-to: 6.10 6.9 6.8 Change-Id: I8111ab253934a74e5f466a0457a9f7f3fb1f2721 Reviewed-by: Thiago Macieira <[email protected]>
* QTextBoundaryFinder: fix missing initialization of 'unused'Marc Mutz34 hours1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Coverity complained about a missing initialization of the 'unused' field. While we don't seem to have any inline API that could possibly depend on the value of the field, not initializing reserved and unused members has in the past caused problems for later extensions, so do it now. I don't expect problems here, since all SMFs are out-of-line, but better safe than sorry. Amends the start of the public history. Coverity-Id: 11716 Coverity-Id: 11717 Coverity-Id: 11718 Coverity-Id: 444240 Pick-to: 6.10 6.9 6.8 Change-Id: Id25d9bb77fd0f03cdfa8dd809cfe662263b727a4 Reviewed-by: Thiago Macieira <[email protected]>
* Android: check if returned bitmap is valid before useAssam Boudjelthia45 hours1-0/+4
| | | | | | Pick-to: 6.10 Change-Id: Ief11389fa4e1b44a854b3d98c47f74d6d0d04bf7 Reviewed-by: Volker Hilsheimer <[email protected]>
* Android: unskipp tst_qvulkan test casesAssam Boudjelthia45 hours1-10/+10
| | | | | | | | | | | These test cases no longer fail on Android, except the check for VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES under vulkan11() which I made QEXPECT_FAIL(). Pick-to: 6.10 Fixes: QTBUG-108328 Change-Id: Iaaeb4f2bf696053bea83fc2552af586594894fc7 Reviewed-by: Laszlo Agocs <[email protected]>
* Android: add QT_BEGIN/END_NAMESPACE to JNI testsAssam Boudjelthia45 hours4-0/+16
| | | | | | | | | | The various JNI macros and types are defined under the Qt namespace, so the tests should be wrapped in QT_BEGIN/END_NAMESPACE. Fixes: QTBUG-132490 Pick-to: 6.8 6.9 6.10 Change-Id: I9db03ea31c95aef5e0fca0a65fd52299e674a513 Reviewed-by: Volker Hilsheimer <[email protected]>
* Hide docs for operator""_svIvan Solovev45 hours1-1/+1
| | | | | | | | | | | | | | Hide the docs until we can provide a consistent experience, i.e. add UDLs for other views. Found in API review. The original comment suggested to revert this change, but it's a bit problematic, because we already have several usages in qtdeclarative. Task-number: QTBUG-134136 Pick-to: 6.10 Change-Id: I54e6e2470ff592ddd9d3d1c3ce14818a550b5e5e Reviewed-by: Marc Mutz <[email protected]>
* Cocoa: expose qnsview implementations to IDE projectsTim Blechmann45 hours1-0/+26
| | | | | | | | | | | The qnsview_*.mm sources are included by qnsview.mm instead of being compiled in isolation. We still add them to the cmake targets so that IDEs can list them in the generated projects. Pick-to: 6.10 Change-Id: I5f85a56937842c9cbe79b399f8a654471a724730 Reviewed-by: Tor Arne Vestbø <[email protected]>