Commit Graph

44505 Commits

Author SHA1 Message Date
Alexandru Croitor
28fff4a551 CMake: Fix handling of QML_IMPORT_VERSION in pro2cmake
Change-Id: Iaab6796204a6bb13b3d061d2589b2aebd4f342a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-09 23:09:07 +01:00
Alexandru Croitor
1253a02dc0 CMake: Regenerate configure.cmake files to get reports
Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-09 23:09:02 +01:00
Alexandru Croitor
95e1469eb8 CMake: Port most of the configure summary support
Teaches configurejson2cmake about summaries / reports, so things
like enabled features, configure sections, notes, etc.

Add relevant CMake API for adding summary sections and entries,
as well as configure reports. The commands record the passed data,
and the data is later evaluated when the summary needs to be printed.
This is needed, to ensure that all features are evaluated by the
time the summary is printed.

Some report and summary entries are not generated if they mention a
feature that is explicitly exclduded by configurejson2cmake's feature
mapping dictionary. This is to prevent CMake from failing at configure
time when trying to evaluate an unknown feature. We should re-enable
these in the future.

A few custom report types are skipped by configurejson2cmake (like
values of qmake CONFIG or buildParts).
These will have to be addressed a case-by-case basis if still needed.

Change-Id: I95d74ce34734d347681905f15a781f64b5bd5edc
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-09 23:08:57 +01:00
Leander Beernaert
a64f4b4052 Simplify OpenGL and OpenGL ES2 library tests in Gui's configure.json
Change OpenGL and OpenGL ES2 library tests to just include the header
file in the test header code. This mimics what the OpenGL ES3 library
tests does.

Change-Id: Ic63879ea100bc66cf58ffd660e89c5803c6e29e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-09 09:57:58 +01:00
Alexandru Croitor
627351f561 CMake: Set minimum deployment target for darwin platforms
Same value as QMAKE_IOS_DEPLOYMENT_TARGET in
mkspecs/macx-ios-clang/qmake.conf, etc.

Change-Id: I1f6a07d73c2126d0286e8d26f7e61a690607c8ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-06 17:12:40 +01:00
Vitaly Fanaskov
344eb0d29d QFlatMap: explicitly include <vector>
Without this include, it fails to compile the following line on some
systems: "std::vector<bool> done(s)", because only a forward declaration
is available.

Change-Id: I6eac4b7f69dda16e181043eb707f970b21b2dfef
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-06 15:29:30 +01:00
Joerg Bornemann
6cca46ee60 Remove trivial overrides from QProcess
Change-Id: I630fc44213fdc380c8b00e159989d5067bb2a185
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-03-06 13:38:39 +01:00
Joerg Bornemann
3dbfded87e Merge QProcess::startDetached(QString, QStringList, ...) overloads
Change-Id: Ic74f78c2bdf9acf0f91df3151e82cf2bf2602c1d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-06 13:38:38 +01:00
Joerg Bornemann
d0911d0a92 CMake: Port the 'separate_debug_info' feature
For this, we have to uninline the separate_debug_info configure test,
because supporting the conversion of this in configurejson2cmake is not
worth the hassle.

Separate debug information can be turned on for a target by calling the
function qt_enable_separate_debug_info. For Qt's shared libraries and
tools separate debug information is generated if the
'separate_debug_info' feature is manually turned on.

Change-Id: Ic2ffc15efef3794dc0aa42f3d853ef6d651a751c
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 13:38:37 +01:00
Joerg Bornemann
a3d0ef019a CMake: Fix condition of the 'debug' feature
For the moment, in feature conditions that use STREQUAL, the lhs must be
a variable.

Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 13:38:13 +01:00
Leander Beernaert
b4f19e4277 CMake: Remove special case handling for OpenSSL
Now that we can generate the library config tests which verify the
OpenSSL version, we no longer need these special cases.

Change-Id: I8ddccf4ae1c698db9fac391976b3b4b670712582
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 12:32:58 +01:00
Leander Beernaert
8ffb9053ad Handle configure.json library tests
This patch updates configurejson2cmake.py to generate compile tests for
library entries. The test also support the inherit keyword, which is
currently limited to one level of inheritance.

LibraryMapping has been extended with a test_library_overwrite as a
means to overwrite the mapped library during a compile test. Certain
tests such as openssl_headers form src/network are mapped with *_nolink
libraries which do not exist when the test is run. Failing to do so will
cause the test to run as it is skipped when the library target isn't
found.

To avoid redundant checks, the library tests need to be opt in by
setting run_library_test to True on an instance of LibraryMapping.

