summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: add precompiled headerHEADdevTim Blechmann44 hours2-0/+18
| | | | | | | | | | | | | Apple's system headers are rather big. Precompiling them will reduce the compile times: * building the initial pch takes 2s on my macbook * it reduces the compile times for the translation units significantly (1s instead of 2s for qnsview.mm, 600ms instead of 1400ms for qnswindow) Pick-to: 6.10 Change-Id: I466c6fac04e7eb07f52cf62ee492807f48d0c3bd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows11Style: use 'QStyle::State' instead intChristian Ehrlicher2 days1-2/+2
| | | | | | | | Use the distinct enum instead a generic int. Pick-to: 6.10 Change-Id: I5aa7b834fd993cd181ccf211613ef4cc1fae6768 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* Windows11Style: use QPainterStateGuardChristian Ehrlicher2 days1-16/+8
| | | | | | | | Use QPainterStateGuard instead QPainter::save/restore Pick-to: 6.10 Change-Id: Idd54144ba8cde65e24510ccb5813cb86993314f9 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* Doc: Clarify the usage of file filters in QFileDialogAlexei Cazacov2 days4-57/+70
| | | | | | | | | | | | | This commit restructures and enhances the description of the file filters in QFileDialog. The commit adds info on MIME type filters and clarifies the case sensitivity of file filters on various platforms. Fixes: QTBUG-135381 Pick-to: 6.10 6.8 Change-Id: I1fa7eeefb0e242285ee3bc4a86f29b76f72abe8f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* CMake: Add emoji segmenter attribution to SBOMAlexandru Croitor2 days2-0/+3
| | | | | | | | | | [ChangeLog][Third-Party Code] Emoji Segmenter is now included in the SBOM dependencies of Qt GUI. Pick-to: 6.10 Fixes: QTBUG-142092 Change-Id: I6a792b4b696c90bb9df6bf9dc698c1bb11bbbd06 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Include font features in QFont::toString()Vlad Zahorodnii2 days1-8/+45
| | | | | | | | | | | | | | | | | This ensures that font features, for example calt or liga, can be saved in QSettings using QFont::toString() and QFont::fromSettings() as expected. With the proposed change, QFont::toString() will append the number of font features followed by a list of key=value pairs specifying feature settings. The corresponding tests have been reworked a little bit because following the established patterns was slightly challenging. Task-number: QTBUG-141412 Change-Id: I7a80d5fe1d120b514797bfb515c3a6b0867a6ee5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QArrayData: fix exception safety in assign()Marc Mutz3 days1-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned at the top of assign(), the function ought to provide the basic exception guarantee. We were checking whether the construction of T from the result of the projection is noexcept, but, as Thiago pointed out in a related change, we ignored that the projection invocation can fail, too, in which case we'd leave a corrupt container around (size would not match the number of active objects in the list, holes in the middle if we started to use the prepend buffer, but failed in the middle). To fix, also check the projection for noexcept and fall back to the existing non-noexcept-construction paths in that case. It's pretty harmless, since the functionality isn't exposed in public API (if you consider QArrayData* non-public, that is), and the only user of projections was QString::assign(), and the projection it uses cannot throw (cf. f2ea9d8dc8dc8d52490722f78ea46cd374d8e649). Amends 782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f for the first hunk and e07710007b4cf9c0665ac9d5c2b6c7ef588aae0a for the second. Because of a massive code-move and -rewrite that has happened in dev, I decided that it's simpler to fix this in 6.10 and forward-port to dev, as it's one less conflict to resolve. Manual conflict resolution for dev: - dropped the original's second hunk, as that code is gone in dev Fixes: QTBUG-141899 Change-Id: I026f703e5245422dce2951fd733178b5a0a4eefe Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> (cherry picked from commit 73fa4cf2004690ae71ed9c41a93aa071fda98ecc) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QHashDummyValue more robustMarc Mutz3 days1-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | As is customary for tag structs, make the default ctor explicit to avoid construction as '{}'. Make op== constexpr (drive-by: make it a hidden friend instead of a member function), and add op!= to C++17 builds, for symmetry. =delete the qHash() overload so it doesn't accidentally match some other overload. We should eventually also =delete equality, but atm, this breaks QSet::compareEquals, which calls QHash::op==, which (incorrectly) SFINAE's out for a non-equality-comparable QHashDummyValue mapped_type. Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3. Not picking back, as it's a rather isolated change with very little chance of creating conflicts going forward, but non-negligible chance of breaking something in older branches. Change-Id: I8125581c476f854ebe4f9ddc791d3ddce9f169d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Testlib: fix memory leak of ignoredTestsTim Blechmann3 days1-2/+2
| | | | | | | | | | the `ignoredTests` dictionary is allocated, but never freed. Use a smart pointer to ensure that the dictionary is freed on exit. That should prevent leak detectors from a not-so-false positive. Pick-to: 6.10 Change-Id: Idd0d2bbef775653d044a0d3df363b46d6162a811 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTableView: correct selection with moved columns/rows and spansChristian Ehrlicher3 days1-19/+22
| | | | | | | | | | | | When a column or row is moved and there are spans, the calculation of the correct row was not correct for the 'moved to' column/row because there was a mixup of visual and logical columns. Pick-to: 6.10 6.8 Fixes: QTBUG-138513 Change-Id: Ia3d1aa2c5376cb25ea56dc55b6a57a88edbfec30 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* forkfd: configure our signal handler to restart the syscallThiago Macieira3 days1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This should help solve problems with other libraries that don't have proper EINTR_LOOP around their operations. Like most of <stdio.h> and thus <iostreams>. This change does not affect FreeBSD or Linux, where we don't install a signal handler in the first place. And obviously, it will have no effect if something else overrides our signal handler without this flag. If that happens, please complain to the piece of software that forgot the flag. This test has also revealed that Windows presents a similar wake up: if the grandchild process shares the child's stdin (which happens by default for startDetached()) the child gets woken up from WaitForSingleObject() when the grandchild dies and thus fgets() returns error. That has nothing to do with QProcess, and AFAICT is simply the way pipes work on Windows. Fixes: QTBUG-142041 Pick-to: 6.10 6.8 6.5 Change-Id: I5900f238ec4a85ed49affffd29fc4248cc272929 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the old qatomicscopedvaluerollback_p.h from QtCoreDocRym Bouabid3 days1-1/+0
| | | | | | | | | | QAtomicScopedValueRollback became a public API in 6.7. ammends 4fa9f13397abf5da44a0fbd70692fa2c8f79ac13. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-115107 Change-Id: I0d0069b0403ef5109b7f9ead175a18b45b1cea30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some punctuation and awkward wording in QLocalServer docsAndreas Hartmetz3 days1-10/+10
| | | | | Change-Id: Ifa7a0f4b32b4ef163221167454e82d858b002036 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: Add support for QFileOpenEvent for external requests to open filesTor Arne Vestbø3 days3-13/+27
| | | | | | | | | [ChangeLog][iOS] QFileOpenEvent is now sent if the user requests that a supported file type is to be opened in the application. This requires that the application declares supported file types via CFBundleDocumentTypes. Change-Id: Ic3476ad703b51131a0973e3d6135e9aa05c2091f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix QTZLocale's parsing of non-BMP digitsEdward Welbourne3 days1-10/+23
| | | | | | | | | | | | Digit-parsing wasn't taking into account the width of digits. It thus failed where digits are encoded as surrogate pairs. Expanded a test to expose this failure. Take the width of digits into account. Pick-to: 6.10 Task-number: QTBUG-139223 Change-Id: I0e5497203d6657d04878f06b6a736a57c16edc2f Reviewed-by: Mate Barany <mate.barany@qt.io>
* zlib: don't re-define ByteTim Blechmann3 days3-0/+40
| | | | | | | | | | | | | | | The preprocessor is evil: by re-defining Byte, we cause a clash with the MacTypes.h typedef, causing build errors with unity builds. It may also clash with other uses of using Byte as identifier such as in qbytearrayview.h or qmimemagicrule_p.h. We do not need to re-define any of the typedefs for vendoring zlib, as they won't affect globally visible symbols Pick-to: 6.5 6.8 6.9 6.10 Change-Id: I978d76659b09e54c2a1efdecbb9529560884824d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Extract window class registration into dedicated classPavel Dubsky3 days10-170/+246
| | | | | | | | | | | Moved all logic related to window class registration and tracking out of QWindowsContext into a new QWindowsWindowClassRegistry class. This step preserves existing behavior and structure; no functional or stylistic changes were made. Further cleanups and refinements will follow in subsequent commits. Change-Id: Iba84797067226a3de0489bc466d9cd1b7e1a4d3c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Remove unused FEATURE_DEPENDENCIES optionAlexandru Croitor3 days1-2/+0
| | | | | | | | | | | | | | | | Remove the unused PUBLIC_DEPENDENCIES / PRIVATE_DEPENDENCIES options from qt_feature_module_begin. They don't have any effect. They were used a long time ago in the past before b7b4af575f119ddabe0f7f3e8c075306b347dda3 landed. Remove the FEATURE_DEPENDENCIES option from qt_internal_add_module / add_plugin / extend_target which forwarded to qt_feature_module_begin. Remove the only usage of FEATURE_DEPENDENCIES from the Gui module. Pick-to: 6.8 6.10 Change-Id: I46f12ac859b5cf19433b2de4a6f09a22d18a7f4e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* a11y win: Don't report active windows as having focusIngo Klöcker3 days1-6/+1
| | | | | | | | | | | | | | | | | | | | | UI Automation gets confused if active windows are reported as having keyboard focus additionally to the UI element inside the active window which actually has keyboard focus. This makes UIA synthesizes bogus UIA:FocusEvents for the active window. And this makes NVDA speak some texts twice and suppress speaking other texts (e.g. the name of the actual focus widget). Reporting the active window as having keyboard focus only if it does actually have keyboard focus (and not some child widget of the window) fixes the problem with the bogus UIA:FocusEvents. This change reverts part of 73ca3dbf490b33159ba66e936bcb11fbcd03e886. Fixes: QTBUG-90897 Fixes: QTBUG-90899 Change-Id: I4d1aeec7ec581730c6a4797a6c95f8b2033dea6d Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
* Doc: Wayland: Mark private APIs \internalTopi Reinio3 days2-0/+5
| | | | | | | | | | | | | | | | | | | | | | | QDoc warns about documented functions in undocumented classes; Fixes qwaylandshellsurface.cpp:89: [QtWaylandClient] (qdoc) warning: No output generated for function 'QtWaylandClient:: QWaylandShellSurface::commitSurfaceRole()' because 'QWaylandShellSurface' is undocumented qwaylandwindow.cpp:920: [QtWaylandClient] (qdoc) warning: No output generated for function 'QtWaylandClient::QWaylandWindow:: surfaceSize()' because 'QWaylandWindow' is undocumented qwaylandwindow.cpp:941: [QtWaylandClient] (qdoc) warning: No output generated for function 'QtWaylandClient::QWaylandWindow:: windowContentGeometry()' because 'QWaylandWindow' is undocumented qwaylandwindow.cpp:951: [QtWaylandClient] (qdoc) warning: No output generated for function 'QtWaylandClient::QWaylandWindow:: mapFromWlSurface()' because 'QWaylandWindow' is undocumented Task-number: QTBUG-141665 Change-Id: Ia0d6201783eaebcb356f4efd8d48eb42077e3b2a Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QFont: fix potential "Integer division by zero" in QFontCache::decreaseCache()Vladimir Belyavsky3 days1-4/+8
| | | | | | | | | | | | | | | QFontCache::decreaseCache() may crash with "Integer division by zero" in case when an engine is missed in engineCacheCount for some reason. It still not clear how this may happen, but we see this in user's crash reports. This change simply prevents crashes, but the underlying cause of such cache inconsistency needs to be investigated and fixed further. Task-number: QTBUG-138455 Change-Id: I6d81c23a67a883b9c00094a8fcd5394bb86b39ea Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove unused Android importsJan Moeller4 days1-2/+0
| | | | | | | | | | This amends 93ce4ad5f91522d110b549dd2d42e2864372d49d where the dialog usage was removed, the imports were originially introduced in 2b48614f68cbf98d6597819749b732556c32cb44. Pick-to: 6.10 6.8 Change-Id: I8adefea66efb07e1a7354a4605a381579ea76bf6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QNX QPA: Scale window and backing store sizesMauro Persano4 days3-8/+20
| | | | | | | | | | | Properly scale QWindow and QBackingStore logical sizes when creating/updating buffers and window system events. Pick-to: 6.10 6.8 6.5 Task-number: QTBUG-141834 Change-Id: I79e22b7bb94fec0857a742be31f5e2f4a4fd2942 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Build with QT_NO_URL_CAST_FROM_STRINGAhmad Samir4 days26-7/+33
| | | | | | | | | | | Can't mark the whole repo with that macro, because in corelib that would take out the QString conversion operator which is BiC. Add a hard build-time error if QT_NO_URL_CAST_FROM_STRING is defined in corelib, as requested in code review. Change-Id: Ia0e302a2f82b86800e84d15e86ab138f78d45e4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use Q_ENUM/Q_FLAG instead of Q_ENUMS/Q_FLAGSAhmad Samir4 days3-5/+5
| | | | | | | | | Q_ENUMS and Q_FLAGS have been deprecated since at least Qt 6.0. Task-number: QTBUG-99060 Change-Id: Ia8cbc607c34683dec99587571c0d04f1854e77c2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtmetamacros.h: sort out Q_{ENUM,FLAG}* when Q_MOC_RUN is definedAhmad Samir4 days1-1/+3
| | | | | | | | | | | | | | | | | | When Q_MOC_RUN is defined, some Q_ENUM/FLAG related macros are defined as themselves, whereas some other ones are missing. It's not obvious what the exact purpose of having those macros defined when Q_MOC_RUN is defined, but until we know better, add macros that we think are missing from the list. This also fixes a typo (s/Q_FLAGS/Q_FLAG/) from commit 14583137ae445fbfdc82922266f5c0736454f6c4. Pick-to: 6.10 6.8 6.5 Task-number: QTBUG-99060 Change-Id: I096a774baffc05826320af5454563a7825ce064f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QTableView: misc optimization of setSelection()Christian Ehrlicher4 days1-4/+8
| | | | | | | | | | | QTableView::setSelection() is very often only called for one index (e.g. due to a mouse click) - therefor topLeft and bottomRight is the same. Avoid the calculation of the bottomRect index in such cases. Pick-to: 6.10 6.8 Task-number: QTBUG-138513 Change-Id: I2edba6943d554919d4873c1918e08b99d28112f3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QListView: misc cleanup for QListView::paintEvent()Christian Ehrlicher4 days1-22/+11
| | | | | | | Use range-based for-loop, use QFlags::setFlag() instead bit operators. Change-Id: I3391829427f7e64d6295ee007fd07813c09b1453 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWidgets: deprecate QStyle::State_EditingChristian Ehrlicher4 days5-19/+5
| | | | | | | | | | | This enum was only used in QListView and even there it was not set (when an item was editor the editor had the focus, not the view so it could never be set). Fixes: QTBUG-69351 Fixes: QTBUG-68947 Change-Id: If8423bcc1595667ca6908820512024d9947abba0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QHash: fix noexcept on Node::takeValue()Marc Mutz4 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the QHashDummyValue specialization, the noexcept was missing. Add it. In the primary Node template, takeValue() was conditionally noexcept, but seeing as it just returns an rvalue reference to the 'value' data member, it's of course unconditionally noexcept, since the actual move contructor or -assignment operator call happens after the function returns. Besides, even if it had to be conditionally noexcept (e.g., because it returned T-by-value), it would have to check for nothrow_move_constructible, not _assignable. Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3. Picking to older branches is ok, since these functions, even if they were marked noexcept(false), could not throw any exceptions, so forward BC is not broken. Pick-to: 6.10 6.8 6.5 Change-Id: I43aab284acc8b1303d4147c1b8c58613bbb05b25 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Turn QHashPrivate::isRelocatable into a variable templateMarc Mutz4 days1-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | (was: function template) Coverity complained that, when instantiating a QHash with is_same<mapped_type, key_type>, the two terms of the logical AND operator were identical. This is, of course, expected and perfectly as intended, but in the interest of fixing-instead-of-dismissing, try whether making the entity a variable template intead of a function template will fix the Coverity complaint, too. After all, this is how you would write the entity today, in C++17. As a variable template, add the idiomatic _v suffix (to explicitly break out-of-tree users, if any, with a clear error message). Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3. Coverity-Id: 378449 Change-Id: I1dab5d18d6f55edd58e16b9773403cee2f93dfee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Ensure QColorSpace::fromIccProfile takes ownership of incoming dataEirik Aavitsland4 days1-2/+4
| | | | | | | | | | | | | | | | | | | | qt_mac_toQImage() sets the QImage colorspace from QColorSpace::fromIccProfile(const QByteArray&). Not unreasonably, the code assumes that that function will construct a QColorSpace without keeping references to the original underlying data. However, it does, so when passed a QByteArray holding external data, via fromRawData(), that goes out of scope, the QColorSpace object ended up holding a pointer to deallocated data - easily leading to a crash sooner or later. Fix by making sure QColorSpace::fromIccProfile detaches the incoming data. Fixes: QTBUG-141942 Pick-to: 6.10 6.8 Change-Id: If4b06e5f596a61f99364190d0ce5ea3d619ef6ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* forkfd: Add support for Linux SPARCJohn Paul Adrian Glaubitz4 days1-1/+1
| | | | | | | | | Both SPARC and SPARC64 aren't CLONE_BACKWARDS architectures. Pick-to: 6.10 6.8 6.5 Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Change-Id: Ied2cba4aef923149a5d3fffd678e65e624116f6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QRM: fix build error when using row pointersVolker Hilsheimer4 days1-6/+6
| | | | | | | | | | | Use our begin/end helpers from the Details namespace to iterate over rows, which might be pointers or smart pointers. Simplify by using the namespace, which gives us direct access to the pointerTo helper as well. Amends f9bb6c8d900205375c70bb33f359ce0250212460. Change-Id: I2724d5c83c4c0af85f3141c340ed14683dea74d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix QRandomAccessAsyncFile::close() logic on macOSIvan Solovev4 days2-23/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QRandomAccessAsyncFilePrivate::close() function is supposed to cancel all operations and close all the related IO channels, including the main IO channel. The initial implementation had a false assumption that the callback indicating that the main IO channel is closed is always the last callback that is called in this scenario. So, that callback was used to unconditionally call wakeOne() on the condition variable that was used to signal that all operations are completed. However, in practice when we cancel the operations, we receive the following callbacks: * close callback from each IO channel related to each operation; * completion callback for read/write operations with done set to true and error code indicating cancellation; * close callback from the main IO channel. All these callbacks can come in an arbitrary order. As a result, the case when multiple operations are still in progress, and the file is removed (or close() is called) was randomly crashing on CI, because the completion callbacks were trying to access the already-removed file. This patch updates the logic to only wake a condition variable when all callbacks are received. In order to do that we introduce a new m_numChannelsToClose variable to keep track of the number of active channels, and use the size of the m_runningOps set to track the running operations. To verify that the approach works reliably, I manually ran the equivalent of tst_QRandomAccessAsyncFile::fileRemovedInProgress() 100'000 times for each operation (owning and non-owning read/write separately). Amends e6b26ad1eca555ee1e6b2c4e9b4c7676dc754b04. Fixes: QTBUG-141730 Change-Id: I874b9b9999398f787b5039c78bc3d3eee44c088c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update Apple Clang/LLVM version mapping for Xcode 26.0Tor Arne Vestbø4 days1-1/+3
| | | | | | Pick-to: 6.10 6.8 6.5 Change-Id: Ib88dfd1808bd72155df4d8fb865306413c8c3d91 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* xcb: Move canCreatePlatformOffscreenSurface out of macro blockMikko Hallamaa4 days1-1/+1
| | | | | | | | | QXcbGlIntegration::canCreatePlatformOffscreenSurface declaration should not be behind #ifndef QT_NO_OPENGL macro. This patch moves it out. Pick-to: 6.10 6.8 Change-Id: I0a76619ccdfc1af2ccb164a71ec515b0254c8efd Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
* QColorDialog: add out-of-bounds check for QWellArrayChristian Ehrlicher5 days1-1/+1
| | | | | | | | | | QWellArray which is used to display pre-defined colors did not check if the calculated row/column is inside the possible bounds. Pick-to: 6.10 6.8 Fixes: QTBUG-105476 Change-Id: Id795f825479540086b4126b633ef1889c420c714 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Widgets: Deprecate QStyleOptionMenuItem::MenuItemType::MarginChristian Ehrlicher5 days2-2/+5
| | | | | | | | | QStyleOptionMenuItem::MenuItemType::Margin is not used anywhere so deprecate this enum. Fixes: QTBUG-109669 Change-Id: I32c11a8166772d5b6c44cf8e897604f222713632 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qsimd/x86: Remove detection of RDRND and RDSEEDThiago Macieira5 days4-214/+30
| | | | | | | | | | | | | | | | The previous commit removed their use from QRandomGenerator, which was the only user. This removes their detection too, which means QtCore will not refuse to load when compiled with an -march= flag that specifies the feature should be present, but is missing at runtime. See https://lore.kernel.org/all/9a27f2e6-4f62-45a6-a527-c09983b8dce4@cachyos.org/ Task-number: QTBUG-69423 Task-number: QTBUG-129193 Pick-to: 6.10 6.8 6.5 Change-Id: Ib67da873cc42acfedaeefffd56db0414bb7ea6b0 Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QArrayDataOps: allow truncate(samesize)Thiago Macieira5 days1-2/+2
| | | | | | | | | | | | | | | | | | There's no reason to disallow truncating nothing. The alternative is to check the size before truncating, which is unnecessary extra branching. Instead, just let this function do nothing. Amends 15e3ae6b9da9b32236d3e3348ede86c3acf06fb4 ("Introduce QArrayDataOps::truncate") from Qt 5.0 but cherry-picking nowhere near as far back because nothing used it until assign() in Qt 6.8. QList does not have a truncate() function and both QString's and QByteArray's use resize() instead. Pick-to: 6.10 6.8 Fixes: QTBUG-141918 Change-Id: Ie3342e0ea9ee312bd5cbfffd4d4a83da27a838e6 Reviewed-by: Sune Vuorela <sune@vuorela.dk> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Doc: Add alt text for QMake, QtOpenGl, and QtPrintSupportEren Bursali5 days3-4/+8
| | | | | | | | Adding alt texts for \image tags that were needed for qdoc Pick-to: 6.10 Change-Id: I71166238a7f7810e3c41ae944edda8d184836465 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include new languages for CLDR v48Edward Welbourne5 days7-22/+2797
| | | | | | | | | | | | | | | | Include two new languages, Ladin and Shan, and document the various languages and scripts that show up in the cldr2qlocalexml.py output, that I have checked and seen to contain inadequate information. This may make it easier for future updaters to spot new unknown codes when they show up. These are not picked back to past versions because they're naturally documented as [since 6.11] and picking would involve each past branch getting a minor version as its since. Fixes: QTBUG-141949 Change-Id: If0cb3e3b33cd3ce636fd29e904a9ddd617940314 Reviewed-by: Mate Barany <mate.barany@qt.io>
* Fix handling of non-BMP digits in milliseconds fields of timesEdward Welbourne5 days1-4/+5
| | | | | | | | | | | | | | | The code to trim trailing zeros from z (or zz, but not zzz) format correctly checked for whether the text ended with the locale's zero, but incorrectly chop(1)ed to remove the zero, neglecting the possibility that the zero is longer. Noticed while checking where else we used QLocale::zeroDigit() possibly naively. Add Fulah-Adlam tests for milliseconds, which confirmed the problem does actually appear. Fix dropping of trailing zeros from millis. Pick-to: 6.10 6.8 6.5 Change-Id: Id080f082b2890a102809ba8d0f687d55ac082357 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tweak QTZLocale's parsing of offsets to pretend "GMT" == "UTC"Edward Welbourne5 days1-1/+14
| | | | | | | | | | This is needed to match kludges already present in QUtcTZP::displayName(), which needs to do this to respect locale zone offset forms. Task-number: QTBUG-139223 Change-Id: I367413817e4824e3e5dbe0c73d8d6b36dfc1bf64 Reviewed-by: Mate Barany <mate.barany@qt.io>
* Do some minor tidy-up in qtimezonelocale.cppEdward Welbourne5 days1-6/+11
| | | | | | | | | | | | | | Its OffsetFormulaMatch::operator bool() was missing const-qualification; supply it and use it. Combine an indexOf() and the check of its return into an if condition. Split up an if-else chain where an early return made else redundant. Add notes with links to help clarify what's going on with some of the formatting details. Pick-to: 6.10 6.8 Task-number: QTBUG-139223 Change-Id: Ie235641c3086965aeb631588c55ec38a554a08e0 Reviewed-by: Mate Barany <mate.barany@qt.io>
* wasm: run the current test by defaultMorten Sørvig5 days1-1/+1
| | | | | | | | | Make the test runner run the current test by default in non-batched mode, without requiring a testname parameter. Change-Id: Ia74f5a3db4a5c4a8d9f6a41073520653781d0f17 Reviewed-by: Lorn Potter <lorn.potter@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Wayland: Add logic for OffscreenSurface capabilityMikko Hallamaa6 days4-0/+10
| | | | | | | | | | | The OffscreenSurface platform integration capability was added in change 637918. This patch was detached from that commit to simplify backporting. Task-number: QTBUG-131107 Change-Id: Ic0561fb5f36514275f90e34486b90478dee02022 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: David Redondo <qt@david-redondo.de>
* Partially revert "qnumeric.h: add support for C23/C++26 <stdckdint.h>"Thiago Macieira6 days1-33/+9
| | | | | | | | | | | | | | | This reverts commit 08ebe3465cc2fce98662b5833b75503490f66265. Reason for revert: the ckd_* functions are not constexpr. If we're going to have to keep our implementations anyway, then we may as well skip using the C23/C++26 feature. Maybe in C++29 they become constexpr. I've left behind the requirement to not use plain char, in case we want to switch to these later. That retains the old commit's changelog. Fixes: QTBUG-142028 Change-Id: I6db786946ae31be16891840b03e5120eb8915d52 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* WindowsVistaStyle/SpinBox: fix geometry for SC_SpinBoxUpChristian Ehrlicher6 days1-1/+1
| | | | | | | | | | The width of SC_SpinBoxUp was 1px more in contrast to SC_SpinBoxDown for unknown reaons (predates git history) which lead to drawing errors, esp. visible when the button was pressed. Pick-to: 6.10 6.8 Change-Id: Ibea0d741950e5754be771edad6bd3185b5a43a87 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>