summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add Axivion analysis commandsHEADdevMatti Paaso2023-05-174-1/+197
| | | | | | Task-number: QTQAINFRA-5244 Change-Id: Ib577237d73863140386edce9acc2913acc9e2813 Reviewed-by: Toni Saario <toni.saario@qt.io>
* QPartialOrdering: update docs and change parameter namesDennis Oberst2023-05-172-59/+87
| | | | | | | | | | Let's be more explicit with QPartialOrdering's showcase of its functionality in the docs and define a possible function-declaration. Also change all parameter names to lhs and rhs, respectively. Pick-to: 6.5 6.2 5.15 Change-Id: Ibc5c0b418bff3278e10e415c7f5bfa86227fc066 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* CTF: Use UTC date-time in metadataAntti Määttä2023-05-171-7/+6
| | | | | | | | Force UTC date-time and use ISO date-time. Also isMonotonic is always true so the conditionals can be removed. Change-Id: I7419d62ee7a526c3c6d4b7628d52d45b601e84d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray/QList: make assign() return a reference to *thisMarc Mutz2023-05-175-22/+35
| | | | | | | | | | | | | While std::vector::assign() returns void, std::basic_string::assign() returns std::basic_string&. In Qt, we want to be consistent between {QVLA,QList,QString,QByteArray}::assign(), and returning *this is the more general solution, so do that. Task-number: QTBUG-106196 Task-number: QTBUG-106200 Change-Id: I2689b4af032ab6fb3f8fbcb4d825d5201ea5abeb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QList: re-use the prepend buffer, if any, on assign()Marc Mutz2023-05-172-14/+138
| | | | | | | Task-number: QTBUG-106196 Change-Id: I62d8610529cab528ae1b114d29707133b4fc28dc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDnsLookup: reject looking up domain names that are too longThiago Macieira2023-05-162-1/+4
| | | | | | | | | | | | | | | | | Both the libresolv and the Win32 API operate in 32-bit quantities, so we could be aliasing with low values. In any case, RFC 1035 limits to 255. Various objects and parameters in the DNS have size limits. They are listed below. Some could be easily changed, others are more fundamental. labels 63 octets or less names 255 octets or less Pick-to: 6.5 Change-Id: I3e3bfef633af4130a03afffd175e8957cd860bef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSemaphore: add QDeadlineTimer APIThiago Macieira2023-05-166-148/+64
| | | | | | | | This removes the last use of QtPrivate::convertToMilliseconds(). Change-Id: I6f518d59e63249ddbf43fffd1759fee2e00d36f4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* shortcuteditor example: Don't reference null-actionTor Arne Vestbø2023-05-171-5/+5
| | | | | | | | | The parent nodes of the leaf ShortcutEditorModelItem nodes do not have an action item. Pick-to: 6.5 Change-Id: If9f8554101974a96f95db048b1bd691f3e89a23a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix unused variable 'FakeErrnoForThrow' [-Wunused-const-variable]Tor Arne Vestbø2023-05-161-10/+10
| | | | | | | Amends ba05af82d3d8b7cbc6e22f93cbf1e3d1575afefe. Change-Id: I979d43af3e937edd69b75c9138f1b24ebdc8fac3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QModelIndex: improve qHashThiago Macieira2023-05-161-1/+7
| | | | | | | | | | | QModelIndex's qHash is really bad. It was retained from Qt 5, but ends up producing poor results in large hashes. This can't be fixed in Qt 6. Task-number: QTBUG-113613 Change-Id: I5f7f427ded124479baa6fffd175f7810e1dc2580 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* QDnsLookup: make the query() function non-staticThiago Macieira2023-05-165-17/+16
| | | | | | | Simplifies arguments and will allow me to add stateful helper methods. Change-Id: I3e3bfef633af4130a03afffd175d6044829a96f2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup/Windows: don't append domain search suffixesThiago Macieira2023-05-161-1/+1
| | | | | | | | | | | | The Unix code doesn't do that. [ChangeLog][Important Behavior Changes] QDnsLookup on Windows will no longer append the system's configured domain name for look ups that contained only a single label (that is, no dots). This matches the Unix behavior. Change-Id: I5f7f427ded124479baa6fffd175f69e537cf9ca2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup/Unix: rework the buffer-size check codeThiago Macieira2023-05-161-34/+31
| | | | | | | | | | | | | | | | | This is neater with a simple offset and avoids the potential UB code this was carrying in: p += size; (p < response + responseLength) It's UB to add to a pointer a size that moves it past the end of its array. In practice we don't expect this to happen because of construction (p is always pointing to a heap or auxiliary-thread stack buffer), but in theory it could happen that said buffer is too close to the end of the virtual address space and adding `size` causes it to overflow back to small values. Change-Id: I5f7f427ded124479baa6fffd175f59939c15c666 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QArrayDataPointer: add a C++20 ranges-style optional projection to assign()Marc Mutz2023-05-161-4/+6
| | | | | | | | | | | | This will be useful for implementing QString::assign(), which otherwise has the problem that it's d_ptr is based on char16_t, but it's assign() is supposed to be able to deal with iterators whose value_type returns QChar. Task-number: QTBUG-106198 Change-Id: I87882bf749b4e21b7b32391167962d3e6bae9983 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QList: add STL-style assign()Dennis Oberst2023-05-165-2/+187
| | | | | | | | | | | | | | | Implemented assign() methods for QList to align with the criteria of std::vector, addressing the previously missing functionality. Reference: https://en.cppreference.com/w/cpp/container/vector/assign [ChangeLog][QtCore][QList] Added assign(). Fixes: QTBUG-106196 Change-Id: I5df8689c020dafde68d2cd7d09c769744fa8f137 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_ContainerApiSymmetry: fix spacing of template <typenameMarc Mutz2023-05-161-1/+1
| | | | | | | | This file, like the majority of qtbase, uses a space between template and the opening of the template argument list. Add it. Change-Id: I927cb2b1b9620ae108e913343d995373493e8981 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* RSS listing example: prefer setDevice() over addData(readAll())Edward Welbourne2023-05-161-13/+9
| | | | | | | | | | | | | | | The network reply is a QIODevice, so the QXmlStreamReader can be set to read from it directly, which it might potentially do incrementally, rather than by reading all the data in one go. In the process, change the set-up of the reply to first check that it got a valid URL, then check it got a reply, before doing things with that reply. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I3642e24e0d10721e4a0325b35a94dcb5dfbcd4e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Clarify documentation about QGuiApplication::setDesktopFileName formatDavid Edmundson2023-05-161-3/+3
| | | | | | | | | | | Whislt the documentation says "base name" there are lots of examples in the wild of clients using the wrong name here. Writing it explicitly might help. Task-number: QTBUG-75521 Pick-to: 6.5 Change-Id: Ic17ca161cf58449e85e25d9b6b8ace44fe14f18a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Detect menu bar roles for untranslated menu titles as wellTor Arne Vestbø2023-05-162-36/+71
| | | | | | | | | | | | | | | | | | | | | | | If an application added an "About" menu action, and then loaded the qtbase translations, we would try to match the incoming menu title ("About") against QCoreApplication::translate("QCocoaMenuItem", "About"), which since qtbase provides translation in the QCocoaMenuItem context would fail, and we would not detect the menu item role successfully. For this to work, the application developer would need to add their own translations for every menu item, and these translations would have to match the QCocoaMenuItem translations in qtbase. By also comparing the menu titles against the untranslated heuristics we now account for the situation that the app has not translated its menu items. If the app does add translations of its menu items these still need to match the QCocoaMenuItem context translations. Change-Id: Ic2f019cd42b7e080187f9738840f84b0cec239df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make sure that -utf-8 flag only apply to MSVCAlexey Edelev2023-05-161-1/+1
| | | | | | | | | | | | | | | | INTERFACE scope propagates the '-utf-8' flag to the target dependencies. So if Qt is built using MSVC, but the depending targets use different compiler this flag will break the compilation. Guard the flag using genex. Amends e3cc2487ce63cae42d8054b38fdb54abe8545007 Pick-to: 6.5 Task-number: QTBUG-112737 Change-Id: Ie0576667108820dd61035debfc1fcc030ef3536a Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the "classwizard" exampleVolker Hilsheimer2023-05-1624-199/+26
| | | | | | | | | | | | | | It adds nothing new to what the trivial and license wizard examples show, other than a bunch of somewhat messy and outdated code to generate C++ code files based on the input. The example is referenced in a few parts of the documentation, but there are equivalent snippets in the trivial and license wizard examples, so point at those instead, and add some relevant API usage where needed. Pick-to: 6.5 Change-Id: If1ff57e775bad28920d9e019aeccae69d1f4d127 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Convert "extension" dialog example into snippetsVolker Hilsheimer2023-05-1613-129/+37
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-108751 Change-Id: I8ca4e058b832674dc0c8b84024cb70a667ee8db4 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Make QGenericRunnable a private nested class of QRunnableMarc Mutz2023-05-161-1/+2
| | | | | | | | | We don't intend to make QGenericRunnable public API, so prevent people from using it outside QRunnable::create(). Change-Id: I49f182463ca307aaf6370adfa43bae14b4ce0df8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't grab QWhatsThis background on WindowsOliver Wolff2023-05-161-17/+0
| | | | | | | | | | | | | The workaround also is no longer needed on Windows so it can be removed completely. This patch amends 6a28b391f71d8626c1793aa3bf732dea10519653. Task-number: QTBUG-113556 Pick-to: 6.5 Change-Id: I69155e54da26acd49faf72816d1439fb3e322de9 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* q20chrono: Fix feature test macro checkFabian Kosmale2023-05-161-2/+2
| | | | | | | | | | | | | | | | | While the comment behind the else already had the correct value, the actual check and the comment behind the endif had the wrong one. This would cause build /headers clean check failures when using older compilers in C++20/2a mode. Also, remove the check for __cplusplus: A sufficiently high enough value of __cpp_lib_chrono already implies __cplusplus > 201703L; the only thing the check did was to hide the issue on more modern compilers. Fixes compilation with e.g. gcc 9.3. Amends bde5eeecaf35f7b7a94b7878289a8e7fcd057afa Change-Id: I74e761d9dc4048e9abf9cea9ea7e63260ea1111e Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Revamp the shapedclock exampleVolker Hilsheimer2023-05-164-70/+34
| | | | | | | | | | | | | | | | Rename it to "Translucent Background", as that's what the example shows how to do. And modern applications shouldn't use a (binary) mask to create shaped windows. Instead, set the TranslucentBackground attribute, don't paint pixels that should be fully transparent and use anti-aliased or semi-opaque painting for pixels that should be translucent. Adjust the example and documentation accordingly. Move the statment that widget masks create coarse visual clipping to the QWidget::setMask documentation. Pick-to: 6.5 Change-Id: Id49d854093f2cb471afb178d32723081c7543543 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Accessibility: call update handler even if not activeVolker Hilsheimer2023-05-161-4/+4
| | | | | | | | | | | | | | | | | | Update handlers should get informed about accessibility updates even if the platform's accessibility bridge is not activated. E.g. an analytics or test framework (like Qt Insights) might want to use the handler to record relevant events. While many events are only delivered if QAccessible::isActive returns true to avoid spending computing time on creating the relevant event data (e.g. in item views that can be expensive), the most important events are still delivered. And requiring activation of accessibility before events can be recorded through a handler has side effects on performance, which we want to avoid. Change-Id: I896b873574f6ad2527f755912d4950aa1f898097 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* qoffscreensurface.h: Add module to Q_MOC_INCLUDEFabian Kosmale2023-05-161-1/+1
| | | | | | | | | | | Depending on the build configuration, just using <QScreen> will not find the header. Pick-to: 6.5 Fixes: QTBUG-113619 Change-Id: Iaaf6f75ce82f8e32a1b1835614accd898b45824e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QHash: suppress GCC 12 & 13 warning that QHash could overflowThiago Macieira2023-05-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can't unless you really have so many elements that it should overflow. When growing, we call bucketsForCapacity(), which won't overflow; when copying/detaching, we allocate the exact same amount of memory that we've previously allocated, so that has to be good too. There was nothing wrong with the previous code. The warning was showing how the compiler had detected a possible overflow and caused a call to operator new(-1) to force std::bad_alloc to be thrown. Disabling the warning did not work in LTO mode. So we mimic it: Q_CHECK_PTR will call qBadAlloc() for us if exceptions are enabled, or qt_check_pointer() if not but assertions are (if neither are, then we have no means of reporting the error, so let's just assume that it can't happen). In function ‘allocateSpans’, inlined from ‘__ct ’ at qhash.h:581:48, inlined from ‘detached’ at qhash.h:596:20, [...] qhash.h:551:19: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] Commit 1d167b515ef81ba71f3f47863e66d36ed6d06c1c is the likely source of this warning. Fixes: QTBUG-113335 Pick-to: 6.5 Change-Id: Ieab617d69f3b4b54ab30fffd175bb8d36228209c Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* QHash: centralize the span allocationThiago Macieira2023-05-151-9/+17
| | | | | | | | | Deduplicates code and will allow me to insert some magic. Pick-to: 6.5 Task-number: QTBUG-113335 Change-Id: Ieab617d69f3b4b54ab30fffd175bb4a2af610ff8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Doc cleanup: remove old gettingStarted tutorial, move doc fileVolker Hilsheimer2023-05-1522-517/+1
| | | | | | | | | | | The Qt getting started tutorial is based on the "notepad" example files in this directory, the gettingStarted/gsQt files are completely unused and not referenced in documentation. Pick-to: 6.5 Change-Id: If8caebd2c8359c81f94f72ef40a1cf92a021a83f Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QDnsLookup/Unix: modernize with qFromBigEndianThiago Macieira2023-05-151-10/+10
| | | | | | | Instead of explicit code. Change-Id: I3e3bfef633af4130a03afffd175d515f846a629a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDnsLookup/Unix: do skip DNS records that aren't of class INThiago Macieira2023-05-151-0/+3
| | | | | | | | | | | | There's nothing saying the server can't supply those to us, so let's explicitly skip them. The Windows version already does this because the windns.h API only supports records of class IN. Test for this after setNameserverPort() is added. Pick-to: 6.5 Change-Id: I3e3bfef633af4130a03afffd175e6ddc756c91c5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTabBar: Add testcase for tabs not scrollingVolker Hilsheimer2023-05-151-0/+26
| | | | | | | | | | | Verify that changing a tab's text doesn't scroll. Fixes: QTBUG-45381 Task-number: QTBUG-113140 Pick-to: 6.5 Change-Id: I02ace9d3fcaa20d8ff5d87ccca5d96a4114b0fb0 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* QProcess/Unix: enable setChildProcessModifier for startDetachedThiago Macieira2023-05-152-46/+50
| | | | | | | | | | | | | | Do this by making the actual child-execution code common between startProcess() and startDetached(). It does mean we've moved the chdir() operation from the child to the grandchild process, though. [ChangeLog][QtCore][QProcess] The modifier function set with setChildProcessModifier() will now also be executed when the process is started with startDetached(). Change-Id: Icfe44ecf285a480fafe4fffd174d9aa57dd7dfff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QProcess/Unix: improve the error message if the child modifier throwsThiago Macieira2023-05-152-4/+8
| | | | | | | | Functionality added for 6.5, but after translatable string freeze. Change-Id: Icfe44ecf285a480fafe4fffd174d984c5349e0cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QProcess/Unix: protect against stack unwinding in the child process stubThiago Macieira2023-05-153-4/+87
| | | | | | | | | | | | | | | | | | | | | | There are two types of stack unwinding that can happen on Unix systems: C++ exceptions and PThread cancellations (on some systems, like Linux, PThread cancellations can be caught in catch(...) statements). We call a variety of PThread cancellation functions from inside the child stub, like close(). To avoid problems, we disable PThread cancellations completely before fork() or vfork(). The C++ exception case is simpler, because we can be sure of catching them with the catch (...) statement and simply transform them into an error message. This is also testable, which the PThread cancellation isn't. The error message isn't ideal because we're string-frozen. I'll improve it for 6.6. Pick-to: 6.5 Change-Id: Icfe44ecf285a480fafe4fffd174d97a475c93ff1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* MOC: pass the erroneous Symbol as an arg to Parser::error() overloadAhmad Samir2023-05-154-19/+36
| | | | | | | | | | | | | | | | | | | | We already know the Symbol while parsing, passing a reference to it to error() makes it simpler to construct the error message. This fixes an issue where reporting an error about "NONSENSE" in e.g.: Q_PROPERTY(Foo* foo NONSENSE foo) would be off-by-one and the error message would say: path/to/file.h:11:1: error: Parse error at "foo" instead of 'at "NONSENSE"', which is where the parser actually found an unexpected attribute. Fixes: QTBUG-36367 Pick-to: 6.5 Change-Id: Ief70e544af41f7575fbeea9b936fa8197c3ef43d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update screenshot exampleVolker Hilsheimer2023-05-152-1/+1
| | | | | | | | Refresh screenshot of the example, and remove "Example" word from title. Pick-to: 6.5 Change-Id: I88c00db5b25536c45622bc580a9da5aaf01610bc Reviewed-by: Liang Qi <liang.qi@qt.io>
* Don't grab QWhatsThis background on non-Windows platformsTor Arne Vestbø2023-05-151-0/+9
| | | | | | | | | | | | | The logic was introduced in 186589abd48b17fdb9b631211008753e2d1701b3 due to Windows supposedly not supporting NoSystemBackground. It's not clear whether this is still the case, but as this workaround causes problems on other platforms, such as bringing up the screen capturing permission dialog on macOS, it should be limited to Windows. Fixes: QTBUG-113556 Pick-to: 6.5 Change-Id: I197adb5fc177faebc0f2fcd28612e3daa0c22ed5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QEventDispatcher/WASM: fix a lambda nameAhmad Samir2023-05-151-3/+3
| | | | | | | | | It's returning milliseconds not nanoseconds. Change-Id: I7dbc3f4043694b6ddf87c6ad9e4d20d3a9af0fd1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* Shrink the CBOR dumper example's imageEdward Welbourne2023-05-151-0/+0
| | | | | | | Apply optipng -o7 -zm9 -strip all to the image to make it more compact. Change-Id: Iebfc1f767759b5beac47bd7efa61d1c655163f03 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Darwin: Use direct runtime interface to manage autorelease poolsTor Arne Vestbø2023-05-151-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The Objective-C runtime supports autorelease pools via a language specific ABI supplement, akin to the “Itanium” generic ABI for C++. https://clang.llvm.org/docs/AutomaticReferenceCounting.html#runtime-support These interfaces are used by NSAutoreleasePool internally, as well as inserted by the compiler when using the @autoreleasepool syntax in Objective-C code. We have our own wrapper, QMacAutoReleasePool, which allows us to set up pools in C++ code as well. We now use these lower level interfaces in the implementation, instead of NSAutoreleasePool, as this reduces overhead due to not needing to allocate and destroy a NSAutoreleasePool. This also opens up the possibility of using Automatic Reference Counting (ARC) in Qt down the road, as explicit NSAutoreleasePool usage is forbidden in that mode (while @autoreleasepool is not, and uses the runtime ABI internally as before). Change-Id: I06fdb4a24ae4972820f866e0a129a1b355bc8a6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Darwin: Disable QMacAutoReleasePool tracker unless explicitly enabledTor Arne Vestbø2023-05-151-0/+4
| | | | | | | | | | | | There's a few orders of magnitude of overhead using QMacAutoReleasePool with the tracker enabled, so disable it even for debug builds, unless explicit auto release pool debugging has been enabled via the environment variable QT_DARWIN_DEBUG_AUTORELEASEPOOLS. Pick-to: 6.5 Change-Id: Iec00c703eb21e1914903954cfd02f9f6b1ec2a1f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Darwin: Disable QMacAutoReleasePool tracker in release buildsTor Arne Vestbø2023-05-151-2/+5
| | | | | | | | | | | It adds overhead that is noticeable, especially in tight loops that rely on an auto-release pool. For example, this improves the QLocale date to string transformations an order of a magnitude. Task-number: QTBUG-104785 Pick-to: 6.5 Change-Id: I246dc4e114bd75dd4e3e9e42b061c4c20c94d522 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Darwin: Remove QMacAutoReleasePool heap allocation detectionTor Arne Vestbø2023-05-152-68/+3
| | | | | | | | | | This is handled by the Objective-C runtime nowadays, where it will abort if the situation is detected, with the option to break on objc_autoreleasePoolInvalid to debug the situation. Pick-to: 6.5 Change-Id: Idf2c4aacc77e41a3deebf270303f4f13cfb0819b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move the addressbook tutorial into manual testsVolker Hilsheimer2023-05-1569-2/+1
| | | | | | | | | | | | | | The tutorial is building an elaborate UI around a QMap. It doesn't use structured data, and it doesn't use model/view (which the dedicated addressbook example in itemviews does). It's not a good way of building an application, and the individual APIs for creating layouts, dialogs, or import/export are explained well enough in other examples. Pick-to: 6.5 Change-Id: Iffe47a0f6e04a933edb917c877ae845f50b74b4a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QDBusMetaObjectGenerator: Use uniform loops to iterate over methodsIevgenii Meshcheriakov2023-05-151-15/+19
| | | | | | | | | Use the same structure for iterating over signals and other methods in 3 places. Introduce MethodMap type alias to make types shorter. Change-Id: I732b582fc8c47616037087b77a79eb13ecf17019 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Convert some loops to ranged for loopsIevgenii Meshcheriakov2023-05-159-154/+86
| | | | | | | | Convert some loops that are using Java-style iterators into ranged for loops for better readability. Change-Id: I14f6339608d201fe06a753be236db52815cbf5c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix case-sensitivity of exponent separator check in Cyrillic fall-backEdward Welbourne2023-05-152-1/+6
| | | | | | | | | | | | | | | | | When matching the locale's correct exponent separator, QLocale was doing a case-insensitive match; but the Cyrillic fall-back was matching case-sensitively, so failed to catch the case of lower-case e and its Cyrillic equivalent, when used in a Cyrillic font in place of the upper-case form of the other, where that's the locale's official separator. So make this comparison case-insensitive. Added some test-cases for the lower-case exponential separator. Pick-to: 6.5 Fixes: QTBUG-113443 Change-Id: I18e22d7b3451fbb61e87d5b93661eadff3c7356e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>