summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QAbstractItemModel: Add revisions to new methodsUlf Hermann2022-06-241-13/+13
| | | | | | | | | | | These methods show up in QML-exposed types. They should be revisioned in order to keep those types backwards-compatible. Pick-to: 6.4 Change-Id: I8e826dc2e7db49d8abe69f67605dfb1991855b96 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix typo in codeDuan Ting2022-06-231-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I75f4b14f3eded035a0c904d8a7174cb6f5b7d9ef Reviewed-by: Wang Bo <wangbo@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use [[noreturn]] attributeKai Köhne2022-06-231-1/+5
| | | | | | | | | | | Use __has_cpp_attribute mechanism to check availability of [[noreturn]]. For MSVC 2019 and 2022, this is always the case, so we can also remove the (now dead) __declpsec(noreturn) definition. Pick-to: 6.4 Change-Id: Ie7b39bd93bc5e1a173e245a3a5d5ff7e9067a59f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MSVC: Remove dead Q_DECL_DEPRECATED* definitionsKai Köhne2022-06-231-4/+0
| | | | | | | | | | | | | | | | Later on we redefine them to [[deprecated]], [[deprecated("")]], if the attribute is available. Since both MSVC 2019 and 2022 support the attribute, the __declspec() definition was never used. https://docs.microsoft.com/en-us/cpp/cpp/attributes Pick-to: 6.4 Fixes: QTBUG-93748 Change-Id: I3e12f2ace414e316a811f2ceb44e6f312803439a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: add Q_CONSTINIT to the static const variables we emitThiago Macieira2022-06-222-5/+13
| | | | | | | | | | | The macro was added to Qt 6.4, so we define it in each moc output to empty if it wasn't previously defined. Thus, moc retains compatibility with older Qt versions. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9c1539fa0368f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* moc: replace offsetof with sizeofThiago Macieira2022-06-221-1/+1
| | | | | | | | | | It's the same thing since we have exactly one field in this structure before stringdata0. But there's a far smaller chance of producing a warning in user code. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cdceec33017d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: fix use of escape sequence of more than one characterThiago Macieira2022-06-221-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had the code to calculate the length, but were improperly using it only for the offset, not the length of the string or its containing array. That resulted in the generated moc output containing: QT_MOC_LITERAL(111, 5), // "\xffz" QT_MOC_LITERAL(114, 5), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The two strings are described as occupying 5 bytes (length 4 + null terminator), which is incorrect. The offset was correct: 114 - 111 = 3 and 117 - 114 = 3. The new output is: QT_MOC_LITERAL(111, 2), // "\xffz" QT_MOC_LITERAL(114, 2), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The effect of the array size calculation would only be felt if moc decided it needed a second string array (for strings over 65535 bytes), which would cause the offsets in the second array to be all wrong. There was no such test until now. Drive-by fixing of the newline, indentation, and the stale comment referring to QByteArrayData (Qt 5). Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cd01b3e0709a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add QDom internalSubset implementationYe ShanShan2022-06-232-0/+34
| | | | | | | | | | | | QDom's internalSubset() always returned empty because nothing actually set the internal data member it returns. When parsing the DECLTYPE, extract the internal subset and save it to the doctype()'s member when present. Pick-to: 5.15 6.2 6.3 6.4 Fixes: QTBUG-53661 Change-Id: I6e41ff8b914381168246073b3289d82205b1c255 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* moc: Allow reading property values through bindablesUlf Hermann2022-06-223-1/+16
| | | | | | | | | | | | | The behavior is similar to MEMBER: If the READ accessor is "default", synthesize it using the bindable. [ChangeLog][QtCore] You can now specify "READ default" in a Q_PROPERTY if you also specify a BINDABLE. moc will synthesize a READ accessor in that case. Task-number: QTBUG-97249 Change-Id: I4a275adabaed12df95dac505095f847c4be65dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move QFutureInterfaceBase::cleanContinuation() to removed_apiSona Kurazyan2022-06-223-12/+19
| | | | | | | | | | This method isn't used anymore, but we can't remove it entirely for BC reasons, because it was called from inline code. Pick-to: 6.4 Change-Id: I9183c666c466030787ac7c2386706b50abf23eaa Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* wasm: do not allow blocked windows to be resizedLorn Potter2022-06-221-5/+10
| | | | | | | Fixes: QTBUG-102869 Pick-to: 6.3 6.4 Change-Id: I69a4afbb67618dce7bcc499208e7e608e9adf212 Reviewed-by: David Skoland <david.skoland@qt.io>
* QJsonValue: fix incorrect to{Array,Object} when the value is emptyThiago Macieira2022-06-213-10/+14
| | | | | | | | | | | | This is a repeat of commit de6ced66920600e659dbaa2509526a3bcb0b3360 "QCborValue: fix incorrect to{Array,Map} when the value is empty" (6.4), which fixed the same thing for QCborValue. I've just copied the exact same implementation onto the QJsonValue functions. Pick-to: 6.2 6.3 6.4 5.15 Fixes: QTBUG-104085 Change-Id: I175efddd75f24ae59057fffd16f6b257bf7ed36d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* wasm: improve the specialHtmlTargets testMorten Sørvig2022-06-221-4/+8
| | | | | | | | | | | | It can actually be undefined, so test for that before checking the object type. This fixes the asyncify build. Pick-to: 6.4 Change-Id: I5a6a0bc60c153290c35c20242400c59cd1312403 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QThread:idealThreadCount: fix build with FreeBSD 13.1Thiago Macieira2022-06-211-1/+1
| | | | | | | | They added the CPU_COUNT_S macro. Pick-to: 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fabe9f8226ecda Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* moc: remove unnecessary emission of "#include <qbytearray.h>"Thiago Macieira2022-06-211-1/+0
| | | | | | | | | | | | | | | | We don't need QByteArrayData any more (since 6.0). [ChangeLog][Potentially Source-Incompatible Changes] moc no longer emits an #include for QByteArray in the output file. None of the content that moc generates needed that header, so this should not cause changes for most people. However, codebases that #include'd the moc output (something that is recommended) could be depending on this indirect include. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cf13dc8d61b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: rename the "offsetsAndSize" member to "offsetsAndSizes"Thiago Macieira2022-06-221-2/+2
| | | | | | | | | | | | | It contains more than one size. Drive-by drop the const from the structure, so it becomes properly trivial (though there's disagreement, see[1]). [1] https://conformance.godbolt.org/z/rK1xW669K Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cc69ffd90aa4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Doc: Add qthelp dependency to gui and widgetsLuca Di Sera2022-06-222-2/+3
| | | | | | | | | | | | | | | | The documentation for both gui and widgets defines members of the "helpsystem" group, which definition is given in qthelp. Due to recent changes in QDoc that automatically link a class page to its owning group, it is now required for those project to be dependent on qthelp, so that it is possible to retrieve the necessary linking information for the group definition. Hence, such a dependency was added. Change-Id: Id9399e76bbe10fb9ae0c05d637006b5cdc0b742b Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Long live QT_INLINE_SINCE!Marc Mutz2022-06-223-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have now had several requests for inlining previously-exported member functions, but no standard mechanism to effect it. As QT_REMOVED_SINCE has shown, there is great value in having such a standard mechanism, so here is one. With this change, to inline a previously exported (member) function, simply - mark the declaration with QT_<MODULE>_INLINE_SINCE - move the definition into the header file (outside the class), - wrap it in QT_<MODULE>_INLINE_IMPL_SINCE - #include the header into the module's removed_api.cpp Just including the header into removed_api.cpp is enough, so you may want to add a comment: #include "header.h" // uses QT_<MODULE>_INLINE_SINCE The effect is as follows: - A TU in a _different_ library will see an inline declaration, followed by the definition, and so it will see a normal inline function. - A TU in the same library will, however, see a non-inline declaration, to avoid the ODR violation that at least GCC/ld are able to detect. - When QT_<MODULE>_BUILD_REMOVED_API is in effect, the TU will also see the definition, which is the same setup as before the change, except in a different TU, and therefore export the member. - When, OTOH, QT_<MODULE>_BUILD_REMOVED_API is _not_ in effect, the TU will see no declaration, assuming (correctly), that the definition will be supplied by a different TU. This is, of course, an ODR violation, but not worse than what we do elsewhere, as the definitions differ only between library and user. The function is inline only for the users of the library, not the library itself, which will still see the function as non-inline. If inlining is critical within the library, too, the existing function should call a new inline function, and calls in the same library should be changed to call the new inline function instead. Use the new mechanism to inline the QLocale ctor we intended to inline for 6.3, but couldn't, because we hadn't found the magic incantation, yet. Thiago found it a few weeks later, and this is what this patch is based on. Fixes: QTBUG-100452 Pick-to: 6.4 Change-Id: Ia0030cddc64b6b92edfed860170d5204aa74b953 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QPostEventList: de-inline addEvent()Marc Mutz2022-06-222-17/+24
| | | | | | | | | | | While in a private header, it did manage to place QList<QPostEvent> operations near the top spots of all Qt template instantiations in a QtWidgets build. Task-number: QTBUG-97601 Pick-to: 6.4 Change-Id: I4fa1972b8764b71ad0559633131e7e44b3d4ae6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QPromise: run continuation(s) on destructionSona Kurazyan2022-06-221-1/+1
| | | | | | | | | | | | | | | | | | If the QFuture is canceled because the associated QPromise has been destroyed, we still need to run its continuations (i.e. onCanceled handler, if it's attached), so replaced the cleanContinuation() call inside ~QPromise() with runContinuation(), which will also take care of cleaning the continuation. [ChangeLog][QtCore][Important Behavior Changes] QFuture now runs its continuations when its associated QPromise has been destroyed. Previously, if a QFuture was canceled because the associated QPromise has been destroyed, its continuations were skipped. Fixes: QTBUG-103992 Pick-to: 6.4 6.3 6.2 Change-Id: Ie05bc760c96c349aade8adb8d2fe5263aff8efac Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Isolate http2protocol_p.h includeAlexey Edelev2022-06-221-1/+1
| | | | | | | | | | http2protocol_p.h is not supposed to be used without the http feature is enabled. Move its include under QT_CONFIG(http) guard. Change-Id: I374dd84d3330de2b4c340b9803d0c3d2c13bc8e3 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add the qt_class pragma to file listed in sync.profile classnames mapAlexey Edelev2022-06-2217-0/+69
| | | | | | | | | This makes header files self-contained and reduces the number of 'sources of truth' for syncqt procedure. Change-Id: I7f5865abc69934603139d23e1b5452da46ccb110 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move ssl header files to the general QtNetwork sourcesAlexey Edelev2022-06-221-5/+10
| | | | | | | | | | | Move public ssl headers to the general QtNetwork sources since they supposed to be used across the project without corresponding checks for the FEATURE_ssl presence. The content in these header files has a conditional implementation guarded by corresponding macros. Change-Id: I43168469da27321c2d8064ec2e5d7fe31126ebec Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move threads header files out of the FEATURE_threadAlexey Edelev2022-06-221-9/+9
| | | | | | | | | | | Threads header files are used across the project without the check for FEATURE_thread enabled. So moving them out of the FEATURE_thread condition in CMake file to make them part of the CMake source tree even if FEATURE_thread is disabled. Change-Id: I8ee4ee5ffa16054b9af0df0aa5704b0f87678e1a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDom: Clean-up warnings about old-style cast usesSona Kurazyan2022-06-221-62/+66
| | | | | Change-Id: I7cf2089f34e46a901f8b03987feed24773a72c00 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Replace a few more QString::fromLatin1() with _s literalsShawn Rutledge2022-06-221-2/+2
| | | | | | | | | Wasn't done in 7d79b94db7debdd1896d1912e3052d5950b05df5 Pick-to: 6.4 Task-number: QTBUG-98434 Change-Id: Id9c26f6b58e2c96a1c5f72154b735b136c57debc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add ExpandCollapse UI Automation pattern to combo boxesAndré de la Rocha2022-06-224-7/+26
| | | | | | | | | | | Also add support to expandable/expanded states to QAccessibleComboBox in widgets. QtDeclarative will still require updates so that QML combo boxes report the expanded/collapsed state and react to UIA actions. Task-number: QTBUG-103591 Pick-to: 6.4 6.3 Change-Id: Iff8ba5e3143778ce17998dbe7f5f76cae658dc19 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Disable useless-cast warning for moc generated codeMate Barany2022-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The useless-cast gcc warning is disabled in the files generated by the moc. A typical warning is like using_t = void(Counter::*)(int ); if (*reinterpret_cast<_t*>(_a[1]) == static_cast<_t>(&Counter::valueChanged)) { *result = 0; return; } Removing the static cast results in a compilation error "address of overloaded function with no contextual type-of information" in moc_myobject.cpp files. Checking whether we have an overload set or a single function might be too much effort for too little benefit and may not worth it. Fixes: QTBUG-71938 Change-Id: I6f67e163a3493b51fb95f54218ce6bf9a302f824 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document QMouseEvent::pos() as deprecated in 6.0Mikolaj Boc2022-06-221-0/+1
| | | | | | | | | The API is deprecated, but the documentation does not state that. Fixes: PYSIDE-1750 Pick-to: 6.4 6.3 6.2 6.1 6.0 Change-Id: I038ffeb958312d7648690743e06598a15dfb4cbc Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix concurrent access to files by androiddeployqt in multi-abi buildsAlexey Edelev2022-06-211-1/+29
| | | | | | | | | | | | | | | | | | | | | | 'androiddeployqt' supposed to copy artifacts that may not have abi-specific identifies. One example is Qt6Android.jar file. We need to prevent execution of multiple androiddeployqt instances in parallel. External projects now are divided into two steps. The first runs the build and can be executed in parallel to the build steps from the other external projects. The second one triggers androiddeployqt and can only be run exclusively in relation to the similar steps from other ABI-specific external projects. To solve the issue we build the dependency chain between the all ABI-pecific qt_internal_${target}_copy_apk_dependencies targets to execute androiddeployqt sequentially. This is non-optimal, but guarantees that androiddeployqt is not running simultaneously with another instance in external projects. Pick-to: 6.3 6.4 Fixes: QTBUG-104013 Change-Id: I39a25dd5f38ed988e0ca74b185024bc602ab81a1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Revise Qt Test tutorialAndreas Eliasson2022-06-214-34/+177
| | | | | | | | | | | - Make it explicit that each chapter can be run as a stand-alone test application - Add a CMake section on how to build the executable Task-number: QTBUG-103730 Pick-to: 6.4 6.3 Change-Id: Id4c87c454521f698dcf16cfdc176318dd3e16786 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* xcb: Port XSync call in QXcbWindow::create to xcbIlya Fedin2022-06-211-3/+1
| | | | | | | | | QXcbConnection::sync is a full equivalent of calling XSync with false, they both are sending GetInputFocus request and getting its reply Pick-to: 6.4 Change-Id: I4f91b9447a02def41a8693a54312856b56e74811 Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: set primary screen more correctlyLiang Qi2022-06-212-4/+17
| | | | | | | | | | | | | | | For example, when having virtual monitor which includes two real monitors, the primary information in xcb_randr_monitor_info_t is normally false, because user can only set it for output. Kudos to Jiang Wu for his first patch and details of the issue. Done-with: Jiang Wu <wujiang@kylinos.cn> Pick-to: 6.4 6.3 Change-Id: I6af443ff69d347a6d86efc9c8ea7a5d18f4c3e24 Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Jiang Wu <wujiang@kylinos.cn> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: clear m_singlescreen before updateJiang Wu2022-06-211-0/+1
| | | | | | Pick-to: 6.4 6.3 Change-Id: Iafff57be82b5beb1f5702c00e0b6d7d0dd3ccdc2 Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: fix missing initialization of m_cursorNils Jeisecke2022-06-212-7/+6
| | | | | | | | | | | | | | | | | | | | Regression introduced in 9a4c98e55659b32db984612e6247ac193812a502: m_cursor is not initialized and never set when monitorInfo is not available in QXcbScreen::setMonitor. This seems to happen when running in VNC, e.g. on a Raspberry Pi. This usually results in crashing the application pretty soon. Using a unique_ptr solves both the initialization and a possible leak when setMonitor is called multiple times. [ChangeLog][Linux/XCB] Fixed crash when no monitorInfo is available (e.g. VNC). Fixes: QTBUG-104443 Pick-to: 6.3 6.4 Change-Id: If13493c177121a1994b5d00dfbd64f1da694df2e Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add QStringDecoder::decoderForHtml()Lars Knoll2022-06-214-23/+60
| | | | | | | | | | | | | | Now that QStringConverter can handle non UTF encodings through ICU, add a way to get a decoder for arbitrary HTML code. Opposed to QStringConverter::encodingForHtml(), this method will try to create a valid string decoder also for non unicode codecs. Pick-to: 6.4 Change-Id: I343584da1b114396c744f482d9b433c9cedcc511 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qsimd: don't enforce shstk (CET) feature on launchThiago Macieira2022-06-201-0/+6
| | | | | | | | | | | Clang with -march=tigerlake or -march=sapphirerapids pre-defines __SHSTK__, which QtCore require the feature, even if the OS does not have support for it. That's of no consequence because the compiler does not generate shadow stack operations on its own. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa1ad910f008b8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QDom: Stop treating non-BMP characters as invalidSona Kurazyan2022-06-203-11/+15
| | | | | | | | | | | | | According to https://www.w3.org/TR/REC-xml/#NT-Char unicode characters within the range of [#x10000-#x10FFFF] are considered to be valid, so fix the check for valid characters accordingly. This requires changing the loop over the input QString to iterate over code points (instead of code units). Fixes: QTBUG-104362 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I7dcf5cad05265a54882807a50522d28b647e06ee Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Windows: Avoid accidentally copying QWindowsScreenManagerTor Arne Vestbø2022-06-203-3/+4
| | | | | | Pick-to: 6.2 6.3 6.4 Change-Id: I60b219e9a3ea62a96c369ee910eacf06d61f4f71 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Warn when using qt6_add_big_resources on iOSAlexandru Croitor2022-06-202-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt6_add_big_resources works by calling rcc to generate a resource .cpp file, compiling it into an object file, then passing the compiled object file to rcc again for further manipulation. The path to the object file is passed to rcc using the $<TARGET_OBJECTS> generator expression. This generator expression does not work when used in add_custom_command / file(GENERATE) when targeting iOS, because CMake claims it does not know where the object file will be on-disk (presumably because the location is controlled by Xcode itself and it can vary based on the active architecture and sysroot). The following error is shown at generation time: Error evaluating generator expression: $<TARGET_OBJECTS:rcc_object_foo> The evaluation of the TARGET_OBJECTS generator expression is only suitable for consumption by CMake (limited under Xcode with multiple architectures). It is not suitable for writing out elsewhere. More details about the issue can be found at https://gitlab.kitware.com/cmake/cmake/-/issues/20516 Trying to work around the issue by manually invoking the compiler instead of using a genex so we know the location of the object file hits similar issues in that we don't know the active arch and sysroot for which to compile the object file. Until the CMake limitation is lifted or we find a different fix, warn that qt6_add_big_resources can't be used when targeting iOS and fall back to using qt6_add_resources instead. Note that qmake CONFIG+=big_resources also falls back to non-big resources mode when targeting Xcode (mac-xcode) and doesn't even show a warning. Another note is that using CMake + Xcode + qt6_add_big_resources does work when targeting macOS, although it generates some warnings warning same member name (qrc_assets.o) in output file used for input files: qrc_assets.o qrc_assets.o (due to use of basename, truncation, blank padding or duplicate input files) So there is some hope this could be fixed for iOS in the future. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-103497 Change-Id: I91152247651ecd35e8110b8874399cb1b8b394bd Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QGraphicsScene: respect that items can override selection changesVolker Hilsheimer2022-06-201-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItems may override itemChange to prevent certain attribute changes. Overriding ItemSelectedChange this way is explicitly documented to be allowed. However QGraphicsScene::clearSelection did not test whether items were in fact deselected after the call to setSelection, and always cleared the stored set of selected items. Fix this by checking the actual selected state of the item as we iterate over them, and store those items that are still selected in a set that becomes the new selectedItems set (which will be empty if no item overrides, which is the default). Add a test that also checks that clearing the selection emits the selectionChanged signal correctly (and does not if all selected items block being deselected). Fixes: QTBUG-85474 Pick-to: 6.4 6.3 6.2 Change-Id: I665afc132876e02e6e1061b7be37f4f6e4be418f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Avoid misleading bindingStatusAllan Sandfeld Jensen2022-06-204-4/+5
| | | | | | | | | | | Set it to nullptr on clear, and deal with possibly null bindingStatus. Task-number: QTBUG-101177 Task-number: QTBUG-102403 Pick-to: 6.4 Change-Id: I66cb4d505a4f7b377dc90b45ac13834fca19d399 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port QXlibEglIntegration::getCompatibleVisualId to xcbIlya Fedin2022-06-207-190/+142
| | | | | | | | | | In combination with EGL_EXT_platform_xcb support, this allows xcb_egl to be used without xlib. Without EGL_EXT_platform_xcb support, this still reduces amount of code using xlib. Pick-to: 6.4 Change-Id: I29e2b29f7ef8ea34320887f62697f84232b86fba Reviewed-by: Liang Qi <liang.qi@qt.io>
* QXdgDesktopPortalFileDialog: fix C++20 buildGiuseppe D'Angelo2022-06-201-1/+1
| | | | | | | | | | In a lambda, capturing of `*this` by reference via `=` is deprecated, and breaks the build. Capture everything needed instead. Amends fb981a0954119ed0dfa4a402fdef78e7257ffc96. Change-Id: I5d3d192e71662b96154cb5979898277bd0720a90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindow: fix C++20 buildGiuseppe D'Angelo2022-06-201-4/+4
| | | | | | | | | | In a lambda, capturing of `*this` by reference via `=` is deprecated, and breaks the build. Capture everything needed instead. Amends e7477e8934ab38722f5589914d08b3f15e870109. Change-Id: Ibdbf51cb7a5ec54004b14b719dfd44e86d6f0893 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix tst_AndroidAssets, broken by recent changes on assets load speedLouis du Verdier2022-06-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | Recent changes on load speed of individual assets made AndroidAbstractFileEngine use a cache for basic information in order to avoid to have to open assets every time a QFileInfo is created, which was very expensive for older phones. However, size() method was forgotten and continued to expect that the asset would be opened first, and therefore QFileInfo().size() would always return -1. This change fixes this by caching as well the information about the size of the asset, and also reverts a part in open() to close() first in case asset would already be opened, in order to keep previous behavior (even if this did not cause any known issue). Fixes: QTBUG-104412 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I992f31b8f9e14dfec44cec78d0c1a2a3e18bdb7f Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QAbstractItemDelegate: Remove a duplicate doc entryLaszlo Papp2022-06-201-2/+2
| | | | | | Pick-to: 6.4 6.3 6.2 Change-Id: I02887e6bf5892b4697af2aabcd1f1335e15b4f06 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document QJniObject::constructVolker Hilsheimer2022-06-201-0/+15
| | | | | | | | | Added for 6.4. Not extremely useful as long as the macros that allow the declaration of new class and type strings also being documented. Pick-to: 6.4 Change-Id: I9ee466fdd0aaccec1e627ceb313b5a5c17e3f3fa Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Make the new setCurrentId the writer for the respective propertyVolker Hilsheimer2022-06-201-1/+1
| | | | | | | | | Amends 2140edaaab0bf61f354db521efca773568becc56. Pick-to: 6.4 Change-Id: Idc1ace4229b8706d9b44f1727105cc9aaab1a86d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTableView: set correct clip on QPainter when using spansRichard Moe Gustavsen2022-06-201-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it stood, QTableView would sometimes show drawing artifacts when sections (rows or columns) where rearranged, in combination with spans. The reason is that the current code would go through the currently visible cells in the viewport to check if any of them where affected by a span. But the stored spans (in QSpanCollection) is kept in sync with the column layout in the model, and doesn't know anything about the rearranged columns in the view. But a column with spans that is moved to the left of the viewport can affect the painting of the viewport as well, and needs to be taken into consideration. For that reason, the current solution that uses QSpanCollection::spanAt(x, y), will in that case fail. Since it seems sensible that QSpanCollection is kept in sync with the model (it makes model changes that affect spans easier to handle), this patch will not change QSpanCollection. Instead, it will iterate through all the spans (which is assumed to normally be a limited size), convert them to the column layout of the view (visual instead of logical), and find the ones that overlap. Overlapping spans will, like before, be added as clip rects to the QPainter. Fixes: QTBUG-91896 Pick-to: 6.4 6.3 6.2 Change-Id: Iabe20df13cbd41a68f1104d3d9e24b89c4b88913 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>