Change-Id: I607b24eda389fa67afad301c616e31bb7ab38d20
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 12:32:48 +01:00
Eskil Abrahamsen Blomfeldt
8bdbb7f226 Enabler: Store more properties of application fonts
The family name of a font is ambiguous and without additional
information there is no way to separate one font from another
inside that family.

In order to make it possible to expose more info about application
fonts from FontLoader in Qt Quick, we need to store them in the font
database.

Task-number: QTBUG-68829
Change-Id: I931e1c2c004437ac0a21d4d88e55d176de676f34
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-06 08:27:36 +01:00
Alexandru Croitor
a9caec4a92 CMake: Fix Ninja Multi-Config framework builds
Depends on a new bleeding edge feature in as-of-yet unreleased
CMake 3.18, that allows building macOS frameworks using the
Ninja Multi-Config generator targeting more than
one configuration.

It uses the new CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG
property which tells CMake to create properly named debug artifacts
in the Multi-Config ninja file.

Without it, both debug and release artifacts would have the same
location (no _debug) postfix, so it would be unclear which file
ends up being compiled as last (the debug or release variant).

Change-Id: I3e10832551731a18317da8f9667d96cec3dc3028
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-06 00:31:25 +01:00
Allan Sandfeld Jensen
eb09b7aa75 Initial cleanup of qevent.h for Qt6
Takes care of the first round of todos and deprecations for Qt6 in
qevent.

Not touching anything that might interfere with changing the class
hierarchy as the file also suggest.

Change-Id: If72d63d8932f1af588785bf77b34532358639a63
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-03-05 21:49:18 +01:00
Leander Beernaert
73301b252a CMake: Depend on automoc timestamp for metatypes extraction
When using CMake 3.17 with any of the Ninja generators we can leverage
a dependency on the timestamp file produced by CMake's automoc to avoid
having a custom target run on every build.

Change-Id: Ia70d2730cc8296d0a43642655fe69b555cb393c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 16:14:35 +01:00
Leander Beernaert
fda03bfed0 CMake: Convert Core_qobject to a static module
This removes the last add_custom_target when used in conjunction with
the Ninja and CMake >= 3.17.

Change-Id: Ibb9bdff4b5bc00542d2a5ba631cea7e0510ad5e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 16:14:19 +01:00
Leander Beernaert
98fb632f47 Add QT_MODULE_SKIP_MODULE_INCLUDES property
When a Qt module has this property set, when we generate the
QtModuleDepends header file and find this module it will not be added.
This is required to be able to create a Core_qobject module, as it does
not have any headers.

Change-Id: Iaea1080919d05ace12e48693e02d8c0f4c669339
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 16:14:15 +01:00
Shawn Rutledge
af00402d64 Remove QImageIOHandler::name()
It has been marked obsolete for a very long time, and deprecated
in code since f9e6f8efda.

Change-Id: Ib351025369584bf3b8a3a17f980a567d2b9556ca
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-03-05 16:09:40 +01:00
Lars Knoll
d1882c79f2 Get rid of some QT_STRICT_ITERATORS leftover
Amends 06456873fc.

Fixes: QTBUG-82611
Change-Id: I8b1e01549f3e910b85a571833237e38a7c2b49a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-05 16:08:30 +01:00
Alexandru Croitor
4f7cc72298 CMake: Handle conditions in third party find modules correctly
Previously the FindWrap modules checked for hardcoded features
when deciding whether to use a bundled library or not. This proved
not to work correctly because features were not available when
the find modules were processed.

Introduce a new CMake API call that needs to be manually called
after an add_subdirectory call which declares a bundled library.

The call will check for the existence of the bundled target, and will
then set a cache variable QT_USE_BUNDLED_Bundled<TargetName>.

The same variable is written into a FindWrapFooConfigExtra.cmake file
which will be loaded by the appropriate FindWrap module. The module
can that use that variable to decided whether to link against the
bundled library or the system library.

Change-Id: I75e9a4f4e14d88d4490916a79ad12f1ce57891e0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-05 16:08:14 +01:00
Mårten Nordheim
a2305f9430 CMake: fix typo
gerate -> generate

Change-Id: I948a3bdb4f56584a9ab02f27760fec5989d528ce
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 13:25:06 +01:00
Marc Mutz
bd84e8d63e QHash/QMap: don't return const from value(), key()
... it breaks move semantics.

We can change these, since they're templates and a short survey shows
that no-one in Qt was crazy enough to inherit an exported class from
QHash or QMap.

