Commit Graph

53802 Commits

Author SHA1 Message Date
Michal Klocek
e2fc3246d2 Make QOffscreenX11PlatformNativeInterface a QX11Application
Make it possible to use new native interface QX11Application with
offscreen plugin in case of x11, which technically is
x11 application without xcb connection.

This change is motivated by use of new native interface
in webengine, where offscreen plugin is used for
some tests.

Pick-to: 6.2
Change-Id: Ic2ed5b39573062feaa1e8985962d5d9327b371d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-21 13:39:53 +02:00
Assam Boudjelthia
54576b3dd9 Android: set allowNativeHeapPointerTagging to false in the manifest
Android 11 enables pointer tagging by default on arm64 systems [1],
which can cause QML to get invalid data, which caused the color
issue (and most likely other issues).

[1] https://source.android.com/devices/tech/debug/tagged-pointers

Fixes: QTBUG-97009
Task-number: QTBUG-91150
Change-Id: Ic4f145bba3345b3bee5445685f03269e3785f514
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 9fa805f7f8dfe96d561e9ed3170770ad768baf93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-10-21 11:39:53 +00:00
Sona Kurazyan
49f34a402a Remove the unnecessary compile-time check for recursive QSet
It doesn't make sense to have a recursive QSet with deleted operator==,
since it's not possible to add elements to it. Consequently declaring a
metatype for it also doesn't make sense. Remove the commented
compile-time check for it.

Task-number: QTBUG-96257
Change-Id: I74ebefb38adcbe36d5c2f317188743e1f37fe16d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-21 12:58:05 +02:00
Timur Pocheptsov
4b282e0602 TLS plugin (OpenSSL): don't use the deprecated functions
If we have OPENSSL_NO_DEPRECATED_3_0 defined. This includes RSA, DSA,
EC and DH-related APIs. As of now, we only make sure the code still
compiles.

Pick-to: 6.2 5.15
Fixes: QTBUG-83733
Change-Id: Id455b851421ce0dcdfb0229fa515ba2b2ed690b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-21 12:58:05 +02:00
Allan Sandfeld Jensen
4748369eb2 Fix inconsistencies between advanceWidth and bounding rects
Unify the logic in QTextEngine

Ensure tightBoundingRect, and the FreeType boundingRect, calculates from
the shaped x offset when calculating the max x coordinate for a glyph.

Fixes: QTBUG-7768
Task-number: QTBUG-70184
Task-number: QTBUG-85936
Task-number: QTBUG-94023
Change-Id: I6daafb25c79158dc7e777529abb5e8d3a284dac0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-10-21 12:37:22 +02:00
Bartlomiej Moskal
6dd6342864 androidtestrunner: make sure that system-user is used
It happens on Android Automotive emulator, that output file is in other
directory.

According android spec [1]:
"If a default user isn't specified, each adb subcommand has a different
user. The best practice is to retrieve the user ID with am
get-current-user and then explicitly use --user <userId> for any
command that supports it."

That is the reason why output file can be found in
/data/user/USER_ID/PACKAGE_NAME directory.

Checking path related to current user was added as backup solution.

[1]https://source.android.com/devices/tech/admin/multi-user-testing

Pick-to: 6.2
Change-Id: Id7e6ddef74f4f20b7469a07bba6a71d3622c4e20
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-21 08:23:22 +00:00
Thiago Macieira
aa82d295c8 Move the ABI tag from minimum-linux.S to qlibraryinfo.cpp
We don't need the assembly file any more. According to a comment to
patchsets 2 in the Gerrit code review for commit
bb8a61866e, the section ended up as
SHT_PROGBITS instead of SHT_NOTE. I didn't know then that the section
type is not actually important, only whether it's present in the segment
pointed by a PT_NOTE is. That isn't recorded in the review.

Since we now depend on the linker properly placing the .note.* sections
for Qt plugins, we can rely on this working.

