We can't rely on the MACOS define as that's set by our private
QtPlatformSupport.cmake that's not shipped.
Change-Id: I86c578a282a0833408a06d923954510a3579bdaa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Remove quote character, fixing:
Performing C++ SOURCE FILE Test HAVE_openssl_headers succeeded with the following output:
Run Build Command(s)
src.cxx 8 88: warning: missing terminating ' character
8 | # error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it's libressl which is unsupported
which makes one think the test failed.
Change-Id: I0ac02deee4282ef7c953186b820a31309e82b5e1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Required by OpenXR. A VkPhysicalDevice or an adapter LUID + feature
level pair should be adoptable while leaving the rest (device, queue,
etc. setup) to QRhi as normal.
Change-Id: Iada0972671b037b4efb03e7831b7c9b8c5f2393d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
If the url is a "file:" scheme url don't check for permissions
which the file won't have, and then disable StrictMode for API >= 24
to be able to pass the "file:" path to the openUrl intent.
Pick-to: 5.15
Fixes: QTBUG-67877
Change-Id: Ia3fecc24a67069dc76f866455277bf8b929e7697
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The functional style interface is nice, but does feel alien in some
contexts, so better also have explicit encode and decode methods.
Change-Id: Ic07ced15f65cdb3a7f1cf044041e341d2ef87f79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Commit ec6556a2b9 changed the member from
a plain pointer to a QAtomicPointer. Not all accesses were caught.
Pick-to: 5.15
Change-Id: I3d4f433ff6e94fd390a9fffd161b4ff25508c48d
Reviewed-by: David Faure <david.faure@kdab.com>
Omitted type replacement in qDBusParametersForMethod() for now.
Task-number: QTBUG-84469
Change-Id: Ieb9fbb30b431c5e4183ad57acd35640e9556bf6c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Applied to headers only. Source file to be changed separately.
Omitted statemachine for now to avoid conflicts.
Omitted qmetatype.h for now - to be handled later.
Task-number: QTBUG-84469
Change-Id: I317376037a62467c313467d92955ad0b7473aa97
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Before this change, tests were never built for cross-compiling
configurations.
Add instructions that build and run tests for qemu configurations.
This required a bit of abstraction / indirection to find out what's
the path to the correct qt-cmake call, as well as prepending the
correct env prefix to each call (either the host one or the target
one).
Also, the QEMU configuration requires a few environment variables
to pick up the correct runtime linker and which qpa plugin to use
for running tests.
Finally, make sure the tests are not built and run if the DisableTests
feature is set in the configuration.
Task-number: QTBUG-84423
Change-Id: I0cec28c801a657e67cfa48f3c61cfe487109946b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This addresses two issues:
1. The generated code for QNotifiedProperty<T, ...> was broken when T is
a pointer. Notably, const S* & is not a constant reference to S*.
This is addressed by consistently using T const& instead of const T&.
2. The Q_PRIVATE_QPROPERTY approach assumed that the property name and
the getter are equal. This does break when they are not, and we are
unable to change either of them due to API compatibility concerns. An
example of this would be QQuickItem's parent property with a
parentItem getter. Therefore, we now allow the usage of NAME to
override the name of the property.
Change-Id: Idf2e85576c74371b5b0f6db15dbe6f2d17c5e33d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Adding support for a static notifier within QProperty itself - through a
QProperty "sister" class - is more efficient in terms of memory
consumption and run-time performance.
The MemberChangeHandler permanently takes up at least three pointers,
while the notified properties only cost one pointer in the binding.
Change-Id: Ia1a8c2b66f1f3c2fe13ae0ad9f12cdb6bdcc35ef
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
A guard callback is a predicate which takes the new value set by
setValue or computed as the result of a binding expression. If it
returns false, the value is discarded and the old value is kept.
Note that due to lazyness, when setting a binding, we still notify
everyone as the binding is only evaluated on demand, and the guard can
thus only run when someone actually queries the value.
Note further that a guard is allowed to modify the value that is passed
to it (e.g. to clamp it to a certain range).
Task-number: QTBUG-85032
Change-Id: I3551e4357fe5780fb75da80bf8be208ec152dc2a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Check at compile time whether the static callback takes an argument
(which has to be of the same time as the type of the property). If so,
retrieve the old value and pass it to the callback.
Change-Id: Ib1c4c9e05b826b6be492b03f66fa72ad015963ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This fixes two issues with QPropery:
1. QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged
calls a user provided evaluaton function. That one might actually
destroy the binding and delete the QPropertyBindingPrivate instance.
We need however to keep it alive until the function returns.
2. There was an infinite loop between QPropertyObserverPointer::notify
and QPropertyBindingPrivate::markDirtyAndNotifyObservers. This can be
observed when running tst_palette in qqc2. By returning early in
markDirtyAndNotifyObservers if dirty is already set, the issue is
avoided.
Change-Id: I1f0df05a5a9fa98554183263a25e16747c4d2274
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Otherwise the Objective-C++ sources will be built with the default
compiler visibility (visible), and then linked with moc-generated
C++ sources that have the Qt overridden hidden visibility, resulting
in linker warnings such as:
ld: warning: direct access in function 'X' from file 'moc_foo.cpp.o'
to global weak symbol 'Y' from file 'bar.mm.o' means the weak symbol
cannot be overridden at runtime. This was likely caused by different
translation units being compiled with different visibility setting
Change-Id: I22e15e7e181a74de8c0a22c73d06e600e582d7fd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It is not just that the unknown native types (e.g. VkInstance) lead to
showing the type as 'int' in some functions, the bigger problem was that
a number of functions were not present in the generated documentation at
all.
Pick-to: 5.15
Change-Id: Id71fe20c3a70a8d3b75bbc693a2a7ee94bb74642
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
[ChangeLog][QtCore][QByteArray] Remove method overloads taking
QString as argument, all of which were equivalent to passing the
toUtf8() of the string instead.
Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The .prl generation uses a very simple generator expression evaluator
that cannot cope with the $<TARGET_EXISTS> expression used in
src/plugins/platforms/xcb/CMakeLists.txt.
Replace this genex with a conditional qt_extend_target call.
Change-Id: Id17a230d66f701eb0938d10d6b6b7b680290b1c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
I somehow forgot that we build the pcre2 sources not only as part of
the bootstrap library and qmake, but also as separate library as well.
Apply the flags to the bundled library.
Amends 976fa5134a
Amends fa98adbd04
Change-Id: Ia1db3a8bd731c7e3ee4d7109be8e2ef98c594070
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Check that the sizes are even representable when checking if clipping is
necessary.
Fixes oss-fuzz 23630
Pick-to: 5.15 5.12
Change-Id: I95d6873d28b0e4f47aae7666f7ee96b745dc997b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When the application is in multi window mode then when pausing it should
not suspend the application as it can still be visible in the
background.
Change-Id: I03a561459b2aa04c808b7d4220cd3e558671dd17
Pick-to: 5.15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add overloads for qMin and friends where the arguments are of different
type, but one can be easily promoted to the other. Return the promoted
type. Promotions are only allowed if both types are either signed,
unsigned or floating point numbers.
This should simplify writing code in many case (as for example
qMin(myint64, 1)) and also help reduce source incompatibilities between
Qt 5 and Qt 6, where the return types for sizes of our containers changes
from int to qsizetype.
Change-Id: Ia6bcf16bef0469ea568063e7c32f532da610d1cd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes regression introduced in b4981f9d4c,
due to which it was possible to back-tab into a widget even though it or
its focusProxy had a NoFocus policy.
As a drive-by, split the complicated if-statement up a bit for improved
readability.
Change-Id: Ib0ac2604076e812e340b11534c23ae8ae958d082
Fixes: QTBUG-76924
Pick-to: 5.15 5.12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Breaks the build if any global header has
using P = SomeType;
statement, and unnecessary to do so before the headers are included.
Change-Id: I3b8cc705bf662f768b8895e4b3ec1428ab39ef27
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>