summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: Update details about QSystemTrayIconShawn Rutledge2022-01-041-5/+5
| | | | | | | | | | | | - StatusNotifierItem is now more widely implemented (but I'm sure the list could be even longer); but Unity is obsolete - XEmbed is nearly obsolete, so list it after StatusNotifierItem - fix the links: it was meant to have friendly anchor text rather than showing the whole URL inline Pick-to: 6.2 6.3 Change-Id: Id81059f9484a8144b6402e74a500edf81d845b65 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Update external links to Qt Creator ManualLeena Miettinen2022-01-041-205/+51
| | | | | | | | | | | | | | Sync with Qt Creator Manual 6.0.0. Remove topics related to using Qt Quick Designer plugin because they are now in the Qt Design Studio Manual, only. Add new topics and fix some topic titles. Some topics also exist in Qt Design Studio Manual and can be accessed with the "Qt Design Studio:" prefix. Pick-to: 5.15 6.2 Change-Id: Ie4f07b0a1602f3318ca5335ee72130ddce12801e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* rhi: Drop the profiler for nowLaszlo Agocs2022-01-0425-1941/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | The system we inherited from the original Qt 5.14 introduction of QRhi is a text stream based solution where resource creation and frame timings are sent in a comma-separated format to a QIODevice. This, while useful to get insights about the number of resources at a given time, is not actively helpful. The frameworks built on top (Qt Quick, Qt Quick 3D) are expected to provide solutions for logging timings in a different way (e.g. via the QML Profiler). Similarly, tracking active resources and generating statistics from that is better handled on a higher level. The unique bits, such as the Vulkan memory allocator statistics and the GPU frame timestamps, are converted into APIs in QRhi. This way a user of QRhi can query it at any time and do whatever it sees fit with the data. When it comes to the GPU timestamps, that has a somewhat limited value due to the heavy asynchronousness, hence the callback based API. Nonetheless, this is still useful since it is the only means of reporting some frame timing data (an approx. elapsed milliseconds for a frame) from the GPU side. Change-Id: I67cd58b81aaa7e343c11731f9aa5b4804c2a1823 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use IS_SYMLINK condition instead of REALPATH when checking BINARY_DIRAlexey Edelev2022-01-041-12/+16
| | | | | | | | | | | | | | For case-insensitive file systems, the REALPATH file component may return file paths in a different case than ABSOULEPATH. We use REALPATH to detect symlinks. In case-sensitive file systems there still might be the situation when /path/to/Build is a symlink to the /path/to/build, so we cannot make the comparison case-insensitive. Use the IS_SYMLINK check instead. Pick-to: 6.2 6.3 Fixes: QTBUG-99416 Change-Id: Idf998b9e09837a834139553fb822e05b2a0a1949 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Pass QT_BUILD_STANDALONE_TESTS to Android external project if definedAlexey Edelev2022-01-041-0/+8
| | | | | | | | | | | | | | If we configure qtbase standalone tests for multiple Android ABIs, external project also needs the QT_BUILD_STANDALONE_TESTS flag enabled to avoid configuring the whole qtbase but not only tests. TODO: Need to forward all cache variables that are defined by user to the external project since otherwise the configuration of the external project will differ. Created QTBUG-99537 to track this. Pick-to: 6.3 Change-Id: I3aec1391c850fb37696dc50416e0ff2a2646e759 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build of multiple apks in a single project treeAlexey Edelev2022-01-041-1/+1
| | | | | | | | | | | | | | | | | | ExternalProject_Add_Step adds the step timestamp file as the dependency to a '-complete' file generated by add_custom_command that is run inside the ExternalProject_Add function. Since the '-complete' file path is computed using CMAKE_CURRENT_BINARY_DIR we run into the issue if ExternalProject_Add and ExternalProject_Add_Step are run from the different source directories and have the different default binary directories as well. This change suppresses the behavior by adding the 'EXCLUDE_FROM_MAIN TRUE' flag. We may do this since the target related to the step is added to the dependency chain of executable target and the chain of external project is not used for now. Pick-to: 6.3 Change-Id: I7203261b61cfa56bcd9e49ac3e8d7ecb217a5a6c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update internal function signaturesAlexey Edelev2022-01-041-20/+20
| | | | | | | | | | | Update _qt_internal_add_android_deployment_multi_value_property and _qt_internal_add_android_deployment_property signatures to match the _qt_internal_add_android_deployment_list_property signature. Pick-to: 6.3 Change-Id: Ie4fb2ebe96c783222fc4b56c3186e22b96cbbb95 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Collect the apk dependencies regardless of targetAlexey Edelev2022-01-042-32/+71
| | | | | | | | | | | | | | | | | | | | _qt_internal_collect_target_apk_dependencies function is common for all targets, but its signature was telling that it's target-specific. This also causes an issue when we had more than one target in tree that produce apk, since only first target got the property after respective finalizer was executed. This change generalize the function and uses _qt_internal_apk_dependencies target to store the extra library directories from the build tree. _qt_internal_add_android_deployment_list_property signature is also changed to support reading values from multiple lists of multiple targets. Amends d20f4ae706559fb7de8db9dd4845f7ce3936061a Pick-to: 6.3 Change-Id: I5b40fa96a0eb73348c0029e2b13c63a9465cb520 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update copyright year to 2022Kai Köhne2022-01-049-9/+9
| | | | | | | Pick-to: 5.15 6.2 6.3 Change-Id: If6f1d6f9f82a601f8e2b6d36650d6e737518aa60 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove faulty #include from widgets baseline testEirik Aavitsland2022-01-041-2/+0
| | | | | | | | | | Since there is an actual qwidgetbaselinetest.h header file, one should not include a .moc file. The build system will take care of it, and currently warns about this #include. Pick-to: 6.3 Change-Id: I4fbff9ef75c901fe3db4df54d6f3ff0d9307edce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add baseline test for text renderingVolker Hilsheimer2022-01-045-0/+147
| | | | | | | | | | Data-driven test case that renders the HTML files into an 800x600 image for baseline comparison. Task-number: QTBUG-99148 Pick-to: 6.3 Change-Id: I9ccc0cd21a1e94ff68d23bb82b84e1da46d6335a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Enable verbose logging in the last re-run of a failing testDimitrios Apostolou2022-01-033-8/+29
| | | | | | Fixes: COIN-728 Change-Id: I08802e377e26e5dd7f7d1c44b5efe4280b09f957 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Include Qt6WasmMacros in WASM buildDavid Skoland2022-01-031-0/+1
| | | | | | | | | This fixes the issue where WASM could not even be configured with autotests enabled. Change-Id: I0890d52754de92fa84be170906fcb0478e90304e Pick-to: 6.3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Introduce qt-testrunner.pyDimitrios Apostolou2022-01-038-43/+887
| | | | | | | | Script that wraps Qt test execution in order to iron-out flakiness. Task-number: QTBUG-96353 Change-Id: Ie8ee780e3f4f8d086c080a7784f9f68fd1867be2 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Doc: Add link targets for Qt Design Studio Manual topicsLeena Miettinen2022-01-031-0/+709
| | | | | | | | | | You can use these link targets in Qt docs to refer to QDS topics. Pick-to: 6.2 Change-Id: I4d4e288e1456ef92c5e8d9949390a431220eab75 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* rhi: Enable exposing separate image and sampler objects from the shaderLaszlo Agocs2022-01-039-13/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the following in a QShader/QShaderDescription: - a list of separate images - a list of separate samplers - a list of "combined_sampler_uniform_name" -> [ separate_texture_binding, separate_sampler_binding ] mappings (relevant for GLSL only) On the QShader (and qsb/QShaderBaker) level not having separate image (texture) and sampler objects exposed in the reflection info is not entirely future proof. Right now we benefit strongly from the fact that Vulkan/SPIR-V supports both combined and separate images/samplers, while for HLSL and MSL SPIRV-Cross translates combined image samplers to separate texture and sampler objects, but it is not given that relying on combined image samplers will always be possible in the long run; it is mostly a legacy OpenGL thing that just happens to be supported in Vulkan/SPIR-V due to some benefits with certain implementations/hw, but is not something present in any newer APIs. In addition, before this patch, attempting to run a shader with separate textures and samplers through qsb will just fail for GLSL, even though SPIRV-Cross does have the ability to generate a "fake" combined sampler for each separate texture+sampler combination. Take this into use. This also involves generating and exposing a combined_name->[separate_texture_binding,separate_sampler_binding] mapping table for GLSL, not unlike we have the native binding map for HLSL and MSL. A user (such as, the GL backend of QRhi) would then use this table to recognize what user-provided texture+sampler binding point numbers correspond to which auto-generated sampler2Ds in the GL program. Take the following example: layout(binding = 1) uniform texture2D sepTex; layout(binding = 2) uniform sampler sepSampler; layout(binding = 3) uniform sampler sepSampler2; Inn the reflection info (QShaderDescription) this (assuming a corresponding qtshadertools patch in place) now gives one entry in separateImages() and two in separateSamplers(). Assuming sepTex is used both with sepSampler and sepSampler2, the GLSL output and mapping table from QShaderBaker will have two auto-generated sampler2Ds (and no 'texture2D' or 'sampler'). One immediate benefit is that it is now possible to create a shader that relies only on separate images and samplers, feed it into qsb, generate all the possible targets, and then also feed the SPIR-V binary into a tool or library such as Tint (e.g. to generate WGSL) that canot deal with combined image samplers. Change-Id: I9b19847ea5854837b45d3a23edc788c48502aa15 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* [doc] QCoreApplication::installTranslator() doesn't take ownershipMarc Mutz2022-01-031-0/+2
| | | | | | | | Document it. Pick-to: 6.3 6.2 5.15 Change-Id: I25d305945bf29348d6ea5756fbf80c418f812d0f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* rhi: Add the basics for HDR swapchainsLaszlo Agocs2022-01-0313-47/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...backed by support in the backends for D3D11 and Vulkan. Expose only what works in practice: scRGB with RGBA16F and HDR10 with RGB10A2 (or A2BGRA10 etc.). For general use, e.g. to render 2D/3D content, scRGB (i.e. extended sRGB linear) should be chosen because that is a linear space. On Windows with a HDR10 display (and an NVIDIA card) both of these are known to work, as long as Use HDR is enabled in the Settings for the display on which the window is created. When requesting a HDR format and it is not supported, we will fall back to the default SDR RGBA8/BGRA8 format. However, the behavior seems to be a bit weird with Vulkan and NVIDIA at least when there is a HDR display but Use HDR is set to Off: this seems to enable HDR mode for the lifetime of the window (with the usual set of black screens while switching over the entire display). Not sure why the driver does this. With D3D/DXGI, with fewer abstractions in the way, we can check upfront properly, so that will nicely fall back to the defaults regardless of why HDR is not available. Support can also be checked in advance via QRhiSwapChain::isFormatSupported() as long as the QWindow is available. (though with Vulkan, as said above, this also seems to ignore the Use HDR setting of Windows) Complications, such as moving a window from one screen to another, are currently not known how they behave. To be seen how this is handled by the Windows compositor. (from 1903 and up it is said to be able to automatically downconvert scRGB to SDR so perhaps moving from a HDR to a non-HDR screen would work - remains to be seen if this needs something more involved) When it comes to other platforms and potential future support: - based on its docs Android 8+ may support scRGB with Vulkan as-is on a suitable device/display, as long as the application declares android:colorMode="wideColorGamut" in the manifest. - for Metal the layer can be made EDR enabled and then e.g. MTLPixelFormatRGBA16Float/kCGColorSpaceExtendedLinearSRGB should work. However, this won't be added unless we can test it. - Linux is unknown. If one needs access to display specific values such as the min/max luminance when implementing tonemapping or a transfer function, that needs platform/API specific approaches, and sadly the kind of data exposed seems to vary, potentially making it difficult to maintain a single cross-platform logic. With D3D one can get the DXGI_OUTPUT_DESC1 from the IDXGIOutput6. This has the min/max luminances in nits and a bunch of other things. For convenience the output object is now exposed from the swapchain's nativeHandles() whenever the D3D backend is used at run time. For Metal one would presumably access maximumExtendedDynamicRangeColorComponentValue and co. in the NSScreen. Elsewhere one needs to rely on platform/winsys specific approaches, if there are any. Remains to be seen longer term if/how this needs/can be better supported. Change-Id: I2e61a0e062282d4bfdfba39655941c0f9a795112 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Exclude sources from HEADER_MODULE if cmake version is less than 3.19Alexey Edelev2022-01-031-3/+12
| | | | | | | | | | | | | CMake versions less than 3.19 don't support adding the source files to the PRIVATE scope of the INTERFACE libraries. It looks like these PRIVATE sources are only used by IDEs to display them in a project tree. Skip them to avoid configuring issues. Fixes: QTBUG-99316 Pick-to: 6.3 Change-Id: Id03f540ac9c94e920adfae5de4f364bd7aba4613 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace ANDROID_ABI argument with the QT_ANDROID_ABI target propertyAlexey Edelev2022-01-034-104/+122
| | | | | | | | | | | | | | | | | | | | | | This change tries to make the API more user friendly and prevent wrong use of multi-abi API. ANDROID_ABI argument of qt6_add_executable was position-depend and needed to be placed after the executable 'sources'. Using the target property we solve this problem and provide more consistent and common way to enable multi-abi build for the single target. This meanwhile also requires to execute multi-abi build configuration in the finalizer, since the property might be set at any point. Also the priority of the QT_ANDROID_ABI target property now is higher than the priority of the QT_ANDROID_BUILD_ALL_ABIS variable. So target will only build packages with the ABIs specified in QT_ANDROID_ABI property if both are set. Pick-to: 6.3 Task-number: QTBUG-88841 Change-Id: I3515297ed267974498913c59619433dc234ec217 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QRingBuffer: optimize and simplify QRingChunk::toByteArray() futherMarc Mutz2022-01-031-8/+3
| | | | | | | | | | | | | | | | | | | | | | - use sliced() instead of mid(), since we know we call sliced() in-contract - replace the manual memmove() with calls to QBA::remove(), but first resize() to tailOffset, and only then remove(0, headOffset), so we only move Chunk::size() bytes, as the old code did - don't bother updating the offset members, as we're restricted to rvalues now, and we only need to leave behind a partially-formed object This code shows that we desperately need QBA::slice() and/or an rvalue overload of QBA::sliced(), cf. QTBUG-99218. Add a comment to use these functions when they become available. Change-Id: I5d8c7363d443dff69338f6f6a7b4bff9957917ec Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* tst_qtranslator: fix memleakMarc Mutz2022-01-031-3/+3
| | | | | | | | | | QCoreApplication::installTranslator() does not take ownership of the QTranslator. The QTranslator dtor removes itself from QCoreApplication again. Pick-to: 6.3 6.2 5.15 Change-Id: I17eb7ab350631eb32fe76af29d9a576a0efa05d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTestData: fix streaming of u8 string literals in C++20 modeMarc Mutz2022-01-031-0/+8
| | | | | | | | | | | | | | | | | | | ...fixing tst_QLocale: QDEBUG : tst_QLocale::formatDate() expected data of type 'QString', got 'char8_t [64]' for element 1 of data with tag 'unicode in format string' QFATAL : tst_QLocale::formatDate() ASSERT: false in file /home/marc/Qt/qtbase/src/testlib/qtestdata.cpp, line 105 In C++20, the type of u8 string literals changed from const char[] to const char8_t[]. [ChangeLog][QtTest][QTestData] Fixed streaming of u8 string literals in C++20 mode. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-99480 Task-number: QTBUG-99481 Change-Id: I53bd73522a4ebce307f360e225f25590f981d44a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QThread: fix UB (invalid enum value) on Private::PriorityMarc Mutz2022-01-033-6/+6
| | | | | | | | | | | | | | | | | | | | | The Unix code stores an additional flag, ThreadPriorityResetFlag, in the Policy enum, but ubsan does not approve: qthread_unix.cpp:303:30: runtime error: load of value 2147483648, which is not a valid value for type 'Priority' qthread_unix.cpp:304:75: runtime error: load of value 2147483648, which is not a valid value for type 'Priority' Fix by making the variable of std::underlying_type_t<Priority>. The masking and unmasking code can now be simplified, too. In the Windows version, replace some switch targets with equivalent ones to keep -Wswitch-like warnings, though I hasten to note that both switches use a default case, so have anyway implicitly disabled said warning. Pick-to: 6.3 6.2 5.15 Change-Id: Ie4ea7d05e2928d2755ad12d36535197f85493191 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QByteArray: avoid detach() in a no-op replace()Marc Mutz2022-01-031-2/+3
| | | | | | | | | | | | | When the the replacement has the same size as the replacee, but that size is zero, the whole operation is a no-op, and there's no need to detach(). [ChangeLog][QtCore][QByteArray] A replace(pos, n, after) call no longer detach()es when n == after.size() == 0. Pick-to: 6.3 6.2 Change-Id: I1e8d7c7fb6383f8bfea3212e49fca8a128535564 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid crash on app startup if the default font family is emptyLars Knoll2022-01-031-3/+6
| | | | | | | | Don't call first() on a potentially empty list of families. Fixes a crash on startup on QNX for me. Change-Id: I551d21dac8cfd104b774d6442bdbe1db35f8b75c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add PublicShare and Templates QStandardPathsBjörn Feber2022-01-017-2/+63
| | | | | | | | | | | | | | | | | These directories are common on desktop operating systems. "Public" is used for sharing files with other users and "Templates" lets you add new files to the file creation desktop menu (for example in a file manager). An example use in a Qt application would be KDE's KIO having default icons for both directories. This is where they point to: Windows: C:/Users/Public, C:/Users/<USER>/AppData/Roaming/Microsoft/Windows/Templates macOS: ~/Public, ~/Templates Unix: ~/Public, ~/Templates Task-number: QTBUG-86106 Task-number: QTBUG-78092 Change-Id: Ifca60c7d2a6dc2109ec290e8fb109ee2d5ca4d38 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract Header qforeach.h from qglobal.hMarc Mutz2021-12-303-84/+140
| | | | | | Task-number: QTBUG-99313 Change-Id: Ie89314ca7022e88c1fea957880c5aa4a41640744 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread/Unix: extract duplicate codeMarc Mutz2021-12-301-36/+27
| | | | | | | | | | | | | | Extract function terminate_on_exception() that de-duplicates the #ifdef'ery around the try/catch and the handling of the pthread cancellation pseudo-exception. Apart from de-duplicating complex code, it will also help suppressing a ubsan false positive, which is why we're picking it all the way to 5.15. Pick-to: 6.3 6.2 5.15 Change-Id: I99ad2c0618b8dc30801931df09400c6611d9f9e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindow: use std::exchange when ... exchanging valuesMarc Mutz2021-12-301-3/+1
| | | | | | | | | Replaces a three-liner with a more elegant, idiomatic one-liner. Pick-to: 6.3 Change-Id: I57fbe5d808dffa44f6fceffb97c47f0c84ccd3df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWindowPrivate: fix inconsistent inline on some methodsMarc Mutz2021-12-301-2/+2
| | | | | | | | | | | Two functions' implementations were marked as inline, when their definitons weren't. This is non-sensical, bordering on dangerous, so remove the inline keyword. Pick-to: 6.3 6.2 5.15 Change-Id: Iece21f9552aede273fa1f5a7aef0c94307fa5142 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Exclude filesystem autotests for INTEGRITYTatiana Borisova2021-12-301-0/+4
| | | | | | | | | - There is no mounted partition, where we can create/delete files at runtime. Tests should be excluded for now. Pick-to: 6.2 6.3 Change-Id: I1c4db13d35da7d570c4bf787299d829e08951195 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Docs: Add other Unix paths to the Linux table in QStandardPathsNicholas Bennett2021-12-301-1/+1
| | | | | | | | | | | | Added Unix to the title of the enum QStandardPaths::StandardLocation docs Linux paths table as this also aplies to Unix based OS's such as QNX. Fixes: QTBUG-63695 Pick-to: 6.2 6.3 Change-Id: I37b1bb6167984ccf7877baf2e6e764337121a947 Reviewed-by: Tommi Mänttäri <tommi.manttari@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QStringList: check that join(u'\0') embeds NULsMarc Mutz2021-12-281-0/+5
| | | | | | | | | | | ... as opposed to QByteArray::toHex('\0'), which doesn't. Picking to all LTSs because it's in a test. Pick-to: 6.3 6.2 5.15 Change-Id: I392d5714c4865e530a246ed30a13cdac26b98e0b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Eradicate Q_FOREVER from header filesMarc Mutz2021-12-282-6/+6
| | | | | | | | | The qgenericatomic.h occurrences are getting in the way of splitting up qglobal.h, so inline the define. Task-number: QTBUG-99313 Change-Id: I0d6e3553c5ed4ac9e426bef2fe07d2672d73c671 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: replace use of append(QString(n, c)) with resize(size() + n, c)Marc Mutz2021-12-281-1/+1
| | | | | | | Avoids a temporary QString creation. Change-Id: Ibc87a3f1bf2979780e4a2cce7e1757f97c39a9be Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: replace a few getData() with viewData()Marc Mutz2021-12-281-5/+5
| | | | | | | | | | Both multi-arg as well as QStringBuilder support QStringView these days, so there's no need for a temporary QString, even one fromRawData(), with all its extra codegen, when QStringView can do the job just fine. Change-Id: Ie9031aef85c5f0b535e94d9e414b7bd71ad909f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Exclude tst_qxmlstream test for INTEGRITYTatiana Borisova2021-12-281-1/+1
| | | | | | | | | | - There is no possibility to unpack *.zip archive anywhere on test device or save any file. Currently we don't have mounted file system. Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: I8c8d272a92b4475a7548bd10d32fc4203672926b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix pattern type matchingJarek Kobus2021-12-281-4/+4
| | | | | | | | | Amends 3c747aafa44ac2d0b314a002d2672227bf6513e5 Pick-to: 6.3 6.2 5.15 Change-Id: I2753b627c269cbb50009ef5e9c2ffa274e0ccf5c Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Alex Richardson <arichardson.kde@gmail.com>
* Remove unused internal flag from raster painting engineEirik Aavitsland2021-12-282-27/+0
| | | | | | | | | Just a leftover from code that has been replaced long ago. Task-number: QTBUG-95237 Pick-to: 6.3 6.2 5.15 Change-Id: I8b1b0f319683ecfb2c93cc51a047616fe29770f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix tst_qtextstream / tst_json run time failures on INTEGRITY deviceTatiana Borisova2021-12-283-2/+24
| | | | | | | | | - add test resources to binaries Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: Ibeed93af43b4f951ca55f044fbfab00d4ab30468 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix handling of childGroups() when fallbacks are disabledJeremie Graulle2021-12-272-4/+20
| | | | | | | | | | When fallbacks are disabled for QSettings then it should not be falling back to any child groups or keys that might exist in a fallback set of settings. Fixes: QTBUG-85295 Change-Id: I563999293a103702035c8d3b027b59b94ca43c0e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: hardcode idealThreadCount for some browsersLorn Potter2021-12-241-1/+5
| | | | | | | | | Browsers like Safari do not support the hardwareConcurrency property. Will hard code it to 2, as iOS only supports that amount. Pick-to: 6.3 6.2 Change-Id: Icb35d3b698b28d8191a554167dc8cc262b806fb2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Sanitize scroll deltas for NSEventPhaseCancelledTor Arne Vestbø2021-12-231-0/+10
| | | | | | | | | | | | | | | | On macOS 12.1 the NSEventPhaseCancelled phase can in some situations report deltas, which causes the scroll to "jump". This happens for example when initiating a momentum-scroll, and then putting two fingers on the trackpad to cancel the momentum phase, which starts a new NSEventPhaseMayBegin phase. When then lifting the two fingers again, we get an NSEventPhaseCancelled event with deltas, but the deltas seem like uninitialized data (has a x-value, after doing a purely vertical scroll e.g.). Task-number: QTBUG-97841 Pick-to: 6.3 6.2 5.15 Change-Id: I14e765b6111e53e7d3d0da219d4ac7fefe5243d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Add CryptoTokenKit framework for macOSIevgenii Meshcheriakov2021-12-231-0/+1
| | | | | | | | | Set ${FWCryptoTokenKit} when the framework has been found. This is useful for WIP card reader support in QtConnectivity. Task-number: QTBUG-97946 Change-Id: I0e85e0fd2e0fc45fb3069bbdaa2d8b2c927a6c2d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: QSysInfo::productType: remove the "will be" note about Qt 6Thiago Macieira2021-12-231-4/+3
| | | | | | | Fixes: QTBUG-99413 Pick-to: 6.2 6.3 Change-Id: Ib42b3adc93bf4d43bd55fffd16c360797871011b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Use generic simulator device for building apps via xcodebuildTor Arne Vestbø2021-12-232-9/+11
| | | | | | | | | | | | | | | | | | If Xcode wasn't configured with any simulators the build would fail since we had no device to build for. But we don't need to build for a specific device, we can build for the generic simulator device, just like we do for the non-simulator build. This likely didn't work properly at the time it was first implemented, but now seems to work fine, and is less fragile than the current solution. Running tests still enumerates the available simulators, as that needs a concrete device to run on. Fixes: COIN-777 Pick-to: 6.2 6.3 5.15 Change-Id: I50e31c1b350cf83ce348275b467051263dea88a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QString: reorganize some template functionsThiago Macieira2021-12-231-192/+185
| | | | | | | | | | | | This is going to screw up the git blame functionality (which is why they were forward-declared instead of implemented on-site) but the alternative is that Qt Creator thinks qstring.cpp had almost no functions inside. Pick-to: 6.3 6.2 Task-number: QTCREATORBUG-25594 Change-Id: Ib42b3adc93bf4d43bd55fffd16c1986f1a3c1574 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Document the State Machine Framework changes in the Core Migration GuideTamas Martinec2021-12-231-0/+6
| | | | | | | | | | | | Added section about having the State Machine Framework moved to its own module. Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-89285 Change-Id: I95d065230708d5b505d04309fd6ca21007d878dc Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* wasm: Use new event dispatcher for QtGuiMorten Johan Sørvig2021-12-235-230/+18
| | | | | | | | | | | | | The event dispatcher implementation is now in QtCore, except for the call to QWindowSystemInterface::sendWindowSystemEvents(). Implement QWasmWindow::requestUpdate() using emscripten_request_animation_frame(), instead of the previous registerRequestUpdateCallback() function which now is removed. Pick-to: 6.3 Change-Id: I7a13eb5391d48dba0f2afe4704ef3188b8daa74b Reviewed-by: Lorn Potter <lorn.potter@gmail.com>