Change-Id: Icb2516126f674e7b8bb3fffd16ad659149e34a23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-21 00:55:48 -07:00
Thiago Macieira
7362b321e5 Doc: QByteArrayMatcher: add note that the pattern must remain on scope
This issue bit me. The API is surprising and very un-Qt-like...

Pick-to: 6.2
Change-Id: I2bbf422288924c198645fffd16aa1c58d921bd7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-21 07:55:48 +00:00
Thiago Macieira
a0d66b60b7 QFactoryLoader: continue the port from JSON to CBOR
This continues the effort from the previous commit, by not passing
through the JSON conversion at all, and simply using CBOR directly.

The port in qtbase is complete, but in order to support the conversion
in other modules without introducing breakages, there's a temporary
class used for converting to QPluginParsedMetaData from
QJsonObject. It'll be removed once all other modules have finished
converting.

Change-Id: I2de1b4dfacd443148279fffd16a3ed4ddaf34afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-20 22:04:03 -07:00
Thiago Macieira
2bea9b74ba QPlugin: keep the CBOR data as CBOR
Since QJsonValue and QCborValue use the same backend, we may as well use
the CBOR frontend classes, which means we avoid an unnecessary
conversion until later.

Change-Id: I2de1b4dfacd443148279fffd16a3e2f56cd74c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-20 22:04:01 -07:00
Alexey Edelev
3c493b89df Remove WIN32 and MACOSX_BUNDLE arguments when building Android binary
This fixes the regression introduced in Android multiabi changes.

Amends 0a02d84555

Task-number: QTBUG-88841
Change-Id: I09e129361eb760cdc14c2302e821ce4fcbf117c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-20 21:18:38 +02:00
Tor Arne Vestbø
4ea32eaad0 macOS: Wake up event dispatcher after running modal dialog helpers
The root event loop may have been exited, so we need to ensure the
event dispatcher is woken up so it can evaluate whether it should
continue or not. For most applications this happens automatically
when e.g. the user moves their mouse or press a key, but for tests
this may not be the case, and the test will stall and never exit
its event loop.

Pick-to: 6.2
Change-Id: Ic241e3f1045481c34150289ff711b921addb18e4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-10-20 21:17:08 +02:00
Tor Arne Vestbø
132ed5eb51 Centralize maybeLastWindowClosed checking in QWindow
Instead of plumbing QWidgetWindow close events via handleCloseEvent,
we just implement closeEvent directly. This allows QWindow do save
the state of the window/widget before the close event, so that we
know whether we should trigger lastWindowClosed handling, even if
the window was deleted as a result of the close event.

This also relieves QGuiApplication and QApplication from dealing
with the close logic in their notify functions, so that these
functions can focus on the propagation of events -- not how the
event is handled.

Change-Id: I8b586b53a53b1df1d8630c1acb635c60f191bb4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-20 21:17:08 +02:00
Volker Hilsheimer
a3c8518268 Make QMainWindow::restoreStateSizeChanged test less time sensitive
Amends 32edae5e26, which introduced a
timeout after which the restored state is discarded. If this timeout
hits during a CI run, then the test is expected to
fail.

Implement a lambda that watches for the restored state to disappear.

This happens primarily when restoring a fullscreen state, where some
desktop environments scroll in a new virtual desktop. It should not
happen for other data tags.

Change-Id: I5ff43a4e1857eca17a5d4fe2b47add1f70636e8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-10-20 18:05:15 +02:00
Mårten Nordheim
c58a3a4aae QDateTime: Limit string processing to known boundaries
We were treating the input as if it was always reasonably good.
Since we know the max boundaries anyway lets just stop processing
when those are reached

Fixes: QTBUG-97489
Change-Id: Ibb78d6d51ad58454b2007ab46d54116ca0be5448
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-20 15:16:53 +00:00
Mårten Nordheim
faa4cfcae9 SSL: Update documentation wrt backends
Mention the platform-specific backends and add a section on packaging