Otherwise this would be BiC on MSVC, which encodes the return type.

There's also no safety benefit here, as none of the overloads returns
by reference, so users cannot expect map.value(key).mutate() to have
an effect on the element in the container.

In this, key() and value() differ from op[], which also returns const,
but whose overload returns a reference. op[] is therefore not proposed
here.

[ChangeLog][QtCore][QHash/QMultiHash/QMap/QMultiMap] The value() and
key() member functions now return T (was: const T), enabling move
semantics on their return values.

Change-Id: I0e5f53f9834caad458e3bde27f1daacbb4bac71b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 13:24:32 +01:00
Sona Kurazyan
dfaca09e85 Add support for attaching continuations to QFuture
Added QFuture::then() methods to allow chaining multiple asynchronous
computations.

Continuations can use the following execution policies:

* QtFuture::Launch::Sync - the continuation will be launched in the same
thread in which the parent has been executing.

* QtFuture::Launch::Async - the continuation will be launched in a new
thread.

* QtFuture::Launch::Inherit - the continuation will inherit the launch
policy of the parent, or its thread pool (if it was using a custom one).

* Additionally then() also accepts a custom QThreadPool* instance.

Note, that if the parent future gets canceled, its continuation(s) will
be also canceled.

If the parent throws an exception, it will be propagated to the
continuation's future, unless it is caught inside the continuation
(if it has a QFuture arg).

Some example usages:

 QFuture<int> future = ...;
 future.then([](int res1){ ... }).then([](int res2){ ... })...

 QFuture<int> future = ...;
 future.then([](QFuture<int> fut1){ /* do something with fut1 */ })...

In the examples above all continuations will run in the same thread as
future.

 QFuture<int> future = ...;
 future.then(QtFuture::Launch::Async, [](int res1){ ... })
       .then([](int res2){ ... })..

In this example the continuations will run in a new thread (but on the
same one).

 QThreadPool pool;
 QFuture<int> future = ...;
 future.then(&pool, [](int res1){ ... })
       .then([](int res2){ ... })..

In this example the continuations will run in the given thread pool.

[ChangeLog][QtCore] Added support for attaching continuations to QFuture.

Task-number: QTBUG-81587
Change-Id: I5b2e176694f7ae8ce00404aca725e9a170818955
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-05 13:24:32 +01:00
Joerg Bornemann
1057d568bb configurejson2cmake: Fix non-inline compile tests
If there's no test dir set, use "config.tests" as default value, and
perform the check for the existence of CMakeLists.txt in
configurejson2cmake, not the configure.cmake file.

Change-Id: I8d3be8f2b68767c7592665c374022353c2dc6c57
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:20 +01:00
Joerg Bornemann
343865201a configurejson2cmake: Fix compile tests without a "test" entry
Set the default value of the "test" entry to the test's name like the
qmake-based configure does.

Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:16 +01:00
Joerg Bornemann
b99321b78b CMake: Port the 'force_debug_info' feature
This feature is read-only and is ON if CMAKE_BUILD_TYPE is RelWithDebInfo
or if that value is in CMAKE_CONFIGURATION_TYPES.
It mainly exists for the qmake support.

Change-Id: I25cb57e832dcfcab100834a104b1a3d34f01086b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:11 +01:00
Joerg Bornemann
46a2366d12 CMake: Port the 'debug_and_release' feature
This feature is read-only. It's controlled by the multi-config feature
of CMake. It mainly exists for the qmake support.

Change-Id: I322459598fe92568eda4d42319ded444537e95d4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:06 +01:00
Joerg Bornemann
20410cdc11 CMake: Port the 'shared' feature
This feature is read-only and supposed to be set by BUILD_SHARED_LIBS.
It mainly exists for the qmake support.

Change-Id: I722b0de53211d0aab1924e45a77120c890f31f50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:01 +01:00
Joerg Bornemann
becbd07f55 CMake: Port the 'debug' feature
This feature is read-only and supposed to be set by variables like
CMAKE_BUILD_TYPE. It mainly exists for the qmake support.

Change-Id: Ic7e32cbda0f3c2d92dd446b07a3bf1a8d85ec3b9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:47:56 +01:00
Lars Knoll
a0ffdf765e Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-04 19:10:37 +00:00
Mårten Nordheim
d57adfe5f3 QtConcurrent: filter- and map-reduce with initial value
It takes any type which is implictly covertible to the result type
and then converts it in the outer-layers. Then it passes it into the
deeper layers and initiales the result value.

One drive-by fix with a missing letter in the documentation.

