The logic to detect color fonts in the GDI font database was never
implemented in the DirectWrite database, causing emojis to look
monochrome. The patch moves this into the font engine itself instead,
along with the other initialization code.
Pick-to: 6.7
Fixes: QTBUG-122168
Change-Id: I6f5dad579bd987149e613b8071821aaf70a89bc2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since SQLite 3.31 there is a new open() option SQLITE_OPEN_NOFOLLOW to
disallow a filename with a symlink for security reason. Expose this
option to QSQLite via QSQLITE_OPEN_NOFOLLOW.
[ChangeLog][SQL][SQLite] Add new option QSQLITE_OPEN_NOFOLLOW to expose
open mode SQLITE_OPEN_NOFOLLOW.
Pick-to: 6.7
Change-Id: I2d6218bde2bf8b4f1bc36125dffa551b52369072
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Fixes QTBUG-113255 by running graphics related actions also onPaused state when the paused app is visible. Also corrects possible other
problems where UI should be updated while app is onPaused state.
Fixes: QTBUG-113255
Pick-to: 6.7
Change-Id: I02ee6b0713ec5f08ebba676c5edf94d2c1f81958
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Both qsettings.cpp and qjsonparser.cpp defined Space in the
global namespace. Hiding it in one of them in an implementation
namespace resolves the name clash.
Pick-to: 6.7 6.6 6.5
Change-Id: I8dd1244f80d87f3908597ed82c8e41b49b7b916c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The various find() overloads that take a QRE *ignore* the case
sensitivity option set on the QRE object itself. They instead apply the
case sensitivity passed in the flags (see QTextDocument::find).
I think it was an historic mishap, but it's too late to change now.
Amend the documentation.
Change-Id: I526650d89a98777c7bb839b27d2f2e536a43ca4f
Pick-to: 6.7 6.6 6.5 6.2 5.15
Fixes: QTBUG-88721
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
On this ABI, pointers are 32-bit, so Qt::HANDLE (void *) is a 32-bit
variable and the "movq" instruction is inappropriate.
There's a GCC extended inline assembler modifier for the instruction
size suffix (%z0) but Clang seems not to understand it. Instead, I just
removed the suffix: we can do that because this is a memory load
instruction, which implies the destination is a general purpose register
(also required by the "=r" constraint) and therefore the assembler can
determine the size of the memory load from the name of the selected
register.
Note: I did not verify this compiles on x32 at all, much less that it
loads the right thing from memory.
Fixes: QTBUG-122674
Pick-to: 6.5 6.6 6.7
Change-Id: I01ec3c774d9943adb903fffd17b6513d146e89ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Using operator< on pointers that are not part of the same array is
UB. We need to use std::less to get a total order, so do that.
The QMinimalFlatSet copy in QtDeclarative is not affected, because
it's only ever instantiated with value_type int.
Change-Id: Ic8cd4852505f3d3ab57039ce26064ed47cac0deb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is a copy of qtdeclarative/src/quick/util/qminimalflatset_p.h as
of qtdeclarative/1e6cb2462ee87476a5eab7c71735c001a46c7b55, with the
following changes:
- Use a different header guard name. The header guard name is being
changed in qtdeclarative in parallel, but don't let there be a
window in which there might be a conflict.
- Add a type alias for QVarLengthArray-backed QMinimalFlatSet.
- Remove the qtquickglobal.h header.
- Adjust the introducing comment to the new home.
I've seen several use-cases for this in QtBase the last few days, so
it's time to move it into a more central place and get more users.
Change-Id: I03397edf8e885d3100c529b41dbf99e2a1184542
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When 3446313c7a extracted most functions
from QOperatingSystemVersion to a new unexported
QOperatingSystemVersionBase, for BC reasons, it kept the existing QOSV
methods as (inline or out-of-line) forwarders to the new QOSVBase
ones.
But the only ones that are actually still required are currentType(),
type(), and isAnyOfType(), because their Base equivalents use a
different enum type (we should probably make the OS Type an enum in
namespace Qt instead; other patch).
The others can just be REMOVED_SINCE, and should be, to make new code
use the base class implementations, where inlining and constexpr
properly work (they don't, on Windows, in exported classes).
Re-use the existing REMOVED_SINCE(6,3) block in removed_api.cpp to
move these functions there.
Amends 3446313c7a.
Reverts a tiny part of 2156778184 (will
conflict in backports).
Pick-to: 6.7 6.6 6.5
Change-Id: I1d7ba784634ccd7c9ba5f7ceddb15b7787468d31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is a step towards making QChronoTimer have nanoseconds precision.
Not changing QTimer::singleShot() methods to take nanoseconds; QTimer
uses milliseconds for the most part, having the static singleShot()
methods take nanoseconds would be a bit surprising?
[ChangeLog][Core][QObject] Added startTimer() nanoseconds overload and
removed the milliseconds overload. This change is backwards compatible.
Change-Id: I69e79c8feb6354846c6d3be57dc529af7abd1313
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Resurrect the parameters I18N_LANGUAGES and I18N_NATIVE_LANGUAGE for now
to allow integration of renaming changes that are a result of the Qt 6.7
CMake API review. Also, unblock dependency updates in qttools.
These parameters will be removed once all dependencies have been updated
throughout the repos.
Fixes: QTBUG-122691
Change-Id: Id0bfba50c7b168c61457ddf02b89e3d2c785e02b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QUrlQuery had operator==() and operator!=() defined as public member
functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get
rid of these methods and replace them with a hidden friend.
Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.
Use new \compares command in the documentation to describe the
comparison operators provided by QUrlQuery.
Task-number: QTBUG-120303
Change-Id: I083487a134887010ebbb78906d2c1982f2ad41b5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The order was wrong so we could have ended up saturating a 0
before we grew to 1.
Since this has never been in a release it is of no concern, and it was
already an edge-case anyway.
Amends 1090d5dd4a
Pick-to: 6.7 6.6 6.5
Change-Id: I4b70f9018c3049697495a58313af148f8366c8bb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use std::size, std::data, std::begin instead of member functions that
do not exist in e.g. std::initializer_list or arrays.
Change-Id: I073b69f51ef93c2fe87104f1d7f8fbed3c603b33
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Since we support QString and QList specializations, we should also
support QStringList directly. That's a bit more involved as we need
to specialize the code path for QString, which is not convertible to
or from jobject. But once we have mapped the type to jstring it
follows the implementation for lists of objects.
We now need to generate temporary local references when
converting a QString to a jstring, so manage a local frame. We do
so explicitly in chunks of 100 local references.
Change-Id: I7ae5cf7d0ba0099992c36f3677980c346526804b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This didn't work yet because the partial specialization of the
JNITypeForArgImpl factory was missing. Add a test case for
QJniArray<double> and QList<double>.
What doesn't work (yet) is QStringList for a native Java function
taking a String[]. That will be added in a follow-up commit.
Change-Id: I4d3fa0ecc04b98b9749f8358792f86c02ddbbc14
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Vulkan fails when we attach a depth texture to a render target with
QRhiTextureRenderTarget::PreserveDepthStencilContents (we want to reuse
the depth data from a depth pre-pass.)
vkCreateRenderPass(): pCreateInfo->pAttachments[3] format is
VK_FORMAT_D32_SFLOAT and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, but
initialLayout is VK_IMAGE_LAYOUT_UNDEFINED.
The Vulkan spec states: If format includes a color or depth component
and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be
VK_IMAGE_LAYOUT_UNDEFINED (https://www.khronos.org/registry/vulkan/
specs/1.3-extensions/html/vkspec.html#VUID-VkAttachmentDescription-
format-06699)
To fix this, just do the same as color attachments: specify a
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL instead of
VK_IMAGE_LAYOUT_UNDEFINED when the depth-stencil is preserved.
[ChangeLog][RHI] QRhiTextureRenderTarget::PreserveDepthStencilContents
now works properly on Vulkan
Pick-to: 6.7
Change-Id: I0577bc8021b3598ddfdcea4af98aaef46e8a4519
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
...so that MSAA is actually effective.
Pick-to: 6.7 6.6
Change-Id: I4bf85df1312773ec29154a51c9c8464912e6ef8a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Rendering into a multisample texture (color or depth-stencil) is
supported, but the code only seems to pick up the sample count from
renderbuffers.
Pick-to: 6.7 6.6
Change-Id: I95a97debfebc7582f2026282384f6fb97aadfe23
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The newer D3D12 backend uses DXGI formats (for the texture, DSV, SRV)
that actually work. Backport these to the D3D11 backend. Otherwise
attempting to create a render target with a D24 or D24S8 QRhiTexture
as the depth/stencil buffer won't work.
In practice this is rarely exercised since the depth-stencil is
typically a QRhiRenderBuffer that maps to a
DXGI_FORMAT_D24_UNORM_S8_UINT texture but without
D3D11_BIND_SHADER_RESOURCE. Whereas textures get the latter flag,
and things break down. At least now the usage of typeless and
typed format is uniform. It could still be questioned if D24
should actually use R24G8_TYPELESS or if the original was fine,
but for now just sync with the D3D12 backend.
Pick-to: 6.7 6.6
Change-Id: I8a0564fc42a7866dae90f49f7b557c83dffc4d6e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The special sizes NullCode and ExtendedSize does not need to be part of
an enum. Turning them into constants removes the need for some casts.
Task-number: QTBUG-119952
Pick-to: 6.7
Change-Id: Ie7835c52f4642ab907b91f0eceac2ea7650e81da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Fix typo in 'application'.
Emphasize MAXIMUM_MEMORY.
Link to the latest commit of settings.js instead of the master branch,
so the link doesn't break in the future.
Pick-to: 6.7
Task-number: QTBUG-121705
Change-Id: If4bbdcc4fa33d86a892c81dfd1d2703386a0035b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
When the QOSVBase we're constructing from isn't an actual
QOSVUnexported, the cast from QOSVBase to QOSVUnexported is
invalid. Instead of casting, add an QOSVUnexported(QOSVBase) ctor and
just call that.
Amends 2156778184.
Pick-to: 6.7 6.6
Change-Id: I7352a044b62086585f1b036433f9b8779c77ac9d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When 30a8e79243 added constructors as a
work-arund for an MSVC issue, the default contructor became deleted.
This hasn't caused trouble so far, as all users apparently pass a
payload object, but I'm about to merge a new user that doesn't, so
this came up.
Fix by bringing the default ctor back using =default.
Amends 30a8e79243.
Pick-to: 6.7 6.6
Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When reading pixels back from a QRhiTexture if the format is R16F/R32F
then we will read pixels to a buffer with just a red component comprised
of (half) floats instead of the default case (RGBA). This is useful when
reading back a shadow map.
Change-Id: Iff2881992f0341252d5c565b5dd64bed078319bc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Amends 83f7125ac8. We replaced
QFile::decodeName() with QStringDecoder so we'd know whether the
decoding from UTF-8 had failed, but forgot about Darwin's enforced
normalization.
Fixes: QTBUG-122624
Change-Id: I01ec3c774d9943adb903fffd17b5edc54c34c067
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
They can be treated like QJniObject, but are not QJniObject instances.
Pick-to: 6.7
Change-Id: I419b6d0493f9a0ad3dcc726d48ac4c9ad3e6bc19
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Looks better as the action in a text input field.
Pick-to: 6.7
Change-Id: I63fd9b963102919cf69f345723d1c5d83778f1f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Karolina Sofia Bang <karolina.bang@qt.io>
This avoids a warning with clang compiler.
error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
QT_DECLARE_EXTERN_RESOURCE(AusweisAppQmlModuleMoreView_raw_qml_0);
Pick-to: 6.7
Change-Id: Id289080884ba2b017e884a15debfdd46102f1093
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Add a virtual destructor to this polymorphic class and disable copying
(requires to bring the default ctor back manually, and to export the
class nested in an exported class).
Amends 248d2103b5.
Pick-to: 6.7
Change-Id: I9008e4ecebca34feac6ae92fa026f2673b652ba9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When 2e8a48c1cd made
Annotations::mapped_type a struct Annotation instead of just QString,
it inserted the Annotation definition after the first inline user of
Annotations (struct Method).
I don't know why this compiled in the first place, but it did,
probably because of the re-parse-everything-at-closing-of-class rule,
but there's no reason to not move it to before the first users, so do
that.
Found while trying to make QDBusIntrospection a namespace instead of a
struct.
Amends 2e8a48c1cd.
Pick-to: 6.7
Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Of course, createSurface() is called more than once, for example
when coming back from the background, and you cannot add a View
to the layout more than once, since this leads to an uncaught
exception and a crash.
So add the QtEditText once, in the constructor, as is indeed
sensible.
Fixes: QTBUG-122648
Pick-to: 6.7
Change-Id: I7ef48951cd8a1c99935f5e96c70b6dbf0c745803
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Not really a common use-case and shouldnt be in images anyway, but
we have the code to support it, except it had a typo in it.
Pick-to: 6.7 6.6 6.5
Change-Id: I8585eaf7be82f13e61c94430743d765359fa48fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This reverts commit 5b5f4344da.
Reason for revert: Without the key being public, we would have to duplicate this variable in our application code when fetching the stored referrer.
Pick-to: 6.7
Change-Id: I46ad3618da9912c41f8248f871c24dd41015af2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In order to use the same functionality from outside the class and avoid
reimplementation, moving the dpi minimum value check to functions.
Pick-to: 6.7
Change-Id: I242b18fafab1b6283a46bda8b59e87adf50e5c0b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
A null view can not be focused.
Pick-to: 6.7
Change-Id: I0564dd554a304e2e60e3ae83c4782ac348edcd9b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Replace operator==() and operator!=() private friends with
comparesEqual().
Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.
Use new \compares command in the documentation to describe the
comparison operators provided by QStorageInfo.
Task-number: QTBUG-120303
Change-Id: I6434dc8382f6554b9e60840bac4abaeb95b70db6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QProcessEnvironment had operator==() and operator!=() defined as public
member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to
get rid of these methods and replace them with a hidden friend.
Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.
Use new \compares command in the documentation to describe the
comparison operators provided by QProcessEnvironment.
Task-number: QTBUG-120303
Change-Id: I4c57f6cfb9589e82a37eea6993e079212b34cecd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QStringView::split() only returns an empty container if a) the haystack
is empty and b) SkipEmptyParts is in effect.
Neither is the case here: We use the implicit default of KeepEmptyParts,
and we've already checked that the haystack isn't empty in the first
line of the function.
So the result of split() can never be empty here. Remove the check to
avoid confusing more readers than just yours truly.
Amends the start of the public history.
Pick-to: 6.7 6.6 6.5
Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
... to describe the comparison operators provided by these classes.
Task-number: QTBUG-120303
Change-Id: I611a1801eb038586bfe57be9b502b6f17f3d5742
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Every call to CoInitialize on a thread must be paired up with a call to
CoUninitialized on that same thread. QComHelper helps ensuring this, but
if an object using QComHelper is not created and destroyed on the same
thread, we end up in loosing this pairing.
This patch helps detecting such issues.
Task-number: QTBUG-121495
Change-Id: I07984437d1515d7ef61820d7152c339924b36e4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
...according to the Qt 6.7 CMake API review.
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I42012e346325ff05d63fa4dac44276eef15320fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add missing \since 6.7, and document the purpose of each value based
on the description in the freedesktop specification.
Pick-to: 6.7
Change-Id: Id88438abf152c317600454d7137a19b13aa0a3cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>