In Coin when provisioning for Android, we download and configure
the OpenSSL package, but don't actually build it. This means that
find_package(OpenSSL) can find the headers, but not the library,
and thus the package is marked as not found.
Previously the openssl_headers feature used the result of finding
the OpenSSL package, which led to it being disabled in the above
described Android case.
Introduce 2 new find scripts FindWrapOpenSSL and
FindWrapOpenSSLHeaders. FindWrapOpenSSLHeaders wraps FindOpenSSL,
and checks if the headers were found, regardless of the OpenSSL_FOUND
value, which can be used for implementing the openssl_headers feature.
FindWrapOpenSSL uses FindWrapOpenSSLHeaders, and simply wraps the
OpenSSL target if available.
The find scripts also have to set CMAKE_FIND_ROOT_PATH for Android.
Otherwise when someone passes in an OPENSSL_ROOT_DIR, its value will
always be prepended to the Android sysroot, causing the package not
to be found.
Adjust the mapping in helper.py to use the targets created by these
find scripts. This also replaces the openssl/nolink target.
Adjust the projects and tests to use the new target names.
Adjust the compile tests for dtls and oscp to use the
WrapOpenSSLHeaders target, so that the features can be enabled even
if the library is dlopen-ed (like on Android).
Task-number: QTBUG-83371
Change-Id: I738600e5aafef47a57e1db070be40116ca8ab995
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Previously the $$PWD was evaluated within the including .pro file,
which generated incorrect relative paths to source files.
Now we use a horrible hack to evaluate keys ending with SOURCES
and HEADERS. If such is a case, use a map_file transformer which
will use the included scope, thus creating correct relative paths.
Fixes projects in qtdeclarative like src/qmltypregistrar and qmllint.
Checked that it doesn't break projects in qtdeclarative and qtbase.
Change-Id: I21f1e4c638c2cf8d0f67e94e1a583ebc54c175a2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
They were no longer used anyway.
Change-Id: I565480cf39d2d8a27735afe56ac6537bc62fbd4a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Move QGraphicsView specific code into reimplementation of now virtual
(and const) canStartScrollingAt.
Remove unhelpful comment.
Change-Id: Ib4799e48ac4f85748c77c52d29511a0490303676
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- replace random access with ranged for
- replace foreach with ranged for
- add qAsConst where possible
- iterate directly over QMap, rather than the keys (address FIXME
comment)
- add some const to ensure that code has no side effects on
containers or indices used in different places
Change-Id: I6199fd6edd5e4426c6c7fee0ff64ec9421a64cd5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This caused false alarms in fuzzing tests.
The lifetime of the screen is the same as that of QMinimalIntegration.
But failure to call handleScreenRemoved() also causes a warning; so
as on "normal" platforms, the screen has to be separately allocated.
Change-Id: Iad0cc53b8d09687400ced28bc2353b7500b01110
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
In addition to .qmake.cache and .qmake.super we check for the
existence of CMakeCache.txt. The top-level non-prefix build part is
prospective, but seems plausible.
Without this fix, non-prefix qmake builds build libs etc. in the wrong
locations, i.e. not in a subdirectory of qtbase.
Change-Id: Ic88efa6c772d49ef92713fe640f004c8a5c849d3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This requires mostly making moc a bit more permissive, which has the
advantage that it also simplifies the code a little bit.
The newly added test case demonstrates how to connect such a property
with a change signal.
One test case needed to be changed regarding the callback as the
publicProperty member now has a (permanent) observer and therefore
re-assigning the binding will re-evaluate it as the value might have
changed.
Change-Id: Ia7edcec432de830bdd4e07d943c5d4550c175ca4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The previous approach didn't work for prefix builds. While a target
might be excluded from building via EXCLUDE_FROM_ALL property, when
calling make install it would still try to install the target and
thus fail.
It's not possible to modify an install() command in a post-processing
step, so we switch the semantics around.
pro2cmake will now write a
qt_exclude_tool_directories_from_default_target() call before adding
subdirectories. This will set an internal variable with a list
of the given subdirectories, which is checked by qt_add_executable.
If the current source dir matches one of the given subdirectories,
the EXCLUDE_FROM_ALL property is set both for the target and the
qt_install() command.
This should fix the failing Android prefix builds of qttools.
Amends 622894f96e
Change-Id: Ia19323a2ef72a3fb9cb752ad2d4f2742269d11c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
list(JOIN) removes a layer of escaping, which force doubling up
on the backslashes. Instead use string(REPLACE) thus making the
escaping a bit saner.
Change-Id: Ie3daf0112dd09fbcbaf8798552949470952611c9
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's required as a response to upgraded protocol and apparently some
servers would wait for it, not sending any frames. Becomes a problem
in case only one request was sent.
Fixes: QTBUG-83312
Change-Id: I90dc5c04095f0b78baa404466625d329dc4c6e21
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
On Android, check_language() reports that the languages are supported,
but enable_language fails afterwards.
On Linux it causes issues with the PCH. The PCH file might contain
a Clang pragma, even though the C++ compiler is GCC. Presumably due
to finding a Clang Objective-C compiler.
Change-Id: I1b4c54459772c089e7f6350872c87af52ad72a37
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The global variants of the manipulators have been deprecated in favor of
the ones in the Qt namespace. However, only one set was documented (the
deprecated ones).
Ensure documentation for both sets is generated, and link to the Qt::
manipulators in QTextStream documentation.
Fixes: QTBUG-82532
Change-Id: I430d15f6d9a34411d1d7265031249e600f6874ef
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
io/qfilesystemengine_unix.cpp:1420:9: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new]
if (futimens(fd, ts) == -1) {
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h:396:9: note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0
int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
^
io/qfilesystemengine_unix.cpp:1420:9: note: enclose 'futimens' in a __builtin_available check to silence this warning
if (futimens(fd, ts) == -1) {
^~~~~~~~
Change-Id: Ib52adf7b1ec4f1057d8cb260a00da509429cfaed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2f030c2cf3fe368be217c0e0b157e050d1c27afc)
We used to need to consult /etc/timezone for the zone name back when
Debian, up to Jessie, used a copy of the zoneinfo file as
/etc/localtime, instead of a symlink. Jessie's end of life is this
May, but Thiago reports that its gcc can't build Qt 5.14, so we may as
well remove this fall-back. Newer versions of Debian use a symlink.
We used to need to consult /etc/sysconfig/clock for this information
back when ancient Red Hat distros copied zoneinfo to /etc/localtime
instead of symlinking, but Thiago believes that's now ancient history.
So, again, remove this old fallback.
Change-Id: I73cb40b926186b311dac6f00fe8743d37a9dfce5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTzTimeZonePrivate::init() was coping with empty and then saving the
system ID if the ID it looked up was empty. Better to have its caller
ensure it's passed the system ID in place of empty. The system ID is
always non-empty, as it falls back to "UTC" if it would otherwise have
been empty.
Change-Id: I5c74e23f01ef578de0dc1f6d558e9c8c7e65ff53
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
configurejson2cmake handles the 'static' and 'shared' features now.
There's no need to special-case it anymore.
Change-Id: I956e9f46ebe022b1da862e986ec05f41e1e804e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Now that we have the 'shared' feature implemented we can easily port
the 'static' feature.
Change-Id: Ia9b54b68d532d73c3d62d12a86c9e8b83e7909c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
configurejson2cmake handles the 'rpath' feature now. There's no need
to special-case it anymore.
Change-Id: I9aa9c9acdeb586de09d8a8d269909f8acb02e40a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add -Wno-error=format-overflow. This is similar to what is done in
qt_common.prf, however we don't turn the warning off completely.
For now at least.
Change-Id: I93c20064759dea43309c3a17de4d733ede9ca2cb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Commit ae6f73e856 inserted a mutex around
the entire load_sys(). We had reasoed that deadlocks would only occur if
the object creation in instance() recursed into its own instance(),
which was already a bug. But we had forgotten that dlopen()/
LoadLibrary() executes initialization code from the module being loaded,
which could cause a recursion back into the same QPluginLoader or
QLibrary object. This recursion is benign because the module *is* loaded
and dlopen()/LoadLibrary() returns the same handle.
[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that
would happen if the plugin or library being loaded has load-time
initialization code (C++ global variables) that recursed back into the
same QLibrary or QPluginLoader object.
PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex
lock, so pluginState should be made an atomic variable. Once that is
done, we'll only need locking the mutex to update errorString (no
locking before loading).
Fixes: QTBUG-83207
Task-number: QTBUG-39642
Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Callers and definition were out of sync.
Change-Id: Icda26887cb64c61c7e373766f25559b0d450d112
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
We do not benefit from it (don't need Alt+Enter and such). Switching
to DXGI_MWA_NO_WINDOW_CHANGES is also in line with the qtbase/5.14
patch 1430b29 that does the same for ANGLE.
Change-Id: Ie6384aeb2e97130ff439f761a7c166086f04526c
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When a class has multiple QProperty members to implement functionality,
it is common to have functions in the class that react to changes. For
example to emit a compatibility signal, in case of Qt Quick to mark the
scene graph as dirty, etc. etc.
To faciliate this use-case, this patch adds an internal
QPropertyMemberChangeHandler template that allows connecting a QProperty
field to a member function callback.
At the moment that callback is still 3 * sizeof(pointer). This could in
theory be reduced to 2 by eliminating the back-pointer (prev) as the
observer lives as long as the property. That however belongs into maybe
a future patch.
In order to get a pointer back to the surrounding object that holds the
QProperty as well as provides the callback function, the property system
was changed to pass through the address of the QProperty member at
run-time, and at compile time the delta from the QProperty member to the
beginning of the surrounding class is calculated. Through subtraction we
obtain the pointer to the owning object.
Change-Id: Ia2976357053f474ff44d0d6f60527c3b8e1f613a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We don't need the test, we can just check the value of BUILD_WITH_PCH
to know whether the feature is enabled.
Regenerate configure.cmake files.
Change-Id: I5691a22af2913bc398f99825e0c41cf2daf5a587
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
std::function does not have deduction guides in older libc++ (presumably older
than version 10). Omitting the template parameter isn't essential for the test,
so just give it.
Change-Id: Ia9bb91f961b0928203737ec976913effd06433e0
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
A special restriction of threads on WebAssembly is
that you should not block the main thread, also not
to wait for worker threads.
For example, blocking the main thread may prevent the
browser from starting a new web worker to service the
pthread the main thread is waiting for.
We may be able create an abstraction to support use
cases like this (most likely using emscripten asyncify),
but for disable use of threads to avoid deadlocking.
Change-Id: I35edd5e1bb465e2549fa7cc4288b47dcd2e4244b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Use QTRY_COMPARE in the flaky tests instead of waiting.
Change-Id: Ic18fc5fde3fa47f3b3ef21e6acd876bd6990981d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 0ae6803d39)
All remaining pieces are gone, configuration included.
Relevant CMakeLists and configure.cmake were regenerated.
Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Starting with CMake 3.18, there is PCH support for darwin multi-arch
builds, like iOS simulator_and_device builds.
Also enable PCH for Objective-C++ files when the support is there.
To enable PCH for Objective-C++, we need to do enable the OBJCXX
language as well, but conditionally, because on non-darwin platforms
the language is probably not available.
Introduce the qt_enable_cmake_languages() macro which is called
automatically by qt_build_repo_begin().
Change-Id: I0e7f44be6577ac54ce940470036626409920e272
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The name of the option may cause confusion due to the fact
that it's not _fully_ anchoring the match, only anchoring it
at the offset passed to match() -- in other words, it's a
"left" anchoring. Deprecate the old name and introduce
a new one that should explain the situation better.
[ChangeLog][QtCore][QRegularExpression] The AnchoredMatchOption
match option has been deprecated in favor of
AnchorAtOffsetMatchOption, which should better describe
that the match is only anchored at the offset.
Change-Id: Ib751e5e488f2d0309a2da6496378247dfa4648de
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Show and activate the widget, otherwise we can't rely on geometry
and gesture event delivery. Use QTRY_ macros in a few more places.
As a drive-by, fix coding style.
Change-Id: If3a13732ae6b07a137fec89e78b7e6b39e066bed
Fixes: QTBUG-82947
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>