Pick-to: 6.2
Fixes: QTBUG-97532
Change-Id: Ice78e32e81a719ccf237625e542d620662d3073e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-20 15:16:53 +00:00
Mårten Nordheim
3c5c13c639 QNI: Windows: support transportMedium
Brings support for transportMedium to NetworkListManager
backend. Which, with this patch, also uses winrt API because
there is no equivalent API available in NLM.

This API is so much nicer than NLM...

Task-number: QTBUG-91023
Change-Id: I360a3a197caa2aa4848c8f768aea6a09a68b0ed5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-10-20 17:16:53 +02:00
Sona Kurazyan
a9d51298ae Fix metatype declaration for QHash/QMultiHash with no operator==
When declaring metatypes, the metatype system tries to detect if the
comparison operators for the given type exist and automatically register
them. In case of QHash, the equality operator was enabled if the value
type provides one. But the implementation needs equality operator of
the key type as well. As a result, when the key type has no equality
operator, the metatype system detects that the equality operator is
available for the QHash itself, but the compilation for metatype
registration fails when trying to instantiate the code that uses
equality operator for the key. This is fixed by enabling equality
operators for the QHash only when both the key and value types provide
one.

The same issue existed also for QMultiHash, with the difference, that
QMultiHash didn't have the constraints even on the value type. So added
checks for both.

Fixes: QTBUG-96256
Pick-to: 6.2
Change-Id: Ib8b6d365223f2b3515cbcb1843524cd6f867a6ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-20 17:16:53 +02:00
Ulf Hermann
a182897f77 Help the compiler avoid duplicate TLS lookups
Most compilers are clever enough to optimize this out. Yet, even with
optimizations disabled, we don't want to do two TLS lookups here.

Change-Id: I822954c7cec591084d6c27c916818dab7e000ea9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-20 17:14:38 +02:00
Ulf Hermann
c6bc549b6b Optimize QObjectCompatProperty::notify
Do the check for inBindingWrapper() last.

Change-Id: I3d589c9fba524f465e35cd4cc0e65e3af376b419
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-20 17:14:38 +02:00
Ievgenii Meshcheriakov
af2f88f5b6 QObjectCompatProperty: Add support for custom getters
Add additional template argument to QObjectCompatProperty to specify
a custom getter. This may be useful for classes like
QAbstractProxyModelPrivate the need to customize property getters.

Task-number: QTBUG-89655
Change-Id: I34fe4bdebbbf1446aff60bd20a946454607f52d5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-20 17:04:51 +02:00
Karsten Heimrich
bb8d84c358 Make QDir::mkpath() return true when given an existing root path
On macOs with APFS mkdir sets errno to EISDIR, so take the error code
into account.

Pick-to: 6.2
Fixes: QTBUG-97110
Change-Id: I8e7d10c95430a2802bdbfbf94dd65219bd9071a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-20 15:04:51 +00:00
Karsten Heimrich
71652ad4bf Make QDir::mkpath() return true when given an existing drive name
Commit ed48391c59 removed the check for
ERROR_ACCESS_DENIED reported by the Windows CreateDirectory(...)
function in case an existing windows drive name was passed as argument.
This restores the behavior of the function which broke after 5.15.

Pick-to: 6.2
Fixes: QTBUG-85997
Change-Id: Ie86188100766f7364acee57b15a250f4a2720b9f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2021-10-20 15:04:51 +00:00
Tatiana Borisova
57ec47921e Compile Private API autotests for INTEGRITY
- GHS's __PRETTY_FUNCTION__ (used by QT as Q_FUNC_INFO) doesn't have spaces
  round the = operator when indicating the type of the template parameter.

 The compilation error:
 qt5/qtbase/src/corelib/kernel/qmetatype.h", line 2104: note #3316-D:
 cannot access position 53 in array of 49 elements
 constexpr const char *begin = func + prefix;
                                             ^
   detected during:
     instantiation of
     "auto QtPrivate::typenameHelper<T>() [with T=void]" at
       line 2186