[ChangeLog][QtConcurrent] QtConcurrent::mappedReduce and
QtConcurrent::filteredReduced, as well as their blocking variants,
now optionally take an initial value.

Fixes: QTBUG-73240
Change-Id: I7a80d96693cfa3374847c75c75b3167664609c1a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 17:40:45 +01:00
Alexandru Croitor
d50b22e75d CMake: Remove incorrect hardcoded harfbuzz condition
The non-system harfbuzz feature doesn't actually have a condition
in the json file.

Change-Id: I4b74915f28da97d6ef8f89690e91306d243913ee
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 16:16:27 +00:00
Alexandru Croitor
aa5e43d491 CMake: Adapt to latest upstream Ninja Multi-Config changes
Most of the NMC-specific variables were renamed to be more general.

Change-Id: I8ee2874fecb9e57480ce51db9183c6cf3dd100af
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 17:16:24 +01:00
Fabian Kosmale
aa6c560a74 Revert "Remove flagBits from QMatrix4x4"
This reverts commit 5ebb03c476.

Reason for revert: Removing flagBits breaks the batchrenderer in declarative, which accesses them via QMatrix4x4_Accessor. If flagBits are still going to be removed, we need to first find a solution for the renderer.

Change-Id: Ib0a3fc7a327926f2245058c0e2ed30e8789aa75d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-03-04 15:54:38 +00:00
Friedemann Kleint
09f3272814 QTypeRevision: Fix warnings about max macro from windows.h
Similar to def272750c, put parentheses
around std::numeric_limits<Integer>::max, fixing:

qversionnumber.h(339): warning C4003: not enough arguments for function-like macro invocation 'max'

Change-Id: Id574f3a08973cf1408e015f155c8e658b04bd170
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-04 16:31:13 +01:00
Friedemann Kleint
649d7abcd2 Update uic's class lib map to reflect QtOpenGLWidgets
Task-number: QTBUG-74409
Change-Id: I5de957156c3120422f5c8f2e702e198f9f6cc43d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-03-04 15:31:13 +00:00
Lars Schmertmann
5ee1dac8d6 Finally remove splash.xml to fix a lint warning
Unused resources
----------------
src/android/java/res/layout/splash.xml:2:
The resource R.layout.splash appears to be unused

Fixes: QTBUG-72976
Change-Id: I8f23438503d21f3279e0577a9caac745810fffc3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-03-04 16:31:13 +01:00
Joerg Bornemann
1a30a82830 CMake: Fix stack-protector-strong test and feature
And in order to do this we must teach qt_config_compile_test a
COMPILE_OPTIONS argument.

Change-Id: I66fa45142b544e3a2fc599af1c1a4c69b442b318
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-04 16:31:13 +01:00
Lars Knoll
2a4b957789 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
2020-03-04 14:39:18 +00:00
Eskil Abrahamsen Blomfeldt
fb2f42b604 Update to Harfbuzz 2.6.4
Quite a big change since it has been several years since
the last update. This drops the Harfbuzz source on top
of the existing code in Qt, and does the following
additional changes:

1. Deletes old source files that have been removed upstream
(everything named foo-private.hh is now renamed to just
foo.hh for instance).

2. Added a header guard to config.h because it may be
double-included.

3. Implement a memory barrier needed by hb-atomic.hh.

4. Changed the signature of hb_atomic_int_impl_add()
to take a pointer to match new upstream.

5. Updated .pro file to include new files and removed
old.

6. Updated qt_attribution.json

7. No longer disable deprecated APIs since
hb_ot_tags_from_script() is now deprecated and is used
from Qt code.

8. Updated and applied the patch in patches/ for CoreText.

9. Updated tst_qtextscriptengine::thaiWithZWJ() according to
changes in Harfbuzz and disabled it for system-harfbuzz,
since this may be an older version of harfbuzz depending on
the system.

Fixes: QTBUG-79606
Change-Id: I3f057a43ff44ee416628b75ef12fb1a221f31910
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-04 08:28:04 +01:00
Eskil Abrahamsen Blomfeldt
4724dfff62 Remove references to QTextDocumentPrivate from public API
The private object of QTextDocument has been exposed through
public APIs marked internal, which we should avoid as much as
possible, since it clutters the headers.

For accessing private data without adding friends, we have
a nice pattern of adding a static get() function to the
private class itself.

Fixes: QTBUG-55059
Change-Id: I03e949a677e03487e95f24e3608a06aa0a3511ab
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-04 08:28:04 +01:00
Eskil Abrahamsen Blomfeldt
5f1afeacf6 Android: Increase minimum API level to Android-23 / Android 6
There are certain APIs we need which cannot be used without this,
and in general it simplifies some code.

