| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
One amending 4207a1664d6901322c19edddad95ec53bdd2a017, the other
amending c1341b7557ce52c681618c77c17687623fc0f3b2.
Pick-to: 6.10
Change-Id: Ib5db1a0728e359499a1a53d12a8157df7c3569e6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
Amends dc2521c156fb694f379104191e540a57371b41f0
Change-Id: I2a1e7da5aa5b7015ced25fcc49c1e66275db4bc8
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables ADL, which might end up picking up unrelated templates
from user namespaces, and, due to QtPrivate::wrapped_t in
qanystringview.h, breaks TUs (such as -unity-build), where both
headers are included.
Amends the addition of the feature, somewhere before the
bdbe4c8858e378d5b90bed799b67304d452fc0da rename to QRangeModel.
Task-number: QTBUG-142184
Fixes: QTBUG-142182
Pick-to: 6.10
Change-Id: Id41ec4bca1059ab525c5c6bfad052d83572e1d91
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
.. to use a common vocabulary, and share code.
Amends 900d4bd29f30effbb5dbb0efa96886af03839a15, which introduced
ArrowProxy for use in QKeyValueIterator and QDomNodeList::It. This is
just another user I've overlooked up to now.
Pick-to: 6.10 6.8
Change-Id: I2c1eecc75a209ce552ddd1fdebfc6da784c83a00
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It applies extra safety measures for such tag types.
Amends 74a87a329498422db0dea3e469fb84704accbb2b, which ought to have
ported this tag struct, too.
Pick-to: 6.10 6.8
Change-Id: Idd2c116d1045f4218ec74c52f8ddf00324abd59c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detect whether the return type of a call is similar to std::expected.
This indicates that the caller wants to handle exceptions explicitly, so
in case of error, we pass it through the the std::expected-like value.
We still clear the exception state. The caller is responsible for
freeing the jthrowable local reference.
For this to work, we have to propagate errors through to the outer-most
function. This includes allowing QJniObject to create QJniEnvironment
instances that don't implicitly return a clean environment in the
destructor. As long as we can call checkAndClearExceptions() in the
public functions (unless the caller opts in), this should not break any
existing code that expects QJniObject to implicitly clear exceptions.
Add tests for all overloads to make sure that exceptions (from wrong
class or method names, and thrown in methods) are caught.
Add "Impl" helpers that do not handle exceptions if instantiated
accordingly, and call those if we have to maintain compatibility in
public functions while also enabling opt-in handling for modern APIs.
Add tests that show that we can now handle exceptions ourselves for all
public QJniObject APIs. If possible, we build the test with C++23 so
that we can use std::expected; otherwise, try to use tl::expected by
downloading the header-only implementation from github; and failing
that, use a minimal implementation of a type that could be used instead
and makes the test pass.
Fixes: QTBUG-93800
Fixes: QTBUG-119791
Task-number: QTBUG-92952
Change-Id: I1cfac37ac9af8fd421bc0af030a1d448dd0e259e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the layout of the enum documentation by splitting LegacyBehavior
from the rest of the enum values to prevent the value column from taking
up too much of the page width.
Mention transition details rather than times to avoid confusion about
terminology.
Fixes: QTBUG-141801
Change-Id: Ib995ab2af3bcddce669df818ff949b7a3e959667
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The macro has been silently active since 6.5, with no way to disable
it, so remove it now, after two LTS releases have been released with
this new default.
Pick-to: 6.10
Change-Id: Ibc12fa59707a75eb9e4a452471a83e9df206a7b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch from a function based implementation to making
Promise a object.
Maps straightforward to a javascript promise, except for
this:
We need to do cleanup when the promise has been fully processed.
We do this by adding a final handler.
However, the handlers are called in the order they are added, so
the final handler we add in the constructor will be executed
too early.
We solve this, in a non optimal way, by adding a final handler
after each then, and catch, handler.
This makes the interface easy to use, even if it is suboptimal
Fixes: QTBUG-142138
Change-Id: I6be3f102e838467cc98f4a9825fd5f6fe0e1e1a2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use __has_warning() to check if -Wcharacter-conversion
is supported before disabling it, in order to avoid
"unknown warning" warnings.
This is/was a problem when building with Emscripten 4.0.7,
which uses a git snapshot of Clang 21 which does not
support the warning.
Amends f20f12baab1f40ec0aad2635186e7d270139509b.
Pick-to: 6.10
Change-Id: I4c08e69013b36b87709295d9a3a79d8986078ef1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Added a note to the qt_add_android_permission documentation clarifying
the need for INSERT_PERMISSIONS to be present for it to work with the
API.
Fixes: QTBUG-138568
Pick-to: 6.8 6.10
Change-Id: Ibb7a5594ae731f3c64582ea27db329a582a94d5b
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][configure] Added a -generate-vcpkg-manifest configure
option. This generates a vcpkg.json file in the build directory. To just
generate the manifest without configuring Qt, run configure with
-generate-vcpkg-manifest -dry-run.
[ChangeLog][configure] When configuring with -vcpkg, generate a vcpkg
manifest file in the build directory, and set VCPKG_MANIFEST_DIR to the
build directory to use that manifest file. You can turn off the manifest
generation with -no-generate-vcpkg-manifest. You can turn off setting
the manifest directory by passing -- -UVCPKG_MANIFEST_DIR to configure.
Configuring with pure CMake won't generate a vcpkg.json.
This patch adds a low-level CMake API for creating vcpkg manifests in
QtVcpkgManifestHelpers.cmake.
The functions qt_find_package and qt_feature gained arguments for
creating dependencies in the manifest and add them to features.
This adds a package dependency (not guarded by any feature):
qt_find_package(WrapSystemFreetype 2.2.0 MODULE ...
VCPKG_PORT freetype
VCPKG_VERSION 2.3.4
)
This adds a package dependency `freetype` to the feature `freetype`:
qt_find_package(WrapSystemFreetype 2.2.0 MODULE ...
VCPKG_PORT freetype
VCPKG_ADD_TO_FEATURE freetype
)
This adds a feature `freetype` with `gui` as its "parent dependency":
qt_vcpkg_scope(gui)
...
qt_feature("freetype" PUBLIC PRIVATE
SECTION "Fonts"
LABEL "FreeType"
PURPOSE "Supports the FreeType 2 font engine (and its supported font formats)."
)
If features are turned on/off via configure arguments, we set the CMake
variables VCPKG_MANIFEST_NO_DEFAULT to ON and VCPKG_MANIFEST_FEATURES to
the list of corresponding vcpkg features to only install libraries that
are needed for the build.
For a per-repo build, we create a vcpkg.json with dependencies only for
that repository.
For a top-level build, we create a vcpkg.json with all dependencies of
all repositories, excluding those that have been skipped (with
configure's -skip argument).
Task-number: QTBUG-73760
Change-Id: I6cc449d712f32d9e564acecaede5a7b31f309a8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler cannot look into format strings and extract common parts
for us. We need to do it manually.
Saves more than 400B in text size on optimized GCC 15 C++26 unity
AMD64 builds.
Pick-to: 6.10 6.8 6.5
Change-Id: Ia8db139d9a1fc219a84eaec42c6f72dc9dc9d135
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's easier to read, and involves less class template instantiations.
As a drive-by, refer to wrapped_t using qualified lookup, to prevent
ADL injections. There's much more whence these came. Created
QTBUG-142184 to keep track of the general issue.
Amends 8edabea2a76192788d30afc22e2ebcb560195401.
Task-number: QTBUG-142182
Pick-to: 6.10
Change-Id: I1a54b904df4e0204a7909ea10845acccb539866b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Dynamic Feature functionality requires java classes in jni interface
to enable google play feature delivery functionality. This function
adds public interface to add java source folder to the build.
Task-number: QTBUG-124600
Change-Id: I77e87f752cfb74b734dc34470e39b279d11868a6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
If the iterator pointers are the same, then the iterators are the same
and their distance is 0. No need to call any functions for this.
This also makes empty container interfaces less dangerous. The resulting
containers are simply empty, too.
Change-Id: I64896fdaa391e97e46430233a74071aadf20f0ea
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.10
Change-Id: I16544e9e64f9ef4b43cbd40ad4dd2bc3c30173d4
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Apple operating systems where the app runs in a sandbox,
the application can not access files outside of its sandbox
without explicit user approval.
This applies to iOS and friends, as well as optionally for
macOS (when the sandbox is enabled, which is a requirement
for publishing apps to the macOS App Store).
When the user gives explicit access to a file or directory,
we need to manage this access at runtime by starting and
stopping the access via startAccessingSecurityScopedResource
and stopAccessingSecurityScopedResource, and these functions
must be balanced, to avoid leaking kernel resources.
The access unfortunately doesn't persist automatically when
the application terminates (unlike takePersistableUriPermission
on Android), so we have to manually persist the access via
security scoped bookmarks. We store these inside the app's
own sandbox, in a way that limits the access to only that
application, so persisting them on behalf of the user should
be fine.
The persisted bookmarks are loaded in the background on
application start, ready for when the application wants
to open earlier accessed file or directories.
[ChangeLog][Apple] Sandboxed applications on Apple platforms,
(including macOS if opted in to) can now access files outside
of the application sandbox (so called security scoped resources)
for both reading and writing. Files or folders chosen by the user
via file dialogs or similar native mechanism are automatically
and transparently handled, including persistent access across
application and device restarts.
Fixes: QTBUG-120528
Task-number: QTBUG-117832
Task-number: QTBUG-120528
Task-number: QTBUG-141414
Change-Id: I90d94066cbf7cd74750049d5d1b990917fd10cad
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
| |
|
|
|
|
|
|
| |
We need to process events for the then and catch handlers as well.
We stop processing on receiving the finally handler, as before.
Change-Id: Ie173f31367b4c408c884134428329b2b7e54c5dd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC says that CaseConversion::Upper is ambiguous between
- struct QUnicodeTables::CaseConversion
- enum class QtIcuPrivate::CaseConversion
In a -unity-build, those two entities are in-scope at the same time,
so disambiguate by renaming the entity with narrower scope.
The alternative, fully qualifying the enum uses with the QtIcuPrivate
namespace would have caused similar churn, and would have run the risk
of being removed again by the mythical maintenance programmer, due to
use of "using namespace QtIcuPrivate;" in at least some of the
functions that refer to the enum.
Amends eaf77edebdf1c0b1682c28c014f2d81479af0051, which added the
conflicting QUnicodeTables::CaseConversion and/or
6f4d64b21ec90a792c7c8308a6615ca87b9ea6eb, which added
QtIcuPrivate::CaseConversion, which this patch changes now.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-109394
Change-Id: I1f6379a200ae0cea5befd5d6cf210be14c0344f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
| |
The #if-ery is not needed and confuses documentation authors.
Get rid of it.
Change-Id: Icd6cfd9baa1389eadc87a03ec0583767ae0a3fb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
The problem is (at least) with ArrayBuffer. It cannot be accessed as
a list of key/value pairs.
It turns out we only need to (partially) clone Event objects, so
limit the logic to do just that.
Change-Id: I9796250ad63266d38e760ce84a4f2150a74f337e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This fixes a build error from having multiple redefined macros, and
also avoids the warning of:
Included header qtcore-config_p.h is not used directly (fixes
available) (clangd unused-includes)
Change-Id: Ie1575d7dd61d4747be0dc876300063ca3feb9191
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drive QAbstractAnimaton-based animations using RAF.
This has two main benefits:
* The animation update rate automatically adapts
to the screen refresh rate
* The animation update happens in sync with the
draw callback, instead of as an extra wakeup in
between frames.
Add QWasmAnimationDriver, which replaces QDefaultAnimationDriver
for Q_OS_WASM.
Add QWasmAnimationFrameMultiHandler. This class supports
multiplexing multiple animation and draw callbacks to
a single native requestAnimation call. It also orders
the callbacks such that animation callbacks are called
before draw callbacks.
Make QWindow::requestUpdate() use the new multi-handler
(via QWasmCompositor, as before)
Fixes: QTBUG-133695
Change-Id: I0a3fda562a7ba2e8d659d707335d1ce116f71bd9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
|
| |
|
|
|
|
|
|
| |
The eventfilters doc snippet needs at least Qt Gui.
Put its add_subdirectory call into a QT_FEATURE_gui check scope.
Change-Id: I6c79ccd0f4d668e353584b61b6ff8c1898d50962
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with Qt 6.10, we cross-compile all tools when building Qt for
Windows on Arm. See 9254959ace4594528d9410570f4430e88763024e in
qt5.git.
This means that the generated qtpaths.bat script which calls the
x86_64 host binary is now named host-qtpaths.bat, to allow for the
existence of the arm64 qtpaths.exe executable.
This breaks the cmake deployment API, which expects the script to be
called qtpaths.bat when cross-compiling on Windows.
At install time one sees the following warning:
CMake Warning at Qt6Core/Qt6CoreDeploySupport.cmake:777 (message):
No qtpaths executable found for target Qt at: . Libraries may not be
deployed correctly.
Extend the logic to search for both qtpaths.bat and host-qtpaths.bat.
Change the existing debug message to a warning, when the qtpaths
script is not found, with the ability to opt out of the warning.
List the searched candidates when the warning is shown.
Adapts to 9254959ace4594528d9410570f4430e88763024e in qt5.git.
Amends bcdc9d7059b6ecd4e0bfb44cf5a42d87c49e3edc
Amends 571201603acc731330c9af42a3aca9cda41d38fd
Pick-to: 6.8 6.10
Fixes: QTBUG-142126
Change-Id: I5ddf39e5f38b53eccf4fcbbdbf1601b7e20c5934
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned at the top of assign(), the function ought to provide the
basic exception guarantee.
We were checking whether the construction of T from the result of the
projection is noexcept, but, as Thiago pointed out in a related
change, we ignored that the projection invocation can fail, too, in
which case we'd leave a corrupt container around (size would not match
the number of active objects in the list, holes in the middle if we
started to use the prepend buffer, but failed in the middle).
To fix, also check the projection for noexcept and fall back to the
existing non-noexcept-construction paths in that case.
It's pretty harmless, since the functionality isn't exposed in public
API (if you consider QArrayData* non-public, that is), and the only
user of projections was QString::assign(), and the projection it uses
cannot throw (cf. f2ea9d8dc8dc8d52490722f78ea46cd374d8e649).
Amends 782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f for the first hunk and
e07710007b4cf9c0665ac9d5c2b6c7ef588aae0a for the second.
Because of a massive code-move and -rewrite that has happened in dev,
I decided that it's simpler to fix this in 6.10 and forward-port to
dev, as it's one less conflict to resolve.
Manual conflict resolution for dev:
- dropped the original's second hunk, as that code is gone in dev
Fixes: QTBUG-141899
Change-Id: I026f703e5245422dce2951fd733178b5a0a4eefe
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 73fa4cf2004690ae71ed9c41a93aa071fda98ecc)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As is customary for tag structs, make the default ctor explicit to
avoid construction as '{}'.
Make op== constexpr (drive-by: make it a hidden friend instead of a
member function), and add op!= to C++17 builds, for symmetry.
=delete the qHash() overload so it doesn't accidentally match
some other overload.
We should eventually also =delete equality, but atm, this breaks
QSet::compareEquals, which calls QHash::op==, which (incorrectly)
SFINAE's out for a non-equality-comparable QHashDummyValue
mapped_type.
Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3.
Not picking back, as it's a rather isolated change with very little
chance of creating conflicts going forward, but non-negligible chance
of breaking something in older branches.
Change-Id: I8125581c476f854ebe4f9ddc791d3ddce9f169d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
QAtomicScopedValueRollback became a public API in 6.7.
ammends 4fa9f13397abf5da44a0fbd70692fa2c8f79ac13.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-115107
Change-Id: I0d0069b0403ef5109b7f9ead175a18b45b1cea30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Digit-parsing wasn't taking into account the width of digits.
It thus failed where digits are encoded as surrogate pairs.
Expanded a test to expose this failure.
Take the width of digits into account.
Pick-to: 6.10
Task-number: QTBUG-139223
Change-Id: I0e5497203d6657d04878f06b6a736a57c16edc2f
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Can't mark the whole repo with that macro, because in corelib that would
take out the QString conversion operator which is BiC.
Add a hard build-time error if QT_NO_URL_CAST_FROM_STRING is defined in
corelib, as requested in code review.
Change-Id: Ia0e302a2f82b86800e84d15e86ab138f78d45e4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
| |
Q_ENUMS and Q_FLAGS have been deprecated since at least Qt 6.0.
Task-number: QTBUG-99060
Change-Id: Ia8cbc607c34683dec99587571c0d04f1854e77c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When Q_MOC_RUN is defined, some Q_ENUM/FLAG related macros are defined
as themselves, whereas some other ones are missing.
It's not obvious what the exact purpose of having those macros defined
when Q_MOC_RUN is defined, but until we know better, add macros that we
think are missing from the list.
This also fixes a typo (s/Q_FLAGS/Q_FLAG/) from commit
14583137ae445fbfdc82922266f5c0736454f6c4.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-99060
Change-Id: I096a774baffc05826320af5454563a7825ce064f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the QHashDummyValue specialization, the noexcept was missing. Add
it.
In the primary Node template, takeValue() was conditionally noexcept,
but seeing as it just returns an rvalue reference to the 'value' data
member, it's of course unconditionally noexcept, since the actual move
contructor or -assignment operator call happens after the function
returns.
Besides, even if it had to be conditionally noexcept (e.g., because it
returned T-by-value), it would have to check for
nothrow_move_constructible, not _assignable.
Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3.
Picking to older branches is ok, since these functions, even if they
were marked noexcept(false), could not throw any exceptions, so
forward BC is not broken.
Pick-to: 6.10 6.8 6.5
Change-Id: I43aab284acc8b1303d4147c1b8c58613bbb05b25
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(was: function template)
Coverity complained that, when instantiating a QHash with
is_same<mapped_type, key_type>, the two terms of the logical AND
operator were identical.
This is, of course, expected and perfectly as intended, but in the
interest of fixing-instead-of-dismissing, try whether making the
entity a variable template intead of a function template will fix the
Coverity complaint, too. After all, this is how you would write the
entity today, in C++17.
As a variable template, add the idiomatic _v suffix (to explicitly
break out-of-tree users, if any, with a clear error message).
Amends 5b7c3e31b538376f2b4733bd868b5875b504cdb3.
Coverity-Id: 378449
Change-Id: I1dab5d18d6f55edd58e16b9773403cee2f93dfee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Use our begin/end helpers from the Details namespace to iterate over
rows, which might be pointers or smart pointers. Simplify by using the
namespace, which gives us direct access to the pointerTo helper as well.
Amends f9bb6c8d900205375c70bb33f359ce0250212460.
Change-Id: I2724d5c83c4c0af85f3141c340ed14683dea74d2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QRandomAccessAsyncFilePrivate::close() function is supposed to
cancel all operations and close all the related IO channels,
including the main IO channel.
The initial implementation had a false assumption that the callback
indicating that the main IO channel is closed is always the last
callback that is called in this scenario. So, that callback was
used to unconditionally call wakeOne() on the condition variable
that was used to signal that all operations are completed.
However, in practice when we cancel the operations, we receive the
following callbacks:
* close callback from each IO channel related to each operation;
* completion callback for read/write operations with done set to true
and error code indicating cancellation;
* close callback from the main IO channel.
All these callbacks can come in an arbitrary order.
As a result, the case when multiple operations are still in progress,
and the file is removed (or close() is called) was randomly crashing
on CI, because the completion callbacks were trying to access the
already-removed file.
This patch updates the logic to only wake a condition variable when
all callbacks are received. In order to do that we introduce a new
m_numChannelsToClose variable to keep track of the number of active
channels, and use the size of the m_runningOps set to track the
running operations.
To verify that the approach works reliably, I manually ran the
equivalent of tst_QRandomAccessAsyncFile::fileRemovedInProgress()
100'000 times for each operation (owning and non-owning read/write
separately).
Amends e6b26ad1eca555ee1e6b2c4e9b4c7676dc754b04.
Fixes: QTBUG-141730
Change-Id: I874b9b9999398f787b5039c78bc3d3eee44c088c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.10 6.8 6.5
Change-Id: Ib88dfd1808bd72155df4d8fb865306413c8c3d91
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit removed their use from QRandomGenerator, which was
the only user. This removes their detection too, which means QtCore will
not refuse to load when compiled with an -march= flag that specifies the
feature should be present, but is missing at runtime.
See https://lore.kernel.org/all/9a27f2e6-4f62-45a6-a527-c09983b8dce4@cachyos.org/
Task-number: QTBUG-69423
Task-number: QTBUG-129193
Pick-to: 6.10 6.8 6.5
Change-Id: Ib67da873cc42acfedaeefffd56db0414bb7ea6b0
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no reason to disallow truncating nothing. The alternative is to
check the size before truncating, which is unnecessary extra branching.
Instead, just let this function do nothing.
Amends 15e3ae6b9da9b32236d3e3348ede86c3acf06fb4 ("Introduce
QArrayDataOps::truncate") from Qt 5.0 but cherry-picking nowhere near as
far back because nothing used it until assign() in Qt 6.8. QList does
not have a truncate() function and both QString's and QByteArray's use
resize() instead.
Pick-to: 6.10 6.8
Fixes: QTBUG-141918
Change-Id: Ie3342e0ea9ee312bd5cbfffd4d4a83da27a838e6
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include two new languages, Ladin and Shan, and document the various
languages and scripts that show up in the cldr2qlocalexml.py output,
that I have checked and seen to contain inadequate information. This
may make it easier for future updaters to spot new unknown codes when
they show up.
These are not picked back to past versions because they're naturally
documented as [since 6.11] and picking would involve each past branch
getting a minor version as its since.
Fixes: QTBUG-141949
Change-Id: If0cb3e3b33cd3ce636fd29e904a9ddd617940314
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code to trim trailing zeros from z (or zz, but not zzz) format
correctly checked for whether the text ended with the locale's zero,
but incorrectly chop(1)ed to remove the zero, neglecting the
possibility that the zero is longer. Noticed while checking where else
we used QLocale::zeroDigit() possibly naively.
Add Fulah-Adlam tests for milliseconds, which confirmed the problem
does actually appear. Fix dropping of trailing zeros from millis.
Pick-to: 6.10 6.8 6.5
Change-Id: Id080f082b2890a102809ba8d0f687d55ac082357
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
This is needed to match kludges already present in
QUtcTZP::displayName(), which needs to do this to respect locale zone
offset forms.
Task-number: QTBUG-139223
Change-Id: I367413817e4824e3e5dbe0c73d8d6b36dfc1bf64
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its OffsetFormulaMatch::operator bool() was missing
const-qualification; supply it and use it.
Combine an indexOf() and the check of its return into an if condition.
Split up an if-else chain where an early return made else redundant.
Add notes with links to help clarify what's going on with some of the
formatting details.
Pick-to: 6.10 6.8
Task-number: QTBUG-139223
Change-Id: Ie235641c3086965aeb631588c55ec38a554a08e0
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make the test runner run the current test by default in
non-batched mode, without requiring a testname parameter.
Change-Id: Ia74f5a3db4a5c4a8d9f6a41073520653781d0f17
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 08ebe3465cc2fce98662b5833b75503490f66265.
Reason for revert: the ckd_* functions are not constexpr. If we're going
to have to keep our implementations anyway, then we may as well skip
using the C23/C++26 feature. Maybe in C++29 they become constexpr.
I've left behind the requirement to not use plain char, in case we want
to switch to these later. That retains the old commit's changelog.
Fixes: QTBUG-142028
Change-Id: I6db786946ae31be16891840b03e5120eb8915d52
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code use std::move() on the result of Node::takeValue().
Node::takeValue() currently returns a T&&, which already is an
rvalue. Even if the return value gets changed to T-by-value at some
point, it still will be an rvalue, so we can safely drop the std::move
here, as the argument is already an rvalue.
Amends d281f5cc35a974840441e8ed2587bbe74789e9ee.
Safe to pick, since takeValue()'s signature hasn't changed since
before Qt 6.0 (5b7c3e31b538376f2b4733bd868b5875b504cdb3, specifically).
Pick-to: 6.10 6.8 6.5
Change-Id: I2be3241d735e3e2931ab2cc8f13720e0b4629181
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qt6_add_big_resources creates a helper object library using
_qt_internal_add_rcc_pass2 and disables AUTOMOC and AUTOUIC for it.
qt_examples_build_end collects all targets created in the examples
subdirectory, an enables AUTOMOC and AUTOUIC for them, to avoid some
top-level build issues.
If an example uses qt6_add_big_resources, then during an in-tree
example build, AUTOMOC is re-enabled for the helper object library.
That causes build errors due to $<TARGET_OBJECTS:obj_lib> usage in
_qt_internal_add_rcc_pass2 expanding also to a mocs_compilation.cpp
file and passing a semicolon separated list to rcc --temp option.
Set a _qt_internal_is_rcc_pass2_obj_lib property on the object
library, and skip re-enabling AUTOMOC and AUTOUIC for it when querying
for in qt_examples_build_end.
This allows using qt6_add_big_resources in examples without causing
build errors.
Pick-to: 6.8 6.10
Change-Id: Ib22f77b683757f0981b3ab788edb63bb9e74f67a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is just the plain upgrade without adding new languages.
It required two changes to expected data in tests.
[ChangeLog][QtCore][Third-Party Code] QLocale now uses v48 of the
Unicode Consortium's Common Locale Data Repository (CLDR).
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-141949
Change-Id: I8d3a299c602e6cd5ea76c6bc479028aeda8b8e50
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Both classes don't inherit from QObject, so the Q_FLAGS macro doesn't
register anything with the meta-object system here.
Task-number: QTBUG-99060
Change-Id: Id25f8b92cfe6eeade28059f5f7c661603f08e863
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|