In a prefix build, this function uses install(PROGRAMS) which correctly
sets the executable bit. In a non-prefix build, we did file(COPY)
without explicitly setting executable permissions.
Now, we're also setting the executable bit for
qt_copy_or_install(PROGRAMS) calls in non-prefix builds.
Change-Id: I283e9aeed2a23016ee196d83d584a7eaaa5edd66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To be consistent with the Qt6HostInfo package, we're providing paths
without prefix in the variables like QT6_INSTALL_BINDIR.
The full path can be easily obtained by combining the relative path with
the QT6_INSTALL_PREFIX variable.
Also, the value of QT6_INSTALL_SYSCONFDIR was wrong. It usually is
located outside of the prefix.
Change-Id: I0035633a8c1c865d86d5ffc8b36565ceb2e7ea25
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This package is supposed to be loaded when cross-building Qt from the
host Qt installation prefix. It provides information about the host Qt
by setting various variables. The information reflects what "qmake
-query" of the host Qt would return.
All provided variable names begin with "QT6_HOST_INFO_".
Change-Id: Id568923a318d6e3b48c450663519a3727f615a8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The Qt macOS event dispatcher defers modal session cleanup until
the next runloop pass. But as it stood, we never did do so for
stand-alone qApp->processEvents() calls. The result was
that a NSModalSession would be kept alive longer than necessary, which
would impact the activation state of other QWindows.
Change-Id: I054f3084132c9d20a29a3f5823c19b7123ef40bf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This uses sed -E (extended regular expressions) to improve readability of
regular expressions. Shouldn't be a problem on most modern systems.
Change-Id: I12c9834c1ef83bf5f8547bccff655a6b8525cc3d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This gets rid of a few warnings during configuration.
Task-number: QTBUG-85276
Change-Id: I07d2fdfd8d3f81f1d780528ee6350e1a3ded9523
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
A developer could write 'ninja host_tools' to build the qtbase tools
and their dependencies, and then configure another cross-compiling
build dir pointing to the previous host build. This shortens the
workflow for cross-building when working in qtbase.
Change-Id: I69e70d23ce9df8669bcadf326d0586f097e5cb21
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Rather than embedding the full absolute path to the framework, we
should instead write a -framework Foo flag.
qmake seems to do this by specifying QMAKE_LIBS_FOO in the mkspec.
We'll try to get away with just deriving the name of the framework
from the path, to avoid having to introduce a mkspec equivalent
mapping for CMake.
This doesn't currently handle framework include paths, which qmake
also handled by harcoding QMAKE_INCDIR_FOO in the mkspec, and then
sysrootifying it via mkspecs/common/mac/sdk.prf.
Hopefully that's not really needed, given that -framework flag
should imply include paths as well.
Somewhat partially amends c254254c55
Task-number: QTBUG-85240
Task-number: QTBUG-84781
Change-Id: I70ea5021422d7b1f5afa9c4a595d1a9b8a8217d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We don't really know why, but using the ctest
--force-new-ctest-process flag stops the test from hanging.
Also re-enable the test.
Task-number: QTBUG-78449
Task-number: QTBUG-81365
Change-Id: I33094696dfe3f610dc257089074b1c2a9926f651
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Tests like tst_qmake need the build environment to be able to build
apps / libraries. This is mostly needed for MSVC.
Set the TESTS_ENV_PREFIX env var to point to the proper prefix.bat
(host or target) and use that when running ctest.
Task-number: QTBUG-85240
Task-number: QTBUG-78449
Task-number: QTBUG-81365
Change-Id: I6fa68714202ac7fc703973fc772e03b84790a043
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The QMAKE_CROSS_COMPILED define isn't used since 2011.
Change-Id: I9f03791e9f7c0ef439db5e65d930c0b7cb928974
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This test calls qmake on a project that generates a .qrc file. On
Windows, where debug_and_release is on by default, the generated qrc
file ends up in a "debug" or "release" subdirectory. On other
platforms the file is generated directly in the build dir.
To guess the right location, the preprocessor defines RELEASE_BUILD
and DEBUG_BUILD were passed to tst_qmake.cpp by the test's .pro file.
While the mapping from debug_and_release was fine for the .pro file,
it was commented out in the automatically converted CMakeLists.txt.
Instead of trying to fix the condition, we're going the easier route
that's used in all other .pro files of tst_qmake: make sure that
debug_and_release doesn't get in the way. In other tests this is done
by setting
DESTDIR = ./
which doesn't work for the generated qrc file. That's why we simply do
CONFIG -= debug_and_release
to make sure that everything is generated directly in the build dir.
Change-Id: I557ac4e21d7b385004d369fae8a3f727d76d4d88
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
angleTo() always gives an answer measured ccw, so between 0 and 360
degrees. The deprecated angle() would give either cw or ccw,
depending on which is smaller, so between 0 and 180 degrees.
Help users porting by showing a simple way to achieve the angle()
behavior in the deprecation message.
Change-Id: I66f77d2b4e688562e443428209737aa3332a448f
Pick-to: 5.15
Fixes: QTBUG-85087
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][QtGui][QImageReader] Introduced a settable allocation
limit on image loading to limit resource usage from corrupt image
files.
Change-Id: Ibed7b0cac32798125a060e6db80b17ebc5e70759
Task-number: QTBUG-85037
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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>