summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QString: add STL-style assign() [1/4]: non-(it,it) overloadsHEADdevDennis Oberst5 hours2-0/+56
| | | | | | | | | | | | | | | | | | | | | Implemented assign() methods for QString to align with the criteria of std::basic_string, addressing the previously missing functionality. This is a subset of the overloads provided by the standard. Reference: https://en.cppreference.com/w/cpp/string/basic_string/assign The assign(it, it) overload is a bit more complicated and will be added in follow-up patches. [ChangeLog][QtCore][QString] Added assign(). Task-number: QTBUG-106198 Change-Id: Ia1481d184865f46db872cf94c266fef83b962351 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QStringDecoder: add a char16_t overload of appendToBuffer(QChar*, ~~~)Marc Mutz5 hours2-0/+8
| | | | | | | | | | | | | More and more code in Qt uses char16_t instead of QChar, even QString::Data, so reduce the impedance mismatch with such code and supply a char16_t overload in parallel to the existing QChar* one. [ChangeLog][QtCore][QStringDecoder] Added appendToBuffer() overload for char16_t*, complementing the existing overload taking QChar*. Task-number: QTBUG-106198 Change-Id: I0cb8ab22c897c14b1318a676f5212cc0cf1b72b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QVariant: replace fromValue() specializations with if-constexprFabian Kosmale5 hours1-12/+4
| | | | | | | | | Keeps all the special cases in a central place and will help with adding an rvalue overload of fromValue() for 6.6. Change-Id: I14f12bb98a2e2f4edfcec8ce39660643e23c1d07 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDnsLookup/Unix: cache previously decoded domain namesThiago Macieira9 hours1-3/+29
| | | | | Change-Id: I5f7f427ded124479baa6fffd175f3ce37f0e49aa Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup/Windows: add a simple decoded domain cacheThiago Macieira9 hours1-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid decoding multiple times the domain name when it comes in sequence. This happens when a given domain label either has multiple entries in its record set or when it's a CNAME (or both), such as in: ;; ANSWER SECTION: cname-cname.test.qt-project.org. 3600 IN CNAME cname.test.qt-project.org. cname.test.qt-project.org. 1614 IN CNAME multi.test.qt-project.org. multi.test.qt-project.org. 1614 IN A 198.51.100.2 multi.test.qt-project.org. 1614 IN A 198.51.100.3 multi.test.qt-project.org. 1614 IN A 198.51.100.1 Label targets from other records such as MX and SRV usually do show up again, in the Additional section, but the chance that they are sequential isn't very good, so we don't cache those. ;; ANSWER SECTION: mx-multi.test.qt-project.org. 3354 IN MX 10 multi.test.qt-project.org. mx-multi.test.qt-project.org. 3354 IN MX 20 a-single.test.qt-project.org. ;; ADDITIONAL SECTION: multi.test.qt-project.org. 1145 IN A 198.51.100.3 multi.test.qt-project.org. 1145 IN A 198.51.100.1 multi.test.qt-project.org. 1145 IN A 198.51.100.2 a-single.test.qt-project.org. 3364 IN A 192.0.2.1 Change-Id: I5f7f427ded124479baa6fffd175f5cf88939ee73 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup: allow looking up the root domainThiago Macieira9 hours1-0/+8
| | | | | | | | | [ChangeLog][QtNetwork][QDnsLookup] It is now possible to look up the root DNS domain, by setting the name property to an empty string. This query is usually done while setting the query type to NS. Change-Id: I5f7f427ded124479baa6fffd175f688395941610 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup: merge some of the domain label expansion codeThiago Macieira9 hours5-43/+64
| | | | | | | | | | | | | | | Use qt_ACE_do directly from QtCore, to avoid going through Latin1 (US-ASCII) multiple times. Drive-by reduce the size of the buffers from PACKETSZ (512) to the maximum name a label can be (255 plus 1 for the null, just in case). Drive-by replace the last QString::fromWCharArray with QStringView, saving an unnecessary memory allocation before calling QtPrivate::convertToLatin1(). Change-Id: I3e3bfef633af4130a03afffd175d8be1feb5d74b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move widgets Application example to manual testsAxel Spoerl12 hours2-27/+10
| | | | | | | | | | | | | With 6e77da640aa84c1efe330d4a5224c9c7425ece57, the documentviewer demo's TxtViewer plugin has been fully documented in order to replace the Application example. This patch moves the application example to manual tests. Pick-to: 6.5 Change-Id: I67d975e478c7bc840613c8af1301a4eafe8f1a42 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QXmlStreamReader: Add key/value to "Invalid attribute" error messageAxel Spoerl12 hours1-1/+1
| | | | | | | | | | | | | | When QXmlReaderPrivate::startDocument() parses declarations, it reports an error if a declaration contains an unknown attribute. The message doesn't mention the invalid attribute's key and value, so the user has to guess which one is the faulty declaration. This patch extends the error message by adding the respective key/value pair. Pick-to: 6.5 Change-Id: I7f5a228bed44937472880c3b3d63d5e816b39361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* macOS: Disable minimize button for Qt::Dialog windows by defaultTor Arne Vestbø23 hours1-0/+7
| | | | | | | | | | | Regression after 4c78ef80ca7573cd2eb054cdf1667837b43e6c58, where we moved the window titlebar button logic from QCocoaWindow's windowStyleMask function to updateTitleBarButtons. Fixes: QTBUG-114064 Pick-to: 6.5 Change-Id: Idb0870571e88fa2962af36decd9bc7b53c35664d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QVariant: add rvalue overload of fromStdVariant()Marc Mutz39 hours2-3/+24
| | | | | | | | | | | | | | | | | | | Extract Method fromStdVariantImpl() to share the otherwise more-or-less identical implementation between the two overloads. Don't use a constrained template version of fromStdVariantImpl() as fromStdVariant(), because the constraint would have to be very complex to continue allowing subclasses of std::variant to be passed. As a drive-by, mark the valueless_by_exception() path Q_UNLIKELY. [ChangeLog][QtCore][QVariant] Added overload of fromStdVariant() taking rvalue std::variant<>s. Fixes: QTBUG-114134 Change-Id: Ia1c7ae93ab421e6689dc9f2d8d0c2295b23cbbf6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QVariant::fromValue: Add rvalue optimizationFabian Kosmale39 hours3-5/+117
| | | | | | | | | | | | | | | | | | When passing an rvalue-reference to QVariant, there is no reason to make a copy if the type is moveable. Moreover, we know that the pointer which we construct from the object passed to fromValue non-null. We make use of both facts by parametrizing custom_construct on non-nullness and availability of a move-ctor, and then dispatching to the suitable template. We need to keep the const T& overload, as otherwise code which explicitly specializes fromValue and passes a const lvalue to it would stop to compile. [ChangeLog][QtCore][QVariant] Added fromValue() overload taking rvalues. Change-Id: I44fb757d516ef364fe7967bc103b3f98278b4919 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use platform drags for drags of docks and toolbars on waylandDavid Redondo41 hours6-7/+130
| | | | | | | | | | | | | | | | | | On Wayland we can't know where windows are in relation to each other so the whole mechanism was broken, toolbars were unmovable once undocked and could be blindly redocked. Dockwidgets had native toolbars to move them around but could not be redocked. This introduces an alternative code path that uses a platform drag with a special mimetype that enables the platform to issue a combined drag and window move using the relevant protocol. Should the protocol not be available this doesn't make things actively worse as it will be similar broken as before. Fixes: QTBUG-87332 Change-Id: I3b8bdc0b1bc22569a64cb8bf7ca7d37d223936a6 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CTF: Use static with operatorAntti Määttä44 hours1-2/+2
| | | | | | | | | | Also fix coding style in the operator. Pick-to: 6.5 Change-Id: Ia8f85a7bb7aa2d6f55923c80f72b734fc8dbd693 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* CTF: Properly handle invalid session fileAntti Määttä44 hours1-9/+16
| | | | | | | Pick-to: 6.5 Change-Id: Iabb2621364b5256ac89ec8cb7fafb0a9d346515d Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* CTF: Add qt_error_string to file open warningAntti Määttä44 hours1-1/+2
| | | | | | Pick-to: 6.5 Change-Id: I85e1aff7689b6592ad2da1e91f480848eea317eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CTF: Fix coding styleAntti Määttä44 hours1-4/+4
| | | | | | Pick-to: 6.5 Change-Id: Idf3a593949c3ac58438d499e2487375d20bebab7 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* CTF: Use QT_FSTAT to read file sizeAntti Määttä44 hours1-6/+9
| | | | | | | Pick-to: 6.5 Change-Id: Ic4b184e1ed51d8e30c2305a5ead619117a505518 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* CTF: Use access to check if location is writableAntti Määttä44 hours1-5/+2
| | | | | | | | Pick-to: 6.5 Change-Id: Ic6afcf74432f176374d47e828b480e4d2499c670 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* Add Gui_sync_headers as the explicit dependency for Test moduleAlexey Edelev46 hours1-0/+5
| | | | | | | | | | The Test module uses Gui header files implictily without explicit Gui linking. We need the dependency chain at least between the module_sync_headers targets to make sure that all header files required for successful module build are present "in time". Change-Id: I40fd81cceeb0e0e8271db4ba33fd914eb484d001 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Link to Application Permissions docs from Qt Core overviewTor Arne Vestbø46 hours1-0/+1
| | | | | | Pick-to: 6.5 Change-Id: Ida5ff78967b5e9165f83131ee67ac4f12bd1936b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CTF: Do not check nullptr before deleteAntti Määttä2 days1-2/+1
| | | | | | Pick-to: 6.5 Change-Id: I3935d7a0898f20804e8dc6f916cb9a5954230c0f Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* CTF: Use qEnvironmentVariableAntti Määttä2 days1-1/+1
| | | | | | | Pick-to: 6.5 Change-Id: I492da6862491cc476355a318652bd9901fffcd76 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* CTF: Remove extraneaus includeAntti Määttä2 days1-1/+0
| | | | | | Pick-to: 6.5 Change-Id: I6ebe1d6a492e8606762a78bae422fa86440d18be Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* QVariant: fix shadowing of QVariant::Type/ListMarc Mutz2 days2-44/+44
| | | | | | | | | | | | | | QDoc mis-interprets the Type and List template arguments as referring to the QVariant::Type enum and its List enumerator, resp. To fix, rename the template parameters from Type to T and from List to U. Task-number: QTBUG-112187 Change-Id: Ib4093acdd84cc86a0f85dcc5046b6e7da7885a44 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QVariant: Support emplaceFabian Kosmale2 days2-0/+102
| | | | | | | | | | | | | | [ChangeLog][QtCore][QVariant] Implemented in-place construction for QVariant. The constructor taking std::in_place_type<Type> constructs an object of type Type directly inside QVariant's storage, without any further copy or move operations. QVariant::emplace() does the same when replacing the content of an existing QVariant and tries to reuse previously-allocated memory. Fixes: QTBUG-112187 Change-Id: I16614ad701fa3bb583976ed2001bb312f119a51f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QByteArray: add STL-style assign()Dennis Oberst2 days2-0/+88
| | | | | | | | | | | | | | | | | Implemented assign() methods for QByteArray to align with the criteria of std::basic_string, addressing the previously missing functionality. This is a subset of the overloads provided by the standard. Reference: https://en.cppreference.com/w/cpp/string/basic_string/assign [ChangeLog][QtCore][QByteArray] Added assign(). Fixes: QTBUG-106199 Change-Id: I899b14d74e8f774face8690303efb8610ead95b5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qdbusxml2cpp: Fail if -c option is used with multiple interfacesIevgenii Meshcheriakov2 days1-1/+8
| | | | | | | | | | Exit with an error code when -c option is specified by the command is not processing a single interface. Mention this in the option description. Fixes: QTBUG-36405 Change-Id: I7ea217c780d37332278c634f030d20040b7459e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant::fromStdVariant(): protect against accidental fromValue() ADL pick-upsMarc Mutz3 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | The use of unqualified fromValue(arg) in the visitor implementation invites non-QVariant fromValue(T) overloads to be found using ADL, which just happen to compile because their return value implicitly converts to QVariant (like most stuff does). To rule this out, use FQN QVariant::fromValue() to switch off ADL. [ChangeLog][QtCore][QVariant] The fromStdVariant() function used an unqualifed fromValue() call to convert each alternative type in the std::variant. It now uses qualified QVariant::fromValue() to avoid picking up unrelated fromValue() overloads whose return value just happens to implicitly convert to QVariant. Amends 5927acaf652e2dfacd777a7491c217aefd1118ef. Pick-to: 6.5 6.2 Change-Id: Ica21b08c919459d0a740af03f451e4ffe224b641 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QHash: reduce duplication between two lookupsMårten Nordheim3 days1-16/+4
| | | | | | | | | findNode and findBucket are virtually the same Change-Id: I9ba8534d66f0feaa2dea7c2b9beacf8d5faddb52 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWaitCondition/win: Enable actually waiting longer than u32::maxMårten Nordheim3 days1-21/+31
| | | | | | | | | | | | | This is done, in part, by swapping the dependency between the wait() overloads. Furthermore, since QDeadlineTimer is 64-bit and the Win32 API is 32-bit we have to wait more than once to actually wait until the deadline is reached. The unsigned int overload has no documented concept of waiting 'forever'. Though, internally we turn u32::max into 'forever'. Change-Id: I47d719c0c29bcd6fa0c0043d168a456f2c05774e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add SKIP_LINTING for generated source filesOrkun Tokdemir3 days1-2/+12
| | | | | | | | | | Since the `SKIP_LINTING` source property was added to upstream cmake here https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8467, that source property should also be set for source files generated by qt's cmake public api Change-Id: Ic9d6c119abbc7c51b146176970c1d0bafb097abf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Platform theme: fill QPalette::AccentColor with OS valueYuhang Zhao3 days2-20/+42
| | | | | | | | | | | The AccentColor role, added in Qt 6.6, is currently populated with a default value. This patch implements populating the brush with OS values for Windows and macOS. Change-Id: Ic243c3b8664d50db3a2096a034de6ba672d9e2d2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* CTF: Cleanup writing uuid to Ctf packetAntti Määttä3 days1-6/+1
| | | | | | | | Use QUuid::toBytes instead of manual conversion. Pick-to: 6.5 Change-Id: Iba2c32eb258e21cd207b5bc19af0409b6b9e26b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refine the rhi-based flush logicLaszlo Agocs3 days1-1/+30
| | | | | | | | | | | | Amends 244daf4cfc44587c8c7c87e481688e840cc21c77 Fixes: QTBUG-113557 Fixes: QTBUG-113652 Task-number: QTBUG-108277 Pick-to: 6.5 Change-Id: I9e369b0e1261ea37eb2dedd80083f82f5df97b30 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QStringBuilder: remove unneeded specializationsVladimir Belyavsky3 days1-35/+0
| | | | | | | | | | Remove legacy QStringBuilder's specializations: template <> class QStringBuilder<QString, QString> template <> class QStringBuilder<QByteArray, QByteArray> Change-Id: I49238356620712009b32286ebc42e52fe43ede63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QSemaphore: add a note to update to noexcept in Qt 7Thiago Macieira4 days1-0/+5
| | | | | | | | | | | | | | | | | | | The QSemaphore acquire & release functions, plus the constructor and destructor, can be made noexcept on platforms that use futexes (currently, Linux and Windows; likely macOS by the time we make 7.0). I didn't make the change right now because the acquire and release functions have narrow contracts on the int n values. I didn't make that change now because it make a mess of the code, for little gain as this class isn't used that often. Plus, we may want to investigate whether we want to keep the multi-token semaphore functionality around (something neither POSIX sem_t nor std::counting_semaphore have), or split that off into a separate class like QBasicMutex / QMutex / QRecursiveMutex was done. Change-Id: Ieab617d69f3b4b54ab30fffd175b27813728f2ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QNativeSocketEngine: fix warning about uninitialized variablesThiago Macieira4 days1-1/+2
| | | | | | | | | | | | | | In function ‘int qt_safe_connect(int, const sockaddr*, socklen_t)’, inlined from ‘bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress&, quint16) qnet_unix_p.h:111:38: error: ‘sockAddrSize’ may be used uninitialized [-Werror=maybe-uninitialized] qnativesocketengine_unix.cpp:396:18: note: ‘sockAddrSize’ was declared here qnativesocketengine_unix.cpp:476:14: error: ‘aa.qt_sockaddr::a.sockaddr::sa_family’ may be used uninitialized [-Werror=maybe-uninitialized] qnativesocketengine_unix.cpp:471:17: note: ‘aa’ declared here Introduced by commit 45a03fc50662e0977eecf57d62cbe9d8348eb903. Change-Id: I5f7f427ded124479baa6fffd175fbf006c098854 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Only consider QScreen virtual siblings that have been addedTor Arne Vestbø4 days1-2/+5
| | | | | | | | | | | | | | | | | If a platform builds up a list of QPlatformScreens, and then adds them incrementally, while at the same time implementing virtualSiblings in QPlatformScreen to return the full list of screens, the virtual sibling QScreens will contain nullptrs for each non-added screen. It could be argued that this is the fault of the platform plugin, since it's reporting a virtual sibling that it hasn't added yet, but we can easily work around it in QScreen as well. Fixes: QTBUG-113977 Pick-to: 6.5 Change-Id: I4b9472646a5cc10b6fd35c606e3ae15941da1587 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QVariant: visually separate PrivateShared and Private nested classesFabian Kosmale4 days1-0/+1
| | | | | | | | | Add an empty line between the two. Pick-to: 6.5 Change-Id: If1c50ebb0b825acc53364cce2e083332367e757c Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QVariant: Extract Method PrivateShared::computeOffset()Fabian Kosmale4 days2-1/+7
| | | | | | | | | | | | Will be re-used in the upcoming emplace() function. No attempt is made to re-write the expression to be more readable. That's left for another commit. Task-number: QTBUG-112187 Change-Id: Id391b78f1477c5225beda8a32c4f6c1393dd51bb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QVariant: Extract Method PrivateShared::computeAllocationSize()Fabian Kosmale4 days2-1/+8
| | | | | | | | | | Will be re-used in the upcoming emplace() function. Task-number: QTBUG-112187 Change-Id: Ie2b4570b7ba6c9d0ce938203933758a0d0d59f5a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QVariant: simplify condition guarding customClear() callsMarc Mutz4 days1-2/+2
| | | | | | | | | | | | | | Due to short-cut evaluation of the built-in op||, we can do the following transformation: - (X && Y) || !X + !X || Y Pick-to: 6.5 Change-Id: Ia5ae1dd60bdb663aa4648c09372be1598591110d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QVariant: remove outdated docs about reimplementing clear()Marc Mutz4 days1-5/+0
| | | | | | | | | QVariant::clear() hasn't been virtual since at least Qt 4... Pick-to: 6.5 6.2 5.15 Change-Id: If6b5669d91f8d9c7ed2d152d18852a8d6f8e491a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QArrayDataPointer: fix optional projection in assign()Dennis Oberst4 days1-1/+7
| | | | | | | | | | | | | | | | | When a custom projection is used in the assign() function, there is a problem with the optimization step at: dst = std::uninitialized_copy(first, last, dst); The issue arises because this copy doesn't respect the custom projection. To address this problem, we need to ensure that the optimization is only applied when using the identity projection. Amends: 7ca633d9a82f90e5bba5e12ba923bfb0a257af63. Change-Id: I912525c716333ee2c22c419f2bf70201086c5635 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove unused IS_RAW_DATA() macros from q{string,bytearray}.cppEdward Welbourne4 days2-5/+0
| | | | | | | | | | They were made redundant at Qt 6, so now they're just defined and undefined. Don't even do that any more. Change-Id: Ic4a4a4c39c50c9af417ea6c52be5f69a2d4856c6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QObject: add setProperty() overload taking rvalue QVariantMarc Mutz4 days3-4/+37
| | | | | | | | | | | | | | | | Instead of duplicating the long-ish implementation, simply pass the variant as pointers to const and mutable, and implement a runtime version of std::forward. [ChangeLog][QtCore][QObject] Added setProperty() overload taking an rvalue QVariant. Fixes: QTBUG-113281 Task-number: QTBUG-112762 Change-Id: Ifdc8f626ad5db138073474c3bd95ec7308c4396b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add uniformCellWidths and uniformCellHeights to QGridLayoutEngineMatthias Rauter4 days2-0/+59
| | | | | | | | | | | | | | Some users wish to make layouts with uniform column widths or uniform row heights, ignoring the sizeHints of individual items. This patch enables this mode in the QGridLayoutEngine, used by the QuickLayout. The sizeHints are aggregated and their average preferred size and extreme minimum and maximum sizes are respected in the layout. Change-Id: Ibb9409eb0a11a1ce8bb305f44a4cb0071c871ec9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* tracepointgen: Fix double comma in enumsAntti Määttä4 days1-0/+4
| | | | | | | | | Remove commas at the end of the lines. Pick-to: 6.5 Change-Id: Idf731ac5de64787276c1fdf798eb429b8f73213b Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix reading multiple rangesAntti Määttä4 days1-4/+10
| | | | | | | | | | Fix reading ranges from metadata when there are multiple RANGE elements in the metadata. Pick-to: 6.5 Change-Id: I1d176ded539c55ce72664c9c7c3f65d694be898c Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>