summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* wayland: Add xx-session-management-v1 supportDavid Edmundson2025-06-2716-4/+539
| | | | | | | | | | | | | | | | | | This is powered by the xx-session-manager which is tagged as experiemntal. This is guarded by an env variable. Application level session IDs are exposed via QSessionManager. The public API for windows is exposed via the existing QSessionManager and QWidget::setWindowRole. As it's not widely supported the documentation in QWidget is left untouched for now. [ChangeLog][Third-Party Code] New protocol synced from wayland-protocols Change-Id: Ibfbef86c6e75f8b95433cbba69ca10a5abea9e21 Reviewed-by: Vlad Zahorodnii <[email protected]>
* Mark qtbase/src/xml files as security criticalMagdalena Stojek2025-06-272-0/+2
| | | | | | | | | qdom.cpp and qdomhelpers.cpp are data parsers. Fixes: QTBUG-135587 Pick-to: 6.10 6.9 6.8 Change-Id: I3ea77f46f91d5e05d7d6ce88f416e3062f8096ea Reviewed-by: Ivan Solovev <[email protected]>
* Add security headers to QSetting filesMatthias Rauter2025-06-266-0/+6
| | | | | | | | | | | | | | | | | | QSettings can be parsed from *ini files that could potentially be corrupted. Therefore qsettings.cpp and qsettings_mac.cpp are marked security critical. qsettings_[win|wasm].cpp are reading the settings from the registry or from the browser, data sources that are considered trusted. Therefore these files are marked security significant. The header are also marked significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I5474c9a748b238734b5cdd50fb9e46f8379924ed Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
* Add security header to QLockFile filesMatthias Rauter2025-06-265-0/+5
| | | | | | | | | | | | | In qlockfile.cpp, the contents of the lock file are parsed. While this parsing is not very advanced, it meets the criteria of QUIP 23. The other files do not meet any QUIP 23 criteria and are therefore marked as significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I87b2e00194583b5a2401443f556a38b472747c3a Reviewed-by: Ivan Solovev <[email protected]>
* Mark QXmlUtils as security-criticalMarc Mutz2025-06-262-0/+2
| | | | | | | | | | | | | | | | | | QXmlUtils are used by QXmlStream and QDom, both of which are (or ought soon to be) marked as security-critical. The component is clearly a data-parser, too, with the same input as QXmlStream and QDom, so has to be security-critical, too. The header file contains only declarations, so it gets the default score:significant. Amends 8df072fc8006510c9b743e8ffedaaf51a876883a. QUIP: 23 Task-number: QTBUG-135194 Pick-to: 6.10 6.9 6.8 Change-Id: I415486dbba0c748e6af561ea4f098ea42c4b1830 Reviewed-by: Ivan Solovev <[email protected]>
* Doc: Remove excessive \note tags from QDateTime remarksDheerendra Purohit2025-06-261-4/+4
| | | | | | | | | | | | | Removed all \note tags from the QDateTime "Remarks" section. The content did not require special highlighting and is now presented as regular paragraphs. This improves readability and aligns with Qt documentation style guidelines. Pick-to: 6.10 6.9 Fixes: QTBUG-130765 Change-Id: I2e40d4ed08399b8da9e6a3ecc9720e62a683ca9c Reviewed-by: Safiyyah Moosa <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* Doc: List all operators defined by Q_DECLARE_OPERATORS_FOR_FLAGSDheerendra Purohit2025-06-261-2/+4
| | | | | | | | | | | | | Clarified that the macro defines operator&(), operator~(), operator^(), and missing assignment operators (|=, &=, ^=) in addition to operator|(). This improves accuracy and completeness of the QFlags documentation. pick-to: 6.10 6.9 Fixes: QTBUG-127490 Change-Id: Ib704172396cb7728d0544f6d6ae6194c45a50e4b Reviewed-by: Axel Spoerl <[email protected]>
* Doc: QToolBox comes before QToolButton in style sheet documentationDheerendra Purohit2025-06-261-13/+13
| | | | | | | | | | | Corrected order of QToolBox and QToolButton to follow alphabetical listing and improve readability. pick-to: 6.10 6.9 Fixes: QTBUG-113759 Change-Id: I0ae53c3fccf6f2fd9e44fcdee7bbb73c58fa75c7 Reviewed-by: Axel Spoerl <[email protected]>
* Add security scores to qresource* filesMatthias Rauter2025-06-264-0/+4
| | | | | | | | | | | | | | QResources can be feed data from a file at runtime. This should really be trusted data but we cannot guarantee that, therefore the file that contains the parser, qresource.cpp, is marked security critical. All other files are marked with the default value security significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: Ibff50dc744a5204233695794b82b87c82cd6a6b8 Reviewed-by: Ivan Solovev <[email protected]>
* Mark QContinousByteDevice as security significantMatthias Rauter2025-06-262-0/+2
| | | | | | | | | | | No data is inspected by this class. The security score is therefore not above the default value of significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I300e4a2613605c200a595a0fd7c9bfe20bb0294a Reviewed-by: Ivan Solovev <[email protected]>
* Add security headers to QLogging* filesMatthias Rauter2025-06-265-0/+5
| | | | | | | | | | | | qloggingregistry.cpp is considered security critical because it contains a parser for a configuration file. All other files are considered security significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: Idb9712e11f6ba5744e2d576833db4a7fae4e5eaa Reviewed-by: Ivan Solovev <[email protected]>
* Mark QBuffer security criticalMatthias Rauter2025-06-262-0/+2
| | | | | | | | | | | QBuffer operates on external data and data corruption issues have been found before. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I6f9ccd58ec423142f3551af3ba4e3c20d3f8392f Reviewed-by: Marc Mutz <[email protected]>
* Mark qabstractfileengine.cpp as security criticalMatthias Rauter2025-06-261-0/+1
| | | | | | | | | | | QAbstractFileEngine::readLine reads from the file info data. The header is not marked and will default to security significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I0dda64d78a515ed70a32777191af7c681cbfc067 Reviewed-by: Marc Mutz <[email protected]>
* Mark qfilesystementry.cpp security criticalMatthias Rauter2025-06-262-0/+2
| | | | | | | | | | | | QFileSystemEntry inspects paths, that can be provided by the user following the code documentation. As such it has to be categorized as critical. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I629c39bd1aedf216a067dab9a21eb09ad495b301 Reviewed-by: Ivan Solovev <[email protected]>
* Mark QFileDevice security significantMatthias Rauter2025-06-263-0/+3
| | | | | | | | | | | | qfiledevice.cpp contains some minimal data inspection, see putCharHelper(). However, this is very simple and not sufficient to make the file critical. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: I76e608fa42b0bca003fc5d0166fd863583df075a Reviewed-by: Ivan Solovev <[email protected]>
* Add default security header to remaining mimetype filesMatthias Rauter2025-06-2611-1/+11
| | | | | | | | QUIP: 23 Task-number: QTBUG-135191 Pick-to: 6.10 6.9 6.8 Change-Id: I81ceead665ee0313a492616188c33c6568070b11 Reviewed-by: Axel Spoerl <[email protected]>
* Mark qmimedatabase.cpp security criticalMatthias Rauter2025-06-261-0/+1
| | | | | | | | | | | | | | loadProviders() is parsing data, but it should only be trusted data. The function isTextFile() apparently reads data from an untrusted file to identify it as text file. Therefore this file has to be considered security critical. QUIP: 23 Task-number: QTBUG-135191 Pick-to: 6.10 6.9 6.8 Change-Id: I8884293eff5584038f3388dc0309cfa70eae0c89 Reviewed-by: Ivan Solovev <[email protected]>
* Create a couple of CMakeLists and fix related cppsOleksii Zbykovskyi2025-06-269-13/+93
| | | | | | | | | | | | Added a banch of CMakeLists to different folders. In the qprocess folder deleted the unused QApplication and added condition for windows. In qstring, fixed some small bugs. In qsignalmapper, added a condition to avoid naming problem Task-number: QTBUG-137566 Change-Id: I63e04cdd01b5854ab5f2dac2a0c317eea35f5b42 Reviewed-by: Volker Hilsheimer <[email protected]>
* Add more snippets sources from corelib to the build systemOleksii Zbykovskyi2025-06-2619-122/+135
| | | | | | | | | | | | | | Trying to compile snippets and fixing some bugs with them. Added some files and targets to CMakeList.txt. Added SOURCES of files that triggers Widgets in CMakeList.txt. Handled "no widgets" and "no qml" cases for snippets compiling. Relocated the necessary header file for qtcast. All others are just small fixes. Update: fixed path to the qlogging snippet in docs Task-number: QTBUG-137566 Change-Id: I6c6068790bf24ca88072cf8ca5c33b1401551452 Reviewed-by: Volker Hilsheimer <[email protected]>
* Windows QPA: fix PMv2 detect logicZhao Yuhang2025-06-261-2/+5
| | | | | | | | | | | | | Before this patch, in QWindowsContext::setProcessDpiAwareness, there are some conditions that will make this function return early, in this case, QWindowsContextPrivate::m_v2DpiAware won't be updated to the correct value (it's initially set to false and we want it to be true in these cases), this is absolutely wrong. Luckily, this issue just makes QPA call enableNonClientDpiScaling() in unnecessary situations and that is harmless. But it's also better to fix this issue. Change-Id: I04d70d5d83b898a3cd2856d504bcd3f5519427b4 Reviewed-by: Oliver Wolff <[email protected]>
* QRangeModel: small improvements to the tree documentationVolker Hilsheimer2025-06-261-17/+15
| | | | | | | | | Make implicit and explicit protocol level-2 sections. Make some formulations more concise. Pick-to: 6.10 Change-Id: I0474388924dec95fa4da1c260f61ffdb3ea8adc3 Reviewed-by: Artem Dyomin <[email protected]>
* QUnifiedTimer: allow speeding up animations and simplify APIMitch Curtis2025-06-262-13/+13
| | | | | | | | | | | | | | | Speeding up animations in tst_qquickpopup by 5 times results in a reduction of its execution time from 9.8 to 7.9 minutes: a 20% improvement. This patch: - Renames setSlowdownFactor to setSpeedModifier. - Removes setSlowModeEnabled. There's no need for two functions if we can just set a speed directly. Task-number: QTBUG-137919 Change-Id: I04eb5d962c818da5d36f8f4cb5a2404977b78deb Reviewed-by: Thiago Macieira <[email protected]>
* Doc: Update the benchmarking option descriptionsAlexei Cazacov2025-06-261-3/+5
| | | | | | | | | | This commit adds a `perf` option description and mentions that the `tickcounter` options requires a hardware support. Fixes: QTBUG-134795 Pick-to: 6.10 6.9 6.8 Change-Id: I8462073850b6811508776b40e867e62eb88f78e7 Reviewed-by: Dennis Oberst <[email protected]>
* wasm: change input element type to password for password echo modeLorn Potter2025-06-261-0/+10
| | | | | | | Fixes: QTBUG-133631 Pick-to: 6.9 6.10 Change-Id: I930de385a24229a7e47f8f80eb607fc59be19d30 Reviewed-by: Morten Johan Sørvig <[email protected]>
* QLockFilePrivate: de-inline all functionsMarc Mutz2025-06-262-25/+40
| | | | | | | | | | | | | | | | | This class is going to be marked as security-critical, and so we don't want code in the header (because fixes in inline code require recompiling all users, not just re-linking). Incidentally, de-inlining getLockFileHandle() removes the need to include some nasty (qt_windows.h) headers in the header (which means we need to revert part of 779bdf481ca208c20cfabd02d02d74175b0624b9 and go back from NSDMI to ctor-init-list, at least for `fileHandle`). As a drive-by, make the constructor explicit. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I3d376c2c02eb1f7de7a0b923ac4424b1057fdb1c Reviewed-by: David Faure <[email protected]>
* Mark QJson and QCbor classes as security-criticalMarc Mutz2025-06-2625-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These components process input external to the process, and the application depends on these components to report errors to detect failure, so these components are security-critical. The writers are, too, because a valid use of the classes is to stream-read something, filter or edit a few nodes, and then stream back, in which case writers see the same input as the readers, only in reverse, and have to build a valid output. Where there's doubt whether a header should be considered critical or not, err on the side of critical. We can always revisit the decision later when we know what semantics we'll attach to this marking. Where a header only contains declarations (and class definitions), mark as significant with reason "header, declarations only". It is probably a good idea to avoid any non-trivial inline code in headers whose .cpp files are security-critical, but moving all inline code out-of-line is a task for a different patch. Amends 8df072fc8006510c9b743e8ffedaaf51a876883a. QUIP: 23 Task-number: QTBUG-135194 Pick-to: 6.10 6.9 6.8 Change-Id: Ie317c4df652430e6e68954c37d553b760836dff8 Reviewed-by: Matthias Rauter <[email protected]>
* QLockFile: port from QScopedPointer to std::unique_ptrMarc Mutz2025-06-261-1/+2
| | | | | | | Trivial, after we made the d_ptr private in a preceding commit. Change-Id: Ie54adf7b5575924b557c6aa7b574a543ce31fcf5 Reviewed-by: David Faure <[email protected]>
* QLockFile: make d_ptr privateMarc Mutz2025-06-261-2/+1
| | | | | | | | | | | | | | | | | The original author of the class doesn't remember why it's protected, and there appear to be no meaningful uses for a protected d_ptr (unlike in the QObject case). The class is also not designed as a base class (the destructor is public and non-virtual), and we never advertized the protectedness of the d_ptr, so treat this as \internal API and just make it private. [ChangeLog][Potentially Source-Incompatible Changes][QtCore] The protected QLockFile::d_ptr variable is now private. The class isn't safe for subclassing, anyway (doesn't have a virtual destructor), so if your code depends on this, you need to find a different design. Change-Id: Idba36fd65f4c1327f31ee6c27320a0697147de5f Reviewed-by: David Faure <[email protected]>
* QLockFile: inline old int-based timeout functionsMarc Mutz2025-06-263-12/+28
| | | | | | | | | | | | | | | | | | The chrono-first approach asks that potentially-truncating functions that convert from chrono to int be inlined, so the UB happens in the user's domain and not in Qt's. When 0592123a0c68b65c83555dc0f023c4bc77030f31 added the functions for 6.2, this approach wasn't, yet, agreed upon, so catch the code up now. Found in independent review. As a drive-by, fix incorrect inner spaces on a {} constructor call, amending 5cea5fc80b9e1b19d620ec6be1acd5cdbd220971. Pick-to: 6.10 Change-Id: Ic231af1f8c8e10868b7fa9b1f09a63eb8478da0a Reviewed-by: David Faure <[email protected]>
* QGuiApplication: use the rvalue overload of QObject::setProperty()Marc Mutz2025-06-261-2/+2
| | | | | | | | | | | Said overload was added in 39cdf431f034121353e51768b4d1fec8b0dd35dc, and its use prevents a forced detach in setProperty() that comes from the function taking a copy of the QVariant and then calling .data() on it. The rvalue overload prevents this. Pick-to: 6.10 6.9 6.8 Change-Id: I4f84dae61ab0091d1058c9dee5a02c09b0ac41b5 Reviewed-by: Thiago Macieira <[email protected]>
* QMultiMap/Doc: fix count: three -> fourThiago Macieira2025-06-261-1/+1
| | | | | | | | | Amends 14090760a87f23509b7bb5ad846537c766cb44a5. Fixes: QTBUG-138043 Pick-to: 6.10 6.9 6.8 Change-Id: I9aa95af0d4a2995cdb8efffd3ce3d6d5036bdcfe Reviewed-by: Giuseppe D'Angelo <[email protected]>
* gui/removed_api.cpp: add missing comment block in 6.7 sectionMarc Mutz2025-06-251-0/+4
| | | | | | | | Amends 6c72080f26e9b70041434c6d762f7d601a2bf19c. Pick-to: 6.10 6.9 6.8 Change-Id: I8af92558be9ebef70fe99d4d6e9dcfdc14ef90ba Reviewed-by: Volker Hilsheimer <[email protected]>
* QPainter: make qt_show_painter_debug_output constexprMarc Mutz2025-06-251-53/+53
| | | | | | | | | | | | | | | Nothing is modifying the variable, so make it constexpr (was: mutable) and change all the if's into if-constexpr's. While the compiler doesn't care unless QT_DEBUG_DRAW is defined, this will prevent the next human reader from going on the same fruitless hunt for a setter as yours truly. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib2f8c0fcb2938ca3548b9452c4d8eb482e6ffbe5 Reviewed-by: Volker Hilsheimer <[email protected]>
* QLockFile: mark ctor explicitMarc Mutz2025-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | A QString is not a faithful representation of a lock file, so the (QString) ctor shouldn't be implicit. Mark it as explicit. Found in independent review. [ChangeLog][Potentially Source-Incompatible Changes][QtCore] The QLockFile(QString) constructor is now explicit, so implicit conversion from QString to QLockFile, incl. `QLockFile f = str;`, no longer works. Using explicit construction instead (`QLockFile f(str);`) is a backwards-compatible fix. Amends 1b582d64eb6d13e60a02ebc40956302a4864eb6c, but not picking to released branches, because it's slightly SiC. Pick-to: 6.10 Change-Id: I1f6b8c51cde4e1a1b51907083caa0acec9f4698d Reviewed-by: David Faure <[email protected]>
* Doc: Fix broken "see also" linksDavid Boddie2025-06-255-5/+5
| | | | | | Pick-to: 6.9 6.10 Change-Id: Idbfb39bbe1f16de420711911df0a8c47a2a75420 Reviewed-by: Mårten Nordheim <[email protected]>
* rhi: vulkan: Avoid VUID-vkQueueSubmit-pSignalSemaphores-00067Laszlo Agocs2025-06-252-8/+15
| | | | | | | Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-137986 Change-Id: I6e7465c47f20b34a64daa77f5d28271b7c0a73be Reviewed-by: Andy Nichols <[email protected]>
* wayland: Add pointer warp supportXaver Hugl2025-06-257-2/+128
| | | | | | | | | | | | | | | This supports partial usage of QCursor::setPos to move the mouse cursor. The wayland protocol only supports moving the cursor within the bounds of the window with pointer focus. Co-ordinates are mapped from global space to be relative to the focussed window. [ChangeLog][Third-Party Code] New protocol synced from wayland-protocols Fixes: QTBUG-127077 Pick-to: 6.10 Change-Id: Ic10142b2771fc9e6afc723b115b1b013a671e711 Reviewed-by: David Redondo <[email protected]>
* QQuaternion: make a mutable function-static int[] constexprMarc Mutz2025-06-251-1/+1
| | | | | | | | | | | | | | | The array, despite being declared mutable, is never modified (and doing so would be a data race if threads concurrently call QQuaternion::fromRotationMatrix(), because it was declared static). Fix by making it constexpr instead. It need not be static, as the compiler will just optimize it away, anyway. Amends ba640a75a5cc9fec63a5204ccf143dbb7f398842. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I0a37f7718b1e79f34d8dd56dc56d951cb8a1d44c Reviewed-by: Friedemann Kleint <[email protected]>
* Revert "Destroy window surface after exit transition for Qt for Android apps"Assam Boudjelthia2025-06-253-91/+23
| | | | | | | | | | | | | | | This reverts commit e40d9d43614b71c803a92fc640fc66f9a96cb095. Reason for revert: blocks submodule update round QTBUG-137942 Task-number: QTBUG-137942 Task-number: QTBUG-127705 Task-number: QTBUG-124140 Change-Id: Ie5d0c29ccf8814d73efd333cd71b4597b154ff1d Reviewed-by: Ville Voutilainen <[email protected]> Reviewed-by: Lauri Pohjanheimo <[email protected]> (cherry picked from commit d1be51d38b2bd4ac81e94ce8692e155219e9535a) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
* Doc: Document QTextStream::setCodec removal in Qt 6 changesDheerendra Purohit2025-06-252-0/+7
| | | | | | | | | | Add a paragraph about the removal of QTextStream::setCodec() and the introduction of setEncoding() in Qt 6. Pick-to: 6.10 6.9 Fixes: QTBUG-95325 Change-Id: I0785dcb493a5dcab83c85e59cb549a998ee25af0 Reviewed-by: Thiago Macieira <[email protected]>
* QRangeModel: fix build with QT_NO_SCOPED_POINTERMarc Mutz2025-06-251-1/+6
| | | | | | | | | | | | | | Need to #ifdef it out of is_any_unique_ptr. Alternatively, we could leave the QScopedPointer template forward-declared in qscopedpointer.h, but what with the default template arguments, I'd prefer not to. Amends 424d6ebf13d594a5d27d98b577a5c3d316c91bbb. Pick-to: 6.10 Change-Id: Ic15a333292189c0b10547982f2c2c7bc805884a2 Reviewed-by: Volker Hilsheimer <[email protected]>
* QIcon: round calculated devicePixelRatio to a useful valueChristian Ehrlicher2025-06-251-3/+4
| | | | | | | | | | Round the calculated devicePixelRatio to 2 decimals to avoid that the dpr differs for less than 0.1 percent and force a pixmap detach. Pick-to: 6.10 6.9 Change-Id: I51251f2ced9e6e3c3d0c1e80d81b32a573152885 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* WindowsStyle: simplify logic for CE_MenuBarItemChristian Ehrlicher2025-06-251-14/+15
| | | | | | | | | Simplify the logic for CE_MenuBarItem - there is no need to check for hasFocus since all paint stuff inside is only done when the menu is active. Change-Id: I6c66f80dd0ee13cfd3b788264cfcb8f6147513c5 Reviewed-by: Axel Spoerl <[email protected]>
* Use QPainter::brushOriginF() where appropriateChristian Ehrlicher2025-06-254-5/+5
| | | | | | | | Replace QPainter::brushOrigin() with brushOriginF() to not loose precision. Change-Id: I86f9e4c3399d32755f0b2b062ad7654149edab1b Reviewed-by: Axel Spoerl <[email protected]>
* QPainter: add brushOriginF()Christian Ehrlicher2025-06-252-1/+20
| | | | | | | | | | | QPainter::brushOrigin() only returns a QPoint instead QPointF, therefore add a the new function brushOriginF(). [ChangeLog][QtGui][QPainter] QPainter got a new function brushOriginF(). Task-number: QTBUG-137885 Change-Id: I641eab01637ee52aa0ceb7e739151713b5772005 Reviewed-by: Axel Spoerl <[email protected]>
* wayland cursor: flush requests when cursor is changedBłażej Szczygieł2025-06-251-0/+2
| | | | | | | Pick-to: 6.10 Fixes: QTBUG-136009 Change-Id: I9daaf1786ba2c256343020a83b1d2e0a93749e62 Reviewed-by: David Edmundson <[email protected]>
* Revert "Revert "Android: consider DecorView insets at app startup""Assam Boudjelthia2025-06-242-14/+49
| | | | | | | | | | This reverts commit 05f8abc61dd2429d7041a87d5bfc7bffbb105f12. Reason for revert: Quick tests fixed to account for safe margins. Pick-to: 6.10 6.9 Change-Id: I3c9d182267bb22b36ed0031b0fe744f331559b3d Reviewed-by: Tor Arne Vestbø <[email protected]>
* Reland: CMake: Annotate some qt_find_package calls with MODULEAlexandru Croitor2025-06-2424-99/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qt_find_package call first tries to find a Config package with the CONFIG mode option, and if not found, falls back to an arg-less mode which searches both Config and Find modules. For some packages, we know we want to find the Find module because there can't be a Config package, e.g our FindWrap modules or any of the other Find modules we carry in our cmake directory. So we should annotate these calls with MODULE. Aside from slightly faster configuration, there is another reason to do so. Future versions of CMake will automatically log find_package calls that have a state change (e.g. Not Found -> Found) into CMakeConfigureLog.yaml. Due to the Config-first logic in qt_find_package, we always unset the Foo_DIR variable if the Config package is not found. This means that there will be a constant build up of not-found messages in the log. Explicitly annotating the calls with MODULE will prevent this. Do that. This commit relands f1a59e974f013fcf8629d8cbacab58d895523100 This reverts commit 0ce82b78a35026cb56ff76d1c24b311008934a53. Pick-to: 6.10 Change-Id: I5d37579d2f4957215ce1475b5c0ec8509d77c83d Reviewed-by: Joerg Bornemann <[email protected]>
* QTranslator: Protect QTranslator data from being accessed while alteredKai Köhne2025-06-243-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing mutex in QCoreApplicationPrivate already protects access to translation data while QCA::installTranslator(), ::removeTranslator() are running. Extend this to also protect the altering methods in the QTranslator class itself. This makes sure that the installed QTranslator objects can be safely altered via QTranslator::load(). As loading translations might actually take a while, we don't want to unnecessarily lock the mutex for QTranslator objects that are _not_ registered. Instead, the patch introduces a QCAPrivate::mutexLockerForTranslator() method that returns a std::unique_lock<> object. If the QTranslator is not registered, the mutex is instantly unlocked in the method. If it is registered, the mutex is only unlocked after the scope of the calling code is exited (so the end of QTranslator::load()). Unfortunately, QWriteLocker does not support std::move semantics. Therefore switch to a simple std::unique_lock/QMutex. This means that QCoreApplication::translate() cannot be executed concurrently from multiple threads anymore, but that is arguably not the most common case, anyhow. While at it, remove the QTranslatorList typedef. Pick-to: 6.10 Task-number: QTBUG-137179 Change-Id: Id5c7abf0e7664058cb07cf76a0e9532533e37ad3 Reviewed-by: Thiago Macieira <[email protected]>
* Doc: Clarify QGraphicsItem::stackBefore() documentationDheerendra Purohit2025-06-241-4/+8
| | | | | | | | | | | Add explanation to disambiguate the term before in the context of visual stacking. Clarify that the item will appear behind the sibling when overlapping. Pick-to: 6.10 6.9 Fixes: QTBUG-126523 Change-Id: I8040b045bf67c404ef737a88b8328bc302f29227 Reviewed-by: Volker Hilsheimer <[email protected]>