summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Windeployqt: also add internal modules to module listTimothée Keller2023-07-122-2/+4
| | | | | | | | | | | | | | Not adding internal modules to the windeployqt module list makes it give off nonsensical warnings, and can force the deployment of debug libraries despite a --release tag. Add them in to prevent this, and shave off the "Private" part of the module name if it exists to maintain compatibility. Fixes: QTBUG-114854 Pick-to: 6.6 6.5 Change-Id: I884fdc495f340ad20ba6257587da170d6c1a1415 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Normalize signal/slot signatures [1/2]: non-QPairMarc Mutz2023-07-125-16/+16
| | | | | | | | | | | | | | | | This is the result of running util/normalize, dropped some false positives: - it removed the space after "d, " in Q_PRIVATE_SLOT(d, foo()) - it removed spaces in moc text streaming of "SLOT(" << ... << ")" In addition, the tool replaces QPair with std::pair. This is surprising and therefore performed in a separate commit. Pick-to: 6.6 Change-Id: If4e3815d7c0840defc1b82bcbf41a8265acda0d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAtomicScopedValueRollback: fix CTAD for Q(Basic)AtomicPointerMarc Mutz2023-07-121-0/+7
| | | | | | | | | | | | | | | We need deduction guides to turn the AtomicPointer template argument (the pointee) into a pointer: QAtomicPointer<int> → QAtomicScopedValueRollback<int*> Extend a test to cover pointers, too. Fixes: QTBUG-115105 Pick-to: 6.6 6.5 Change-Id: Ib416c6a43e4da480b707a0bf6a10d186bbaad163 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Windows style: use correct value for title bar heightYuhang Zhao2023-07-122-11/+9
| | | | | | | | | | | | | | | | The title bar height = caption bar height + resize border thickness. This calculation is used by many open source repositories for quite a long time, including Microsoft's own famous products such as Windows Terminal. And if you use AdjustWindowRectEx() to get the title bar height, the result is also exactly the same, so this should be the correct calculation. Normally, when DPI is 96, it should be 23 + (4 + 4) = 31px. Pick-to: 6.6 Change-Id: I0a2de3b55d5b62327eacc7e2ff5dc23771b8efdb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Expose metatypes internal functions for further use in qmlAlexandru Croitor2023-07-121-36/+172
| | | | | | | | | | | | | Extract the code that propagates metatypes files into separate functions, so that they can be used in the qml api to propagate a qml module backing library's metatype file to its associated plugin. It's a bit messy due to the tech debt around installation, but the behavior of the code in qtbase should not change. Task-number: QTBUG-115152 Change-Id: I85dfcc4c76e9c41239dc0380920e68a3a6400815 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Fix for checking clipboard text mime typeBartlomiej Moskal2023-07-122-7/+7
| | | | | | | | | | | | | | | | | | | | | Different mime types are widely used on mobile devices. For example all text copied from gmail is copied as text/html type. After 2937cf91c74b6562bf56e8872dfd2bfaafebb3cc commit there is a regression that makes it impossible to paste any text different than "text/plain". To fix it, any "text/*" mime type should be treat as it contains a text (not only "text/plain"). That will allow to paste different text mime types. During this work also tst_qclipboard testset was turned on for Android and new test (getTextFromHTMLMimeType) was added. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-113461 Change-Id: I3ef9476b8facdc3b61f144bd55222898390127c9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QNetworkInterface/Linux: fix mismatch of pointer and pointeeThiago Macieira2023-07-111-3/+6
| | | | | | | | | | | | | | | | | It was hard to see the problem because of the lambda, combined with reinterpret_cast on the output of non-typesafe C macro. NLMSG_DATA returns a void*, so use static_cast to be sure not to do something wrong. This only affected the code that dealt with unexpected replies from the Linux kernel, which it doesn't send. So I don't expect this fixes any improper QNetworkInterface behavior. Found by CodeChecker. Pick-to: 6.5 6.6 Change-Id: I61b74deaf2514644a24efffd1770d75e5a4f2636 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Enable QT_NO_CONTEXTLESS_CONNECT for most of QtBaseGiuseppe D'Angelo2023-07-1112-0/+12
| | | | | | | | | It's clean now, keep it as such. Enabling it for QtCore is still OK, because it just hides a function template declared in a header. Change-Id: I8e7dfae179732ba04241a6a3258c2d722e8259df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QXmlStreamReader: Fix variable namingAxel Spoerl2023-07-111-4/+4
| | | | | | | | | | | Replace variable names referring to XML "location" with names referring to XML context. Task-number: QTBUG-92113 Task-number: QTBUG-95188 Pick-to: 6.6 6.5 Change-Id: If00e92dce237d95fa1850f0b45192995724ba99f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix transparency in 16 bit and 24 bit ico filesJohn Chadwick2023-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | As a result of the fix for QTBUG-75214, Qt inadvertently no longer reads the AND mask that specifies transparency for 16-bit and 24-bit ico files. This is because it tries to detect 32-bit icons by checking icoAttrib.depth == 32, but icoAttrib.depth is set to the depth of the QImage, not the depth of the icon, and 32-bit QImage is used for all of the non-indexed cases (16-bit, 24-bit and 32-bit.) This commit instead uses icoAttrib.nbits, which should reliably determine whether or not the icon is 32-bit. This makes the behavior consistent with other ico reading software, including Windows. Also, adds a unit test that verifies correct behavior of icon masks, checking for both QTBUG-75214 and QTBUG-113319. Amends 1d128ed1dfbcf49453ada922e54381c37264fde5. Fixes: QTBUG-113319 Change-Id: I89ac86ff16054c8925fff6afc8c530fa737f8385 Pick-to: 6.6 6.5 6.2 5.15 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Move palette helper functions to QPalettePrivateOliver Eftevaag2023-07-113-51/+76
| | | | | | | | | | | | We want to use the bitPosition function in Qt Quick, in order to be able to unset a bit in the resolve mask for a specific color group and role. This patch, solves this by adding a new qpalette_p.h header, which declares QPalettePrivate, allowing those helper functions to be accessed anywhere internally in the qt framework. Change-Id: Iecb28b48289d6bcabf0936274964a05d3c44efc0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTabBarPrivate::setupMovableTab() - fix initialization of tab positionAxel Spoerl2023-07-111-1/+1
| | | | | | | | | | The method initialized the tab position with the enum value OnlyOneTab. => Change this to the correct initial enum value Moving. Fixes: QTBUG-115147 Pick-to: 6.6 Change-Id: I4ce04f0a41dac6e93affd300eb424f4087eb7867 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refactor QStyle: const'ify some local variablesVolker Hilsheimer2023-07-112-4/+4
| | | | | | | Task-number: QTBUG-114473 Pick-to: 6.6 Change-Id: I49483dc9c000fac024c81a8210515c8dd5e35559 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QStyle: don't use the QPixmapCache when a style sheet is setVolker Hilsheimer2023-07-113-23/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a style sheet is active, then the palette in the QStyleOption might be a generated, short-lived, temporary QPalette instance. As QPalette's cacheKey is based on instance-counters of the private data structures, it will always be unique for such a QPalette, even if the brushes are the same as in a previous instance. (QPalette::cacheKey is just a 64bit integer, we cannot possibly encode the entire QPalette data in it in a collision-free way, and since a brush in the palette might contain a pixmap or a gradient we couldn't even generate an efficient string representation for it. We could at most cache and reuse QPalette instances based on the attributes in the style sheet rule and in the base palette of the widget. However, this seems fragile; it might be an opportunity for future optimization.) Some styles use the QPixmapCache, with a key that includes the palette's cache key. The key will always be unique if the palette is based on style sheet rules, and then we fill pixmap cache with pixmaps that can never be reused, making the cache both useless and wasteful. To solve this, generate an empty key if we detect that it is for a style object that is the target of a style sheet. Return an empty cache key string from QStyleHelper::uniqueName, which will make QPixmapCache return immediatey when trying to insert or find an object. This is not pretty, but it makes the change minimal and low-risk. Refactoring the respective code paths to e.g. consistently use the BEGIN_STYLE_PIXMAPCACHE helper macro requires larger changes that can only be verified visually, and so are out of scope for a bug fix. This requires changes to code that uses QStyleHelper::uniqueName, as we need to avoid that other key elements are appended to the generated (and maybe empty) key. As a side effect, this ends up with code that makes better use of QStringBuilder. Pick-to: 6.6 Fixes: QTBUG-114473 Change-Id: I011aed0885f105cbf1e8c0bc6b94c46df47761a3 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add a private API to capture a graphics frameHatem ElKharashy2023-07-119-0/+793
| | | | | | | | | | | | | This commit provides a minimal API for capturing a graphics frame, save it and replay it later for debugging. The intention here is to provide the basic need for future work to allow capturing through tooling or programmatically from code. This API is intended to be cross-platform by using Metal Capture Manager on Apple devices and RenderDoc C++ API everywhere else. Task-number: QTBUG-114067 Change-Id: If72d92bdef5e5985a0ec2e85e97fd1182da3c53c Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Correct typo in QWidget::backgroundRole()Keith Kyzivat2023-07-101-1/+1
| | | | | | | | | Correct the typo inherts to inherits in QWidget::backgroundRole() docs, as it is incorrect english. Fixes: QTBUG-115160 Change-Id: I03892753d6ec7d81c1f818fd9caa279ca11cc3ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix assert in qCleanupFuncInfo when using QDebug from a lambda with autoDavid Faure2023-07-111-5/+11
| | | | | | | | | | | | | | | | | | | | ASSERT: "size_t(i) < size_t(size())" in file qbytearray.h, line 492 due to info being emptied out completely and then the code does while ((info.at(0) == '*') info was empty because the recent fix "that wasn't the function argument list" would exit the loop with pos at end. Incidentally, this change fixes the fact that qCleanupFuncInfo was removing lambdas: main(int, char**)::<lambda()> became main(int, char**):: which was, well, shorted, but weird. Pick-to: 6.6 6.5 Change-Id: Ic7e8f21ea0df7ef96a3f25c4136a727dc0def207 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractScrollArea: Don't include size of invisible scrollbarsVolker Hilsheimer2023-07-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amend 3e59a88e8968c6cdac788926bec34c259146b6a8, which incorrectly used isHidden() to test whether the scrollbar is visible or not. QWidget::isHidden() is only true for child widgets that are explicitly hidden (or created for visible parents, which the scrollbars are not). Since the scrollbars are children of a container that is hidden and shown, isHidden always returns false. Instead, use QWidget::isVisibleTo, passing the scroll area, as that tells us if the scrollbar's visibility is relevant for the layout of the scroll area. Add a test case for QAbstractScrollArea, verifying that the scrollbar's size is correctly taken into account when calculating the size hint. This change revealed an instability in the tests introduced in the earlier commit: the layout process is asynchronous, requiring event processing to update the visibility of the scrollbars. Add a call to processEvents before storing the reference size hint. Also, explicitly set a style that doesn't use transient scrollbars as otherwise we cannot control when the scrollbars are shown. The chagne also revealed an inaccuracy in the QListView test, which only passed because the width of the vertical scrollbar was included. We cannot use font metrics results to compare expected width, as the item delegate's text rendering uses text layouts. Task-number: QTBUG-69120 Fixes: QTBUG-109326 Fixes: QTBUG-113552 Pick-to: 6.6 6.5 Change-Id: I1f06f9e88046a77722291ac17c56090f8dff7cf3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QXmlStreamReader: Raise error on unexpected tokensAxel Spoerl2023-07-102-8/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXmlStreamReader accepted multiple DOCTYPE elements, containing DTD fragments in the XML prolog, and in the XML body. Well-formed but invalid XML files - with multiple DTD fragments in prolog and body, combined with recursive entity expansions - have caused infinite loops in QXmlStreamReader. This patch implements a token check in QXmlStreamReader. A stream is allowed to start with an XML prolog. StartDocument and DOCTYPE elements are only allowed in this prolog, which may also contain ProcessingInstruction and Comment elements. As soon as anything else is seen, the prolog ends. After that, the prolog-specific elements are treated as unexpected. Furthermore, the prolog can contain at most one DOCTYPE element. Update the documentation to reflect the new behavior. Add an autotest that checks the new error cases are correctly detected, and no error is raised for legitimate input. The original OSS-Fuzz files (see bug reports) are not included in this patch for file size reasons. They have been tested manually. Each of them has more than one DOCTYPE element, causing infinite loops in recursive entity expansions. The newly implemented functionality detects those invalid DTD fragments. By raising an error, it aborts stream reading before an infinite loop occurs. Thanks to OSS-Fuzz for finding this. Fixes: QTBUG-92113 Fixes: QTBUG-95188 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I0a082b9188b2eee50b396c4d5b1c9e1fd237bbdd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce macro.qtpolicydeprecatedbehavior for Qt CMake PolicyAmir Masoud Abdol2023-07-102-4/+2
| | | | | | | | | Added a template that we can use instead of rewriting the message for every policy. Pick-to: 6.6 Change-Id: I13cc182244d5f092e3d5677664bc149c6b126da5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QLibrary: make isLoaded() report whether this object has load()edThiago Macieira2023-07-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2a92199b57b195176d2a0d68d140d72c1cbfb71 "QLibrary::setFileNameAndVersion: reset the tag after findOrCreate". This restores the behavior of resolve() and compatibility with Qt 4 and 5, which is documented to imply a call to load(). Do note that if you call load() or resolve() and don't call unload(), the library you've loaded can never be unloaded now. So don't leak! [ChangeLog][Important Behavior Changes] QLibrary::isLoaded() now reports whether this instance of QLibrary has succeeded in loading the library, via direct or indirect call to load(). Previously, it used to reported whether the actual library was loaded by any QLibrary instance. The change to QLibrary::resolve() itself is effectively a no-op in this patch, because isLoaded() would have returned false, but it ensures that the implementation does what it says it will do. Fixes: QTBUG-114977 Pick-to: 6.6 Change-Id: I907aa7aea8ef48469498fffd176d7a76ae73e04a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QDebug: rewrite timeUnit() into putTimeUnit()Marc Mutz2023-07-102-8/+14
| | | | | | | | | | | | This avoids us committing to the QByteArray return value, which is overkill for short strings. Instead, pull the streaming of the unit behind the ABI boundary, so we're free to change the implementation to either stream directly or use SSO'ed std::string. Pick-to: 6.6 Change-Id: I10927acb9d64077d9018b667958ca16be218012a Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make sure that exception flags are not overridden in syncqt toolAlexey Edelev2023-07-101-0/+1
| | | | | | | | | | | | | qt_internal_add_tool has the implicit logic that disregards the previously installed flags and adds new flags that overrides the exceptions behavior. Add the tool-specific option to make sure that this won't happen. Ammends 0f5fbe369b84c422003e24322abc90a1b09520d2 Pick-to: 6.6 6.5 Change-Id: Id149d8d8002390581813475124ba37dd39d56b9b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QDBusConnectionPrivate: Use enum for mode argument of sendWithReplyIevgenii Meshcheriakov2023-07-102-4/+3
| | | | | | | | | | | Change type of mode argument to QDBus::CallMode instead of int. Also change the argument name in the implementation to much the declaration. Change-Id: Ice19bfff72f3bf1f4a5748f2caa16999e87a131f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* http2: inline a couple static variablesMårten Nordheim2023-07-102-5/+2
| | | | | | | It looks cleaner when it's declared where it's defined. Change-Id: I5006fc086c73e6d4891bc64ff3a8c6b4b17623fe Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* http2: Use QByteArrayView in lambda where we only parseMårten Nordheim2023-07-101-2/+2
| | | | | | | | | | | Thinking back I'm 99% certain I deliberately used QBA because I was going to cherry-pick it back and didn't feel like dealing with failing builds. Coming up we will have a lot of other changes here so let's change this as well. Change-Id: Ifc60ad8ee2a1e5b75ac766b4a8b7e1559f80e942 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* http2: use qAddOverflow instead of local functionMårten Nordheim2023-07-101-13/+9
| | | | | | Change-Id: Ice7f0f026353f5668a437cc35d9b21cde0a69182 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* http2: perform clang-tidy suggestion to use emplace_backMårten Nordheim2023-07-101-5/+5
| | | | | | | Change-Id: I4148f94a7d9944eddccaba6dbc956abcd2ad9937 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* http2: use find() instead of multiple lookupsMårten Nordheim2023-07-101-19/+24
| | | | | | Change-Id: Ibef8da7349d143433522bbb0fd2ee228f0d58135 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* iOS: Add version check when setting accent colorDoris Verria2023-07-101-1/+2
| | | | | | | | | UIColor.tintColor is only available on iOS 15.0 or newer. Ammends commit 69cc7f946a66527c3f2b7a28510dcb37459dc33a Pick-to: 6.6 Change-Id: Id82006629ee3c3d2548ea39afde265cdccf2cdab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QPixmapCache: assert that the key is invalid if we failed to insertVolker Hilsheimer2023-07-101-0/+1
| | | | | | | | | | | QCache::insert on failure destroys the QPixmapCacheEntry, which calls releaseKey(), which invalidates the key. That's hard to follow, so add an assert to make it more explicit and prevent future errors. Pick-to: 6.6 Change-Id: I9c062ef5a6e34c783c064330c914ce4f9a3f9984 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Properly respect user setting of AUTOGEN_TARGETS_FOLDERJoerg Bornemann2023-07-101-1/+1
| | | | | | | | There was a typo in the code that reads the property. Pick-to: 6.5 6.6 Change-Id: I6a26899ecc6de800fcfaff6da659a611939753ff Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* a11y: Report app as parent for top-level item viewsMichael Weghorn2023-07-101-1/+1
| | | | | | | | | | | | | | | | | | | As happens for other widgets (s. QAccessibleWidget::parentObject), report the app as accessible parent for item views that don't have another parent set. Otherwise, the accessible tree is broken when there's a top-level item view: The application has the item view as a child, but the child does not have any parent set. Extend a QListView autotest accordingly. Fixes: QTBUG-115135 Pick-to: 6.6 6.5 Change-Id: Ie06874681180a30fc6248dc98f80c4158d837278 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: state blacklist condition requirement explicitlyMitch Curtis2023-07-101-1/+2
| | | | | | | | | | | | Each line with a test function must be followed by a line describing the conditions for ignoring that test function. From what I can see, this wasn't explicitly stated anywhere. Fixes: QTBUG-114825 Pick-to: 6.2 6.5 6.6 Change-Id: I1941d6c9a6d56a8374a0c5a99c538cf1eaebd544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: clarify qtloader onExit behaviorMorten Sørvig2023-07-102-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | onExit is called whenever the application exits, i.e. when the app canvas should no longer be displayed and the loader/embedder code should take some action. Emscripten provides two callbacks which can be used here: - onExit, called when the app exits (but see EXIT_RUNTIME) - onAbort, called on abort errors. These map to the two cases Qt's onExit supports. onExit is not called when EXIT_RUNTIME is disabled, which means we don't need the special case for exit code 0. In addition call onExit on any exception. The second call to showUi() in html_shell.html is then not needed any more and we avoid duplicating the UI state handling in user code. Update the qtloader_integration test to handle changes in behavior (we no longer set the error text on exit). Use emscripten_force_exit() to simulate application exit - using this function makes Emscripten call onExit even when EXIT_RUNTIME is disabled. Pick-to: 6.6 Change-Id: I72b5463c1836e8d5054e594abbd304fbc67032b7 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* wasm: Add qtloader compatibility APIMorten Sørvig2023-07-101-0/+54
| | | | | | | | | | | Implement the main features of the pre Qt 6.6 loader as adaption layer on top of the new loader. Pick-to: 6.6 Task-id: QTBUG-115049 Change-Id: Iabe860d3fb0488fd003876508787da3688e0c87b Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QEventLoopLocker: rewrite to hold public classesMarc Mutz2023-07-094-21/+17
| | | | | | | | | | | | | | | | | | ... instead of Private ones, at the cost of having to befriend of all the lockable classes, because we need access to their d_func()'s. This simplifies the code, because we don't need the manual QClass to QClassPrivate mapping (o2p) anymore, we can just use d_func(). This also paves the way to make QEventLoopLocker almost completely inline and use a 3-pointer form of QBiPointer, once available, to hide the bit fiddling. We couldn't make such a change if the class continued to hold pointers to QClassPrivate's. Pick-to: 6.6 Task-number: QTBUG-114793 Change-Id: Id300e4d45d6cacabe090a46cd6433c5ead3c8b0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QStorageInfo: split Linux specific code to a separate source fileAhmad Samir2023-07-096-137/+193
| | | | | | | | | | Much less crowded. Inline QStorageInfoPrivate::root() to ease the split; the Windows specific code is one extra line. Change-Id: Icec6822cf436e2b4aa1b3a04184fbfa40e508078 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* ipc.qdoc: fix typo in API docsAhmad Samir2023-07-091-1/+1
| | | | | | | Change-Id: Ifb999b7b96583c7ffa42b91078535b4bfa91616f Pick-to: 6.6 Task-number: QTBUG-2443 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QBasicAtomicXXX: remove the comment about them being "New atomics"Thiago Macieira2023-07-081-2/+0
| | | | | | | | | | | | | They were new... in commit 1f843ca39ee59c5304009faf308ddce791614a02 ("Add the new QBasicAtomicXXX implementation - no backends yet") for Qt 5.0, which is what allowed us to use the C++11 atomics. That replaced the even older implementation from Qt 4.4 where QBasicAtomicInt was a full class and we didn't support any other integer types. That of course replaced the even older QBasicAtomic from 4.0, first introduced in 2004 (7 years before C++11). Change-Id: I53335f845a1345299031fffd176fa251b31bfeea Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QProcess/Unix: add a simple way to reset the UID and GID for the childThiago Macieira2023-07-084-1/+20
| | | | | | | | | | | | | | | This is done as one of the last steps inside QProcess itself, so the child modifier and all other tasks still run with the parent process' permissions. On Linux, setting the UID to non-zero will also automatically clear the effective capabilities(7) set. This feature is only useful for setuid or setgid applications, so this commit updates the QCoreApplication::setSetuidAllowed() documentation to mention the QProcess flag. Change-Id: I3e3bfef633af4130a03afffd175e940c0668d244 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QProcess/Unix: add a few, basic session & terminal management flagsThiago Macieira2023-07-083-2/+53
| | | | | | | | | | | | Doing setsid() and disconnecting from the controlling terminal are, in addition to resetting the standard file descriptors to /dev/null, a common task that daemons do. These options allow a QProcess to force a child to be a daemon. QProcess ensures that the operations are done in the correct order. Change-Id: I3e3bfef633af4130a03afffd175e9451d2716d7a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtSql: Stylistic fixes based on the Qt 6.6 api reviewChristian Ehrlicher2023-07-082-2/+2
| | | | | | | | Amends 12909d7c3df74b88382b727cfd3e215914f291ba and 0efd8854c4b32ec0b011efbf6b3a1990fe684e32. Pick-to: 6.6 Change-Id: Id7cb7377bcd1f32092330d2fc5b2fa5b83ce941f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QGenericAtomicOpsThiago Macieira2023-07-071-330/+0
| | | | | | | | | Commit c5b816393d1ea88f047ae05568786d54b5bd5f56 ("Get rid of bootstrapped atomics", 6.5) removed the last use of them. Pick-to: 6.6 Change-Id: I53335f845a1345299031fffd176f52293e4b9752 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QStorageInfo: Correctly decode backslash in file system labelsAndrius Štikonas2023-07-071-3/+1
| | | | | | | | | | | | | | | At the moment labels such as "one\two" are incorrectly decoded as "one\x5ctwo". Backslashes were originally excluded after Thiago Maciera's review, see commit 8f1277da8c137270ff857128d8fea1423d8a7700. Now Thiago agrees that original reasoning for excluding backslash was incorrect and we do want to decode them. Pick-to: 6.5 6.6 Change-Id: I8f13fc678b40a7a9474a0171c50e3e221dfe85c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SQL/SQLite: add case folding for non-ascii charactersChristian Ehrlicher2023-07-082-0/+37
| | | | | | | | | | | | | SQLite does not provide a proper case folding for non-ascii characters due to a lack of a proper ICU library. Therefore add an option so Qt can do it for SQLite. [ChangeLog][SQL][SQLite] Add new option QSQLITE_ENABLE_NON_ASCII_CASE_FOLDING for correct case folding of non-ascii characters. Fixes: QTBUG-18871 Change-Id: Ib62fedf750f05e50a581604253cf30d81e367b42 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* a11y macOS: Report selection/Bridge QAccessibleSelectionInterfaceMichael Weghorn2023-07-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, support NSAccessibilityProtocol's accessibilitySelectedChildren method [1] by retrieving the selected children via the QAccessibleSelectionInterface introduced in commit 9d16d5e2245c26e5746fd7609300b84a2a983457. This e.g. makes a "selected children" attribute show up in "UI Browser" [2] for the item views in the "interview" example (examples/widgets/itemviews/interview/interview.app/Contents/MacOS/interview) and that one has an array containing the selected items as value. Sample scenario: 1) run the interview example (examples/widgets/itemviews/interview/interview.app) 2) select "Item 1:0", "Item 2:0" and "Item 3:0" by left-clicking on "Item 1:0" in the left view, then shift+clicking on "Item 3:0". 3) start UI Browser and navigate to the "group (group 1)" element and check that the value of its "selected children" attribute is an array containing the three selected items [1] https://developer.apple.com/documentation/appkit/nsaccessibilityprotocol/1524672-accessibilityselectedchildren [2] https://latenightsw.com/freeware/ui-browser/ Change-Id: Ic62f7fa82f2d01341a1dbc5ade2bd02c3ff99d9f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* a11y atspi: Implement TableCell methods Get{Column,Row}HeaderCellsMichael Weghorn2023-07-071-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | The AT-SPI TableCell interface's GetColumnHeaderCells and GetRowHeaderCells methods were not documented in the XML specification until recently, but are actively used, e.g. also by the Orca screen reader since commit https://gitlab.gnome.org/GNOME/orca/-/commit/ac2c4470ff4401b53b6de48e12ea5a0a6347897c ("Prefer table cell interface for getting row and column headers"). 5145d3899d338fbb82a2d314c58eb60a4a5205f8 only implemented the TableCell methods that were contained in the XML spec by then. Handle these two methods as well, and add an explicit warning for the case an unknown method is called. Related at-spi2-core commit adding the two missing methods to the AT-SPI TableCell XML spec: https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/963e99197376368e613be865e470b3af5a7a28a6 ("TableCell.xml: Add Get{Column,Row}HeaderCells methods") Fixes: QTBUG-113110 Change-Id: Ic218cdd021bbc347907762035730e6ae7d387300 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qcompilerdetection.h: check __cplusplus is defined before using itAhmad Samir2023-07-081-1/+1
| | | | | | Change-Id: I6f6daabcaf393ffa855461b4cd93863723751343 Pick-to: 6.6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: make UnixProcessFlag an enum classAhmad Samir2023-07-082-3/+4
| | | | | | | | | | | See: https://lists.qt-project.org/pipermail/development/2023-May/043804.html Not being an enum class looks more of an oversight, in most places usage of the enumerators was already prefixed with QProcess::UnixProcessFlag. Change-Id: Ie37d74e0039d3f65f90af560cb85bb11b77ae20c Pick-to: 6.6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>