Task-number: QTBUG-97087
Pick-to: 6.2
Change-Id: I33e61f5d54a61944a5aecf07d149a8dee0ef1e5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-20 15:04:51 +00:00
Alexey Edelev
3f4082c0e8 Add missing LIBRARY DESTINATION for examples
Pick-to: 6.2
Fixes: QTBUG-97629
Change-Id: I5b32824693206926de9b4ee6637749a1814fdde7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-20 17:04:51 +02:00
Friedemann Kleint
5074679cfc uic: Fix missing Python import when setting tab orders
Add QWidget as default import so that QWidget.setTabOrder() is found.

Pick-to: 6.2
Change-Id: I7593008d1395e3fddacf7124d271a0eaf4c345d9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-10-20 11:34:03 +02:00
Alexandru Croitor
87215c70c0 CMake: Fix rpath-link dependencies when cross-compiling
Private Qt module dependencies of a Qt module are recorded
in the IMPORTED_LINK_DEPENDENT_LIBRARIES property of a Qt module.
This property is used to compute the runtime dependency dir path
to be passed to the linker via the -rpath-link option.

If the referenced target does not exist in the scope where it's
used, no -rpath-link will be generated (or at least that specific
dir path won't be passed).
The linking operation will either fail saying the library is not found,
or a different version of the library might be silently picked up in
the sysroot or other implicit lib dir.

Make sure that QtFooModuleDependencies.cmake calls find_package() for
all Qt module private dependencies (or other Qt provided 3rd party
libs in the Qt6:: namespace) so that the targets are in scope and
IMPORTED_LINK_DEPENDENT_LIBRARIES does its job.

qmake also records the INTERFACE_LINK_LIBRARIES of a private Qt module
as the runtime dependencies of the module.
It's not clear why it does that. A private Qt module is an
INTERFACE_LIBRARY so it shouldn't add any new runtime dependencies.

Nevertheless, the find_package part of that has been recently addressed
in 2b6500cd15 for a different reason.

This change is basically the CMake equivalent of
326b91ea78

Pick-to: 6.2
Fixes: QTBUG-86533
Change-Id: Iaf514a14acaded4e8752149cca0c159a271be188
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-10-20 11:24:03 +02:00
Thiago Macieira
9153458731 RHI: use the flags we've just calculated
Caught by clang 13 detecting we set a variable but never used it.

Change-Id: I8c6a0ff3ec184205a544fffd16af3d52b6f172a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-19 13:13:14 -07:00
Alexander Volkov
056e807bb1 Fix correspondence between QFileDialog::Option and QFileDialogOption::FileDialogOptions
It was broken by fe4a5a27e0.

Pick-to: 6.2
Change-Id: I77da7ec9cdedc80a72b7f11980950a8bebfdaf3b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-19 20:13:14 +00:00
Thiago Macieira
edfb0922ea QtGui & its plugins: remove set-but-unused variables
Found by clang 13:

qfontsubset.cpp:1211:10: warning: variable 'sumAdvances' set but not used [-Wunused-but-set-variable]

Change-Id: Iea05060bc2c046928536fffd16adf500fb9bc8e5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-19 13:13:14 -07:00
Thiago Macieira
9ecf72704d MySQL: only set the charset if the connection has succeeded
No point otherwise. But do it before trying to select the database, in
case the database name has non-US-ASCII characters.

Task-number: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf036367b07bb
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-10-19 07:55:55 -07:00
Thiago Macieira
11f5c07c1b MySQL: fix the check for the return value of mysql_set_character_set()
It returns zero on success and non-zero on failure.

Fixes: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf0177aadb082
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-10-19 07:55:53 -07:00
Christian Strømme
aad24f6033 Rhi: Document expectation for setGraphicsPipeline's pipeline argument
The backed expect the pipeline to be valid, so document it and
assert if the set pipeline is a null pointer.

Pick-to: 6.2
Change-Id: I72b3d0d11b8dc98240d17e13adf2b6ccbd71891d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-19 09:01:19 +00:00
Ulf Hermann
2e81e445f2 Disable copy and move for QPropertyObserverNodeProtector
It's not intended to be copied or moved and static analysis complains.

Change-Id: I2ac2eccadb66ea572cf297f16af693b15553a1b9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-19 10:53:52 +02:00
Antti Määttä
378ff29b29 Don't render widget to backing store if its parent has graphics effect
If widget parent has graphics effect, it can't render directly to the
backing store, because the backing store needs to be updated from the
parents effect drawing instead of the widget drawing.

Pick-to: 6.2 5.15
Fixes: QTBUG-96240
Change-Id: Ib9b55547f9e5538f32837ec9df45d29fa68d7c1b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-19 07:28:47 +03:00
Thiago Macieira
8662fbdd7e RHI: suppress annoying warning about deprecated copy constructors
With clang 13:

vk_mem_alloc.h:4360:22: warning: definition of implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
vk_mem_alloc.h:4391:9: note: in implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' first required here

Repeats ad nauseam

Change-Id: Iea05060bc2c046928536fffd16adf5181ede7abe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-18 14:58:58 -07:00
Thiago Macieira
b64d720b28 QPluginLoader: use constexpr variables for detecting debug plugins
For MSVC it's clear that the plugin and Qt must match, since they would
be linking to different runtime assemblies otherwise. For all other
systems, including MinGW on Windows, there's no such thing.

But we insist on MinGW debug-and-release builds matching.

Change-Id: I3eb1bd30e0124f89a052fffd16a6aa52c7f8b9c0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-18 14:58:58 -07:00
Ulf Hermann
57d08f6c09 Inline a few methods of QPropertyObserverPointer
This is necessary to optimize QObjectCompatProperty::notify in a second
step.

Change-Id: I89aaf51d39e04f17285f7db27f9b40d145fd846d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-18 20:53:25 +02:00
Antti Määttä
9f763a5f3f Allow negative delta for designer animation driver
The designer animation driver needs the ability to drive the animation
both forwards and backwards.

Pick-to: 6.2 6.2.1
Task-number: QDS-4910
Change-Id: Ie2b1855d062bb254b28b216328cb618d90ee8454
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-18 20:40:26 +03:00
Tor Arne Vestbø
acb86da793 Prevent recursive calls to QWindow::close
QWidget will call close() in its destructor, which we might end up
in if a user deletes the widget in the closeEvent.

Pick-to: 6.2
Change-Id: I39684aec0ca130033dad60f2bbf823364a5edcec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-18 19:06:48 +02:00
Ievgenii Meshcheriakov
826fc8c9bd Update UCD to Revision 28
This corresponds to Unicode version 14.0.0.

Added the following scripts:

    * CyproMinoan
    * OldUyghur
    * Tangsa
    * Toto
    * Vithkuqi

Full support of these scripts requires harfbuzz version 3.0.0,
this version adds support for Unicode 14.0:

    https://github.com/harfbuzz/harfbuzz/releases/tag/3.0.0

With this release 10 test cases in tst_qurluts46 were fixed, one
additional test case is failing in tst_qtextboundaryfinder and
is commented out. In total 62 line break test cases and 44 word
break test cases are failing.

A comment in src/corelib/text/qt_attribution.json was updated to
include the URL of the page containing UCD version number.

Fixes: QTBUG-94359
Change-Id: Iefc9ff13f3df279f91cbdb1246d56f75b20ecb35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-18 16:45:10 +00:00
Topi Reinio
439f6c9576 coin: Add instructions to generate docs during testing
A single configuration provides qdoc and qtattributionsscanner via
provisioning. The environment variables instruct QDoc to run in
testing mode; it ignores linking warnings (since we don't have .index
files for external documentation modules) and terminates with non-zero
exit code if documentation warnings exceed the limit set in the
documentation config.

The provisioned binaries are portable, packaged together with their
dependencies. As they are installed under /opt, the instructions
create symlinks to the binaries in the install directory before
building the 'generate_docs' target.

Pick-to: 6.2
Task-number: QTBUG-78069
Fixes: QTBUG-95554
Change-Id: I4a4765250247e2fc6eddd153c36cf8126ddd10ae
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-18 16:23:13 +00:00
Ulf Hermann
bcf3f63d52 QProperty: Eliminate further unnecessary TLS operations
If we don't have a binding, we don't need to remove it. We can figure
this out without TLS lookup.

Pick-to: 6.2
Change-Id: I0cb20f2a68a119df7742631e307002e3813eac03
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-18 18:23:13 +02:00
Ulf Hermann
80c17af940 QProperty: Don't needlessly calculate inBindingWrapper()
If there is no binding data, we don't need it. inBindingWrapper()
involves a TLS lookup.

Pick-to: 6.2
Change-Id: I829f314d708b80821e907124eef4aec758bbbc6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-18 18:23:13 +02:00
Tor Arne Vestbø
44b7a1a37b Don't hide dialogs before closing them
When a dialog was accepted or rejected via done(), we used to only hide
it, but as of 0246bfd40a we now close it.

Closing a widget results in hiding it as part of handleClose, so we
do not need to explicitly hide it before calling close(). In fact
doing so prevents the lastWindowClosed logic from checking whether
the window was visible before handling the close event, which is
documented to be a requirement for a window triggering lastWindowClosed.

We still need to hide the widget in case we don't end up closing it
ourselves, to ensure QDialog::closeEvent accepts the close. The reason
for the code in closeEvent seems a bit dubious, but that's left for
future adventures.

Change-Id: Ic32b965d495c08996c3a199bbee798df0206216c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-18 15:29:09 +02:00
Tor Arne Vestbø
df359bcb70 Decouple quitOnLastWindowClosed from quitLockEnabled
In a512e210ac5b032c5fc2edf1ddf72e5a414485fda512e21 quitOnLastWindowClosed
was changed to be implemented in terms of quitLockEnabled, but without
any documentation to that end.

Although the two features are similar (automatic quit under certain
conditions), and interact, it doesn't make sense to overlap them until
we actually expose them as a single property (automaticQuit e.g.)

The logic for determining whether we can can quit automatically has
been refactored to take both properties into account, on both a Core
and Gui level. The call sites still need to check the individual
properties to determine whether to activate automatic quit for
that particular code path.

Change-Id: I38c3e8cb30db373ea73dd45f150e5048c0db2f4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-18 15:29:09 +02:00
Tor Arne Vestbø
55f8f916ce Fix indentation in inputMethodQuery implementations
Change-Id: I406194e084f62f16d432eae63845bcc3da148ac0
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-18 15:29:09 +02:00
Sona Kurazyan
8a8bf1b84e Fix docs for comparison/debug/data stream operators of Qt containers
Because of the constraints on comparison, debug and data stream
operators, the return types for them look weird in docs. Conditionally
use the actual return types, in case if Q_CLANG_QDOC is defined.

Also add the docs of debug stream operators for types for which they
were misssing.

Task-number: QTBUG-97247
Pick-to: 6.2
Change-Id: I57f2c52bd3af805c7eeebb602c47de1e95ee09bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-18 13:42:07 +02:00
Jonas Kvinge
2f2fdc418d sqldrivers: Fix typo in error message
Pick-to: 5.15 6.2
Change-Id: I6354275d04ee9474d4baeaaf0b14a52aca3dd70c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-18 13:42:06 +02:00
David Skoland
723a2c34a5 Make sure Qt::Popup is treated like a dialog
According to the documentation, Qt::Popup should have a proper frame
with a title bar. To honor this, two functions had to be
slightly altered.

Change-Id: I4bbc18e6b7fbec5702fad6e22ef2226c09dea15a
Fixes: QTBUG-94768
Pick-to: 5.15 6.2
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-10-18 13:42:06 +02:00