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>
QtConcurrent::blocking*() methods are using the ExceptionStore directly,
which is not thread safe. In case if there's an exception thrown from
multiple threads there may be a race condition. Added a lock to avoid
that.
Change-Id: I5de9928f91f5f43951b9bf9c4594694dc0ca0328
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Address FIXME comment.
The class is not public, and only used in QtWidgets for the resizing of
docking widgets. The move functionality is unused, and has been
removed.
Change-Id: Id477f36cb7d449b06e124950fed6f5f182aa5721
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
To avoid livelocks, posted events should be delivered when all pending
messages have been processed, and the thread's message queue becomes
empty. Although the logic of the previous patch is correct, it turned
out that determining the moment when the message queue is really empty
is not so simple. It is worth noting that the GetQueueStatus function
sometimes reports unexpected results due to internal filtering and
processing. Indeed, Windows docs say that "the return value from
GetQueueStatus should be considered only a hint as to whether
GetMessage or PeekMessage should be called". Thus, we cannot rely on
GetQueueStatus in unambiguous logic inside the qt_GetMessageHook.
To solve the problem, this patch introduces a guard timer which
guarantees low priority processing for posted events in foreign loop.
The wakeUps flag reset logic has also been changed to provide clearer
synchronization of the Qt internal loop.
Fixes: QTBUG-82701
Fixes: QTBUG-83151
Change-Id: I33d5001a40d2a4879ef4eb878c09bc1c0616e289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
I had originally developed ae6f73e856 in
5.13, where this code for Android didn't exist. I didn't notice the use
of pHnd there when I merged up for the push.
Change-Id: Ibdc95e9af7bd456a94ecfffd160208dfaa596d95
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
DeleteLaterWidget is a main application window of the test. So, its
show() function should be called explicitly before starting the main
event loop. Otherwise, it remains hidden for the whole time, which
causes an incorrect emission of QApplication::lastWindowClosed signal
when a dialog window is closed in the middle of the test.
Also, fix synchronization between deferred deletion and timer event.
Change-Id: Id3ce5adbcd9e5e22508825c52025eeea70202354
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most of them are hand-written.
Change-Id: Ia3d83cdc9e279420c9b4700993b428e10cf8fb22
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Some library entries in configure.json have a test entry.
An example is assimp in qtquick3d.
qmake tries to find the library via the sources section, and then tries
to compile the test found in config.tests/assimp/assimp.pro while
automagically passing it the include and link flags it found for assimp.
We didn't handle that in CMake, and now we kind of do.
configurejson2cmake will now create a corresponding
qt_config_compile_test call where it will pass a list of packages and
libraries to find and link against.
pro2cmake will in turn generate new code for the standalone
config.test project. This code will iterate over packages that need to
be found (like WrapAssimp) and then link against a list of passed-in
targets.
In this way the config.test/assimp/main.cpp file can successfully
use assimp code (due to propagated include headers).
qt_config_compile_test is augmented to take a new PACKAGES argument,
with an example as follows
PACKAGES PACKAGE Foo 6 COMPONENTS Bar
PACKAGE Baz REQUIRED
The arguments will be parsed and passed to the try_compile project,
to call find_package() on them.
We also need to pass the C/C++ standard values to the try_compile
project, as well as other try_compile specific flags, like the
toolchain, as given by qt_get_platform_try_compile_vars().
Change-Id: I4a3f76c75309c70c78e580b80114b33870b2cf79
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
As per the FIXME comment. These functions are not called by Qt, so no
reason to have them virtual.
As a drive-by, remove redundant virtual keyword from overrides.
[ChangeLog][QtGui][QValidator] QIntValidator::setRange and
QDoubleValidator::setRange are no longer declared as virtual.
Change-Id: I640646fb18ed50554e384ed67ac85b3f408ea8cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
After 99ace38d22, all plugin files are
included automatically, not only the ones ending in Plugin.cmake.
Thus the extra inclusion done by the QmlConfigExtras file should only
be done if strict mode is set.
Amends 99ace38d22
Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4
Task-number: QTBUG-83282
Change-Id: I416cbad6c4788d605a9a74f21062543c9c98e968
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
./configure […] --device-option EMSCRIPTEN_ASYNCIFY=1
Set QT_HAVE_EMSCRIPTEN_ASYNCIFY as a feature flag,
enable optimizations for asyncified debug builds.
Change-Id: I81c887a411780e328aed48ec09ff6b9277c3bccf
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
On emsdk 13.9.x WASM_OBJECTS_FILES is always on,
and BINARYEN_TRAP_MODE is not needed
Change-Id: Id1da1db0278e131f95045bc0902f5cc4c22c1522
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The no-thread build is not maintaining the
QThreadData refcount.
Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The target may not be defined which causes error:
get_target_property() called with non-existent target "qtwaylandscanner".
Change-Id: I58a9122456ccbbbb8fc9f0adce3b7ddcc985e6a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Python helpfully uses a sensible locale when stdout is a tty but uses
the system (not the filesystem) default encoding, which may be ascii
and unable to encode some of the data we need to save. So brute force
kludge it to ensure emit.encoding is UTF-8 when writing the output
we'll read as UTF-8 anyway.
(This matches dev's commit 0ef79d94f6
for the reworked version of the script.)
Task-number: QTBUG-79902
Change-Id: I60ddc896a308c06e01fa87e8e18e112faa17d601
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
It was causing all lines after the first, in each calendar's
locale_data[], to be over-indented. This only changes spacing.
Change-Id: Ibfc4986548eecbfdba2902cc18f44a2af669bc6d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>