Move qtconfManualPath pointer to the unnamed namespace, so it's never
exported. Add the static setQtconfManualPath method that sets the
pointer at runtime.
Fixes: QTBUG-122739
Pick-to: 6.5 6.6 6.7
Change-Id: Icfc631f9680ad5f484920b0fdf3e408b7657c108
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Temporarily bring back the QtActivityDelegate.insertNativeView() and
QtActivityDelegate.setNativeViewGeometry() (replacement for
setSurfaceGeometry()) as they are still in use by the ActivityView
module of QtAndroidAutomotive.
They have been removed by 0a92d881bb.
Pick-to: 6.7
Change-Id: Ia00407d827ca9217c9f49df55b4cf7001ac9871a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The number of windows in a windowing system is clearly small, even
smaller the number of windows that should be affected by a single
touch event, so QSet is overkill. Use the recently-added
QMinimalVarLengthFlatSet instead, backed by a QVLA<16>. Even though
insertion and lookup are now logarithmic instead of constant-time, the
saved memory allocations will make up for it.
Change-Id: Ie33ecf4a155e58db597c67ed9c78549255c48b99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The handle is not owned by the Shell, we have to clear it up ourselves.
The documentation is not clear about how long the handle needs to be
kept alive, so store the icon when we create it as a member of the
private, and clean it up when it need to be recreated, or when the
QSystemTrayIcon instance gets destroyed.
Fixes: QTBUG-96348
Fixes: QTBUG-62945
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I6f93f29a415cde2cfe4e1b296295783c15b4da4b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Currently with have two base classes for COM-objects that implement
basic IUnknown functionality and the idea is to remove duplication and
keep just one. Since QComObject supports more features than
QWindowsComBase, such as multiple inheritance and intermediate interface
querying, we should switch to the former one.
Change-Id: Ief6567496de9f547b936de91d634c6998ba59a75
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Changed type of `id`, `int` -> `size_t`, to match `liveCount`, in
`CountedObject` struct.
Fixes: QTBUG-122301
Change-Id: I85513d5ff6a4f0c3fb53f77e55c43b1284d1b1a8
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Change type of variables `int` -> `size_t`, to match assigned value.
Fixes: QTBUG-122300
Change-Id: I5b99bd6a3b307ba2ec4ef79bcc517da60ae36413
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Since the Android emulator on CI is running without hardware accelerated
graphics, showing the widget can take almost the same time as the timeout
for exiting the app with the "wrong" exit code 1. If running on Android,
increase the timeout to 1000 ms to avoid flaky failures. Un-blacklist
tst_QApplication::abortQuitOnShow() since the random failures are
taken care of by this patch.
Task-number: QTBUG-122693
Pick-to: 6.7
Change-Id: Id52ae15b3ab2dbdaf4924b675276dfe3a4168585
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Do not allow replacing a state again if it is already being replaced.
Cleaned up from the patch provided in QTBUG-121126.
Fixes: QTBUG-121126
Pick-to: 6.6 6.7
Change-Id: Icca932b0e5cccd2f39ac18f29d8f7707887d147f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When adjusting handling for the special traling HEADERS with PRIORITY
case the actual no-headers case handling was lost.
This patch adds it back.
Now it deals with it being empty due to overflow or just empty headers.
With a real server this should never happen though, since they either
send the required headers or don't send a HEADER frame at all. So, in
theory it will not have caused a problem for users.
Pick-to: 6.7 6.6
Change-Id: Iacbb1183f26cb1f2e7e30ace6456488c4671972d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
One more method for STL compatibility.
This one is particularly subtle as it's required by the
`reservable-container` concept:
https://eel.is/c++draft/ranges#range.utility.conv.general-3
Without this concept, ranges::to won't reserve() before copying the
elements (out of a sized range which isn't a common_range).
Implementation notes: there were already a couple of constants denoting
the maximum QByteArray and QString size. Centralize that implementation
in QTypedArrayData, so that QList can use it too.
The maximum allocation size (private constant) needs a even more central
place so that even QVLA can use it. Lacking anything better, I've put it
in qcontainerfwd.h.
Since our containers aren't allocator-aware, I can make max_size() a
static member, and replace the existing constants throughout the rest of
qtbase. (I can't kill them yet as they're used by other submodules.)
[ChangeLog][QtCore][QList] Added max_size().
[ChangeLog][QtCore][QString] Added max_size().
[ChangeLog][QtCore][QByteArray] Added max_size().
[ChangeLog][QtCore][QVarLengthArray] Added max_size().
Change-Id: I176142e31b998f4f787c96333894b8f6653eb70d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The specification doesn't provide an explicit grammar, so I turned the
prose into ABNF for easier reference.
The goal is both to aid review of the validateSingleType() function
and to eventually use this to write a parser that doesn't use, or at
least limits, recursion.
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I21f81aa83cde356ab48105ea98f066024e0b7b5e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The "does not contain two slashes in sequence" condition reads a bit
unmotivated. It's easier written as "each part is not empty", so do
that.
Pick-to: 6.7 6.6 6.5
Change-Id: Ibb204429521910582bd8ee03ff54f72d7e15ce84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
We want to get rid of the QWindowPrivate::compositing member, as it is
no longer needed for the Android backingstore, which it was first added
for in a4f50269f8.
We can use textureChildSeen instead to check if we're compositing.
Pick-to: 6.7
Change-Id: If85b21f92c8253bf89543a7e81e03730023f8095
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
In reality I think it should be covered elsewhere, before reaching
the TLS code. But this is a simple fix to avoid an unnecessary warning.
This is actually quite similar to the resolution in
ef4ba0285f.
Technically checking isWritable would be more correct, but Qt is usually
the one to open the socket, and we open for both read and write anyway.
Fixes: QTBUG-116550
Pick-to: 6.7 6.6 6.5
Change-Id: I4996b18b5b65c434d91543451186f335e201604f
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Drop the templated executeRequest functions in favor of
qxp::function_ref for readability and type safety.
Pick-to: 6.7
Task-number: QTBUG-122018
Change-Id: I36c07ff5fe6d2025459fe3f7190bc29901a320ce
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Qt no longer sets DISABLE_EXCEPTION_CATCHING and can
use the common logic here.
Task-number: QTBUG-121822
Change-Id: If02feafe9eeac49fa2861d2357b358a19e756438
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This is on by default anyway (see Emscripten settings.js),
and setting it here interferes if exceptions are enabled
by other means.
Fixes: QTBUG-121822
Change-Id: I61d3f1960208e928a4144cff56a0b03c39087a34
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The "HTTP RFC 9110 5.3 Field Order" states that the values combined
with comma can be followed up by an optional whitespace, and for
consistency recommends "comma SP". This is also what eg. 'MDN Web
Headers' class does.
Fixes: QTBUG-122650
Pick-to: 6.7
Change-Id: I3391c86018090f0b8721929b64a7e3029e98ac85
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
A redundant semicolon after Q_ENUM(StandardButton) caused a compiler
warning.
Remove it.
Fixes: QTBUG-122637
Pick-to: 6.7 6.6 6.5
Change-Id: I959c0c6d56bc312ad40f18c9455f4e6118b1c7c2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
It can only happen on resource exhaustion, which is an unlikely
situation. That's probably why we didn't handle this case. But let's do
it now.
This necessitated that qt_create_pipe() return with errno/GetLastError()
properly set, so save it and restore around functions that may change it
(like qErrnoWarning()).
Drive-by update of some warning messages.
Testing this is not practical and is fragile, because it requires
causing the resource exhaustion problem.
Pick-to: 6.6 6.7
Change-Id: I76ffba14ece04f24b43efffd17aafe4f11f54c21
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As the comment says, on most RISC platforms, the return address need not
be on the stack in the first place. In fact, in all ones currently
supported by Qt, it's passed in a register to the callee, which has the
option of simply saving it in a callee-save register when calling leaf
functions. Even if it is using a frame pointer, the compiler can simply
use any register. That means unwinding the stack is not possible in the
absence of either debug information or stack-unwind information, neither
of which backtrace(3) will use.
Strictly speaking, even on x86 the compiler can use the RBP register for
any purpose and thus make getting the backtrace() impossible, but in
practice it seems to work.
Fixes: QTBUG-121389
Pick-to: 6.7
Change-Id: I5dd50a1a7ca5424d9e7afffd17acbd01ef916f5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It's deprecated and will be removed with LLVM 19.
Amends b1ee49b465.
Pick-to: 6.7
Change-Id: I5dd50a1a7ca5424d9e7afffd17ad07b3ab3fc18a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Otherwise we end up appending and modifying the shared object.
Pick-to: 5.15 6.5 6.6 6.7
Task-number: QTBUG-122704
Change-Id: I01ec3c774d9943adb903fffd17b692c2e6d53e97
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add implict constructor, treat the list like any other container.
Simplify the test code, and explicitly constructor-initialize when
we want an array and might have an array, so that we don't end up
with constructing arrays of arrays.
Change-Id: I14615f897cf8a2188510cfe1085ffc70a2396d5d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
`autoRenderTarget` is a private bool that very much looks like it's
used as a Q_PROPERTY. Use QDOC_PROPERTY for it to generate warning-
free documentation.
Pick-to: 6.7
Change-Id: Ia6255287f139ff23172c4fac96950e1a37eeef83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Clang requires return types, and QDoc warns when they're missing.
Add the missing return type, and slap on `noexcept` for good measure,
as it's part of the signature.
Change-Id: Idee32398df4229f0d02be4c90e52b9e8a8ef95ba
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
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>
tst_baseline_painting and tst_qpdfwriter rely on QT_FEATURE_pdf being
enabled, without making it a condition to build the tests.
Don't build the tests with PDF disabled.
Task-number: QTBUG-122137
Pick-to: 6.7 6.6 6.5
Change-Id: Idbf03f30557618c83e946a80b7759cd4f6978ad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
The method removed from QWidgetList widgets in a ranged for loop.
That caused items being skipped.
Create a new list by adding positives, instead of removing negatives
from the original.
This amends b1802a164b.
Pick-to: 6.7 6.6
Change-Id: I3f329290187ddc76169ababe8ffa6059d953212d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
The function now support two new arguments:
- DEFINITIONS, which allows specifying the custom definitions
- TARGETS, the list of targets thart will be used to collect
the [INTERFACE_]INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS.
Task-number: QTBUG-104898
Change-Id: I3f67537057f91a97597788f1bd4db6904bac6d9c
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
Currently we are searching binaries for string ending with ".so" in
order to find shared library dependencies. This is not the cleanest
solution.
Parse wasm binaries instead, and extract the information in structured
way.
Fixes: QTBUG-121833
Change-Id: Id0efb07af4efe7641ed4fd66f76c395722478f95
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>