[ChangeLog][Android] Minimum Android version is now Android 6.0,
API level 23.

Change-Id: I72ca3b429bf48969e16e2bc6b99d9c4af993ea77
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-04 08:28:04 +01:00
Tor Arne Vestbø
048f0a00fa macOS: Don't create QMacCGContext when printing
We adopt the context of the print session, so the code is not needed,
and would just produce a warning since QMacCGContext didn't know what
to do about the printer paint device.

Change-Id: I9ac079f5cb5d98022045632592d0e375710eecc3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 01:30:11 +01:00
Tor Arne Vestbø
5d9d3ff326 macOS: Reduce save dialog extension filters to their last component
NSSavePanel does not deal well with multi-part extensions, to the point
where it will fail to open if that's the only acceptable extension.

We follow Chromium's lead here and reduce the extension to its last
component, which enables selecting and saving files such as 'foo.tar.gz'.

To improve the user experience we always show file extensions when we
detect a multi-part extension. This makes it clearer what the final
extension will be, and avoids confusing macOS about the intention of
the user when choosing a file that without the final extension also
matches another known extension.

Fixes: QTBUG-38303
Fixes: QTBUG-44227
Change-Id: Id0cee84f758c2cd59fcf1b339caa30f7da07dd1e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 00:29:54 +00:00
Thiago Macieira
1edf586ed7 QMimeXMLProvider: fix another issue with -no-mimetype-database
The compiler must emit the destructor for the members of a class in an
inline constructor, in case the constructor throws. This won't work in
Qt 5.15 due to QList requiring knowing whether QMimeMagicRuleMatcher is
trivial or not. Another solution would be to use QVector.

Fixes: QTBUG-82547
Change-Id: Ia8b65350cd5d49debca9fffd15f79db872ed7c0c
Reviewed-by: David Faure <david.faure@kdab.com>
2020-03-03 11:44:27 -08:00
Ivan Čukić
14420b359b Add operator-> to the key-value iterator for QHash and QMap
This patch adds the arrow operator to the stl-like key-value
iterator (QKeyValueIterator) for QMap and QHash.

This allows using normal member access syntax it->first and it->second
instead of having to use (*it).first and (*it).second.

[ChangeLog][QtCore][Containers] Added operator-> to the key-value
iterator for QHash/QMap.

Change-Id: I9cfa6480784ebce147fcfbf37fec5ad0080e2899
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-03-03 20:25:19 +01:00
Joerg Bornemann
065ace2bca Generate separate debug info for Qt tools too
If Qt was configured with -separate-debug-info, Qt's tools should be
separated from their debug information too.

Fixes: QTBUG-56482
Change-Id: Ief0130db1787b767496d0052716183fe773460bf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-03-03 20:08:56 +01:00
Volker Hilsheimer
b4669b9190 QMenu: hide when a QWidgetAction fires the trigged signal
QMenu hides regularly when the user interacts with it, and manages
the firing of signals based on that. It ignores if a QAction that is
added to it fires the triggered() signal programmatically.

With QWidgetActions added to the menu, the menu usually doesn't get
interacted with directly, as the widget gets the input events.
Since the action can be added to multiple menus, neither widget nor
action can interact with the menus programmatically. Instead, the
menu needs to hide when the widget action triggers.

Test included that covers the case where a QWidgetAction is added
to multiple menus that are visible. Documentation updated, and
removed a redudant paragraph as a drive-by change.

[ChangeLog][QtWidgets][QMenu] a popup menu hides when a QWidgetAction
added to it fires the triggered signal.

Change-Id: I69f378426a45c2e46cebdaa5e6f1b21c8fb03633
Fixes: QTBUG-10427
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-03-03 18:52:11 +01:00
Alex Trotsenko
23785face5 QEventDispatcherWin32: unregister event notifiers on close
When QEventDispatcherWin32::closingDown() is called,
threadData->eventDispatcher is already nullptr and the application
will no longer process the events.

Thus, just as it works for socket notifiers and timers, it makes sense
to disable all active event notifiers at this point. Otherwise, it
seems possible that an object in signalled state can provoke a data
race in the notifier's callback on 'edp' pointer, if
QWin32EventDispatcher destructor is running simultaneously.

Task-number: QTBUG-64152
Task-number: QTBUG-70214
Change-Id: I6e77f3eeca1b0ea639021e73b86798cba0200ebf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-03 19:44:01 +02:00