Commit Graph

57704 Commits

Author SHA1 Message Date
Thiago Macieira
f514ed7d76 QProcess/docs: add more information about environment variables
Fixes: QTBUG-42500
Pick-to: 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd170a6a56977ef8b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-08-22 14:37:26 -07:00
Volker Hilsheimer
5afb04d79b Mac: close popups opened on inactive application on relevant user action
On macOS, users can right-click into an inactive application to open a
context menu without activating the application. Qt handles a number of
events to close open popups (window deactivating or a mouse press
outside the popup), but none of those will get called when the
application is already inactive. So the popup might stay open (and on
top of the window stack) when the user clicks into other applications,
or activates another window.

To fix this we need to watch for events outside of the Qt application on
which we need to close the popup: when the user presses a mouse button,
or activates another application using Cmd-Tab. But we don't want to
monitor for key events, as that requires user permission. Use a global
event monitor to watch for mouse presses, and an notification observer
to watch for application activations, and respond by closing all popups
(and removing the monitor and observer again).

Use the monitor as well to watch for mouse moves, and pass only those
events through the Qt event system so that mouse tracking in the menu
works even if the application is inactive. This change brings back a
version of the global event monitor we had in Qt 5.15.

However, a press into our own menu will trigger the activation observer
after the application became active, which would now close the menu. We
don't want that, so we also need to remove the observer when the
application becomes active (which makes sense anyway, as we will get
regular events from then on).

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-105474
Change-Id: I18573fcda09a46c27730bd670a795f4d467aab01
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-22 20:10:13 +02:00
Volker Hilsheimer
03144190df Mac: close popups when the user clicks into the menubar
Otherwise it is possible to have a context menu and a menu from the
menu bar open at the same time. Native applications close the context
menu, but also block the click into the title bar. This change only
closes popups, the click goes through to the menubar.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-105474
Change-Id: I664c00eea83ba8fb43cc8a630d787f2d2b5b96ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-08-22 20:10:11 +02:00
Ilya Fedin
cf6ab64f03 Move PreselectFirstFileInDirectory theme hint from QGtk3Theme to QGnomeTheme
It doesn't use any gtk API, so can live in QGnomeTheme

Pick-to: 6.4
Change-Id: Iff0391de6f01a03981f6e45b04fe9824fd2becfc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-08-22 09:20:04 +04:00
André de la Rocha
62d957f6aa Windows QPA: fix tree item discovery through UI Automation
This change reverts a workaround for a compatibility issue with
a Windows utility, which is no longer necessary with Qt6 and was
in some cases preventing accessibility tools from discovering
tree items.

This reverts commit 1c55a6caf1.

Fixes: QTBUG-105814
Pick-to: 6.4 6.3 6.2
Change-Id: Id464da49704b6953affca2fa40acc03f1ffd05ac
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-08-22 02:43:13 +02:00
Tor Arne Vestbø
1ecfc4101c tst_qgraphicswidget: Avoid redeclaration of Size from MacTypes.h
If an included header brings in MacTypes.h it will cause issues,
so rename the enum to be on the safe side.

Pick-to: 6.4 6.3 6.2
Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-21 14:40:38 +02:00
Tor Arne Vestbø
3053df3366 Add some more logging to QFontDatabase
Change-Id: I5ac289cb7cb0beb842c403683681a739c44b26a1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-08-21 14:40:38 +02:00
Yuhang Zhao
c519372dbf QSystemLibrary: Replace 0 with nullptr
Use modern C++ more.

Change-Id: I8ba2a6e95187976b7e4077bb39f05eab04a8575f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 19:04:51 +08:00
Marc Mutz
c51c4aa2c5 [docs] QAnyStringView: mention automatic U8→L1 reclassification
...for US-ASCII literals.

Amends eaabd0c545.

Pick-to: 6.4
Task-number: QTBUG-101014
Change-Id: Id0acccb9bf2dfb01bca93f62da634e8dfe299fbc
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:31:00 +02:00
Marc Mutz
f8c23116bb Fix int/qsizetype mismatches in data url support
More int/qsizetype mismatches.

Task-number: QTBUG-103525
Pick-to: 6.4 6.3 6.2
Change-Id: I30723b6f59fa62dd7096110458305da7573ad345
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:30:11 +02:00
Marc Mutz
35cbf52f0c Port QDir to qsizetype [1/3]: indexed to ranged loops
Indexed for loops are prone to int/qsizetype mismatches, so use ranged
for loops where possible.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: Ia3e97a6b2924f92d3f7fb1a7ae075b59188006e9
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:54 +02:00
Marc Mutz
f06c41e729 QDir: fix non-idiomatic indexed loop counting
Counting backwards from two may be clever, and less to type, but it
raised this code reader's eyebrows, so use the formulation everyone
understands instead.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I9416539e552e78e4777a744405b0773a9df1f6d0
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-08-21 08:29:47 +02:00
Marc Mutz
4906b43b00 QCoreGlobalData: remove
Inline the data members into the only remaining user (qdir.cpp) and
remove the class.

As a drive-by, fix the non-idiomatic use of QT_BUILD_CORE_LIB to mean
!QT_BOOTSTRAPPED and apply the guard consistently to the declaration,
too.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-105747
Change-Id: If2c780dd96e2a2e331cabdc42fd920874e7737b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-21 08:29:37 +02:00
Marc Mutz
48c5780d5f qdir.cpp: remove unused qresource.h
Probably amends f369be93a1.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-105747
Change-Id: I6b6d9c7d1193bdc1ec470f7d8c57b433ccee8e75
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:29 +02:00
Marc Mutz
eef0013086 QDirPrivate: pass input QList by cref
Unlike the mutable lvalue reference that was previously used to pass
it suggested, the input is never modified, so pass by const reference.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I5659fe5eab4a8953cd36134735e9e8fd9601f530
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:23 +02:00
Marc Mutz
84277dda00 QDir: replace an indexed loop with all_of()
Replaces ten LOC with int/qsizetype mismatches with two LOC with no
ints in sight.

For reviewers that don't know std::all_of: it's range conjunction aka
universal quantifier, which means it returns true for the empty set.

Task-number: QTBUG-103525
Pick-to: 6.4 6.3 6.2
Change-Id: I2423102631a66996b1faff7297c7fc365f0ffb12
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:17 +02:00
Marc Mutz
d8561b1dea QDebug: finish porting to qsizetype/size_t
Port two variables from int/uint to qsizetype/size_t. These don't
cause problems, because their possible ranges are limited, however,
int/uint variables are a code smell these days, so replace them
nonetheless.

[ChangeLog][QtCore][QDebug] Fixed issues on 64-bit platforms when
streaming containers (incl. strings) of more than 2Gi elements.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: Ica6c5a6a062990306280fb713c47adb2053b752d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:11 +02:00
Marc Mutz
db44800627 QContiguousCache: fix streaming into QDebug when indices are > INT_MAX
As usual, int/qsizetype mismatch.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: Ic5d9fb4fd42e4534ec0358ca7c4d79650c6ac919
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:29:04 +02:00
Marc Mutz
bc2b8411c9 QDebug: finish porting put{String,ByteArray} to qsizetype
The underlying QTextStream seems to support qsizetype-sized data and
the private API of QDebug that is under consideration in this patch
takes size_t, but, as so often, there're int/uint casts in-between
that break things.

Widen the int/uint casts to qsizetype/size_t, respectively.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I10bca093dc2d6f136871c94ca43f5b42fd1c8971
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:28:59 +02:00
Marc Mutz
a888239cf1 QDebug: port putEscapedString() from int to size_t
All callers of the function pass size_t values, so remove the
impedance mismatch and preserve the value.

Adjust local variable runLength to qsizetype, because with this change
the int variable may now overflow, which would cause infinite looping.

Adjust callers to not perform narrowing conversions.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I2a9d3301118855fc95245a55bf64de6c46fa2f51
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:28:51 +02:00
Marc Mutz
bcc32bc112 Port QtDebugUtils::toPrintable() to qint64/qsizetype
Some callers pass qint64 arguments to the len parameter, so take the
size as qint64, not qsizetype, to avoid silent truncation.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I4bc5673297f24aea0cfc9d20887dc8a877743214
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-21 08:28:44 +02:00
Marc Mutz
52c5f28695 QBuffer: optimize setData(ptr, n)
The old code always created a new QByteArray, always allocating
memory.

The new call assigns the data to the existing QByteArray, enabling
potential re-use of the internal QByteArray's buffer. Since QByteArray
is missing the STL-style assign() function, abuse replace() for this
task.

Change-Id: I357f11bad0a976d4d0fb2faeb93f8b2262fa5a65
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-08-20 21:22:53 +02:00
Marc Mutz
817e47fbcd QBuffer: fix the setData() API re: int/qsizetype
The setData(ptr, n) overload was still taking the size as int.

Widen it.

Task-number: QTBUG-103525
Change-Id: If1d6d6404d62bbae5e0defea9a2115648c1fd5da
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-08-20 21:22:29 +02:00
Volker Hilsheimer
3be99799a6 Don't access QObjectPrivate::declarativeData unguarded
The QObjectPrivate::declarativeData member is stored in a union with
currentChildBeingDeleted. The QObject destructor always sets the
currentChildBeingDeleted member of the union. It also sets the
isDeletingChildren bool, which is the only way to find out which union
member we can safely access.

While the QObject destructor is deleting children and isDeletingChildren
is set, we must not access the declarativeData member of the union.

Add a test case that initializes the function pointers for the
declarative handlers and constructs a situation where an object
emits a signal while it is destroying children.

Fixes: QTBUG-105286
Pick-to: 6.4 6.3 6.3.2 6.2 5.15
Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-20 03:55:12 +02:00
Mikolaj Boc
503018ae07 Do not invalidate the entire window on window move on WASM
The invalidate on window move is redundant - the previous texture can
be reused for the window. Just request another refresh on the compositor
and don't update the window texture. Makes window moves smoother.

Pick-to: 6.4
Change-Id: Ied2922a000d3c8e6143e64d029154d74bc4f3480
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-20 02:51:34 +02:00
Mikolaj Boc
2a23652bbb Avoid image format conversion when drawing window nonclient area
This radically speeds up window resizing and dragging.

Fixes: QTBUG-105709
Pick-to: 6.4
Change-Id: I844601a5b139d21024db0c373482af18f350d0eb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-20 01:16:41 +02:00
Alexey Edelev
f3f0d646b9 Add possibility to store source files for interface targets
Add source files to the _qt_internal_target_sources property, when
running qt_internal_extend_target on interface libraries instead of
ignoring sources for CMake versions that don't support non-interface
properties. The property is not full-functional, but still allows to
execute internal routines on target sources.

Also add qt_internal_get_target_sources_property function that helps
to destinguish which property stores target sources.

Task-number: QTBUG-103196
Change-Id: I435c558090a24a7988f1a1c49f924dc195e72480
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-19 23:53:11 +02:00
Alexey Edelev
a2809d9ec1 Fix Multi-ABI builds when CMAKE_<C/CXX>_COMPILER_LAUNCHER contains list
Add list-escaping for CMAKE_<C/CXX>_COMPILER_LAUNCHER variables when
passing them to an external ABI-specific Android project.

Amends c7231177df

Pick-to: 6.3 6.4
Change-Id: I0c98eee6594c395dc6a37465a99ea32b1af39b84
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-19 23:53:11 +02:00
Mårten Nordheim
50f8a9578d QSslServer: Re-enable read notifications when a client times out
Otherwise new clients will not be handled when they try to connect

Amends 29a1fe72a0

Pick-to: 6.4
Change-Id: Ifff052d1bf27682df2782faa285a257c9b41d86f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-19 23:53:11 +02:00
Ivan Solovev
2625a3a01a Add -disable-deprecated-up-to parameter to configure script
And also teach CMake to treat it properly instead of hardcoding the
version number.

[ChangeLog][Build System] The configure script now accepts a new
parameter -disable-deprecated-up-to which is used to remove all
deprecated code from API and ABI while building the libraries.
The version number must be specified in a hex format.
For example, it can be used like this:
 /path/to/qt/configure -disable-deprecated-up-to 0x060500
to remove all code deprecated in Qt 6.5.0 or earlier releases.

Task-number: QTBUG-101510
Change-Id: I557cf83e29b867fa1052bb097985e144b5eaf34d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-19 23:52:05 +02:00
Ivan Solovev
18f0484a0e Rename QT_DEPRECATED_WARNINGS_SINCE -> QT_WARN_DEPRECATED_UP_TO
The new name describes the behavior in a better way.

[ChangeLog][Build System] The QT_DEPRECATED_WARNINGS_SINCE macro is
renamed to QT_WARN_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the
new name is not defined.

Fixes: QTBUG-104944
Change-Id: I320c033010dfab120db6922598454f95169657f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-19 23:52:05 +02:00
Ivan Solovev
3226c82740 Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO
The new name describes the behavior in a better way.

[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.

Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 23:52:05 +02:00
Edward Welbourne
b9baa42b62 Break out overflow-calculations into semantically-named inlines
Adding days to seconds or millis, or seconds to millis, involves
scaling one and adding the other, so has to check for overflow. The
std::integral_constant boilerplate and the complications of calling
mul_overflow() and add_overflow() rather hid what was going on, so
package them in inlines so that their calls are more intelligible.

Change-Id: I1e90de8fcb81eb84920868c7e4bd217ee353fc54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-19 14:29:22 +02:00
Sona Kurazyan
acb2faf1fe qcompilerdetection.h: modernize the check for exception support
Use C++98's __cpp_exceptions to check if exceptions are enabled by gcc
and clang. Q_CC_GNU is always defined when Q_CC_CLANG is, so simplify
the condition and check only for Q_CC_GNU.

Change-Id: I1e15643ded9684f9e4e6eba1be9479665b526766
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 14:19:38 +02:00
Sona Kurazyan
d773fbe0dc Move warning suppression macros from qglobal.h to qcompilerdetection.h
Task-number: QTBUG-99313
Change-Id: I54f1c48591b448a7b697720018e565a8c865a18b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-19 14:19:28 +02:00
Sona Kurazyan
c201c5aedf Extract header qtclasshelpermacros.h
Move the class helper macros from qglobal.h and Q_DECLARE_SHARED from
qtypeinfo.h there.

Task-number: QTBUG-99313
Change-Id: I8c8b6241a76916176a48c09fbaf4effc87683770
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2022-08-19 14:19:24 +02:00
Tor Arne Vestbø
23ecaf897f Don't assume that QtFontFamily::ensurePopulated() will populate
The WASM platform populates a family asynchronously, so we can't
assume that a family will be populated straight after calling
ensurePopulated().

By adding a bool return to the function we can teach all the call
sites to behave as if the font family does not exist yet if the
font was not populated.

The WASM platform will then invalidate the font database when the
populated font's data comes in asynchronously, and then be ready
for another call to ensurePopulated, which this time will succeed
to populate the family.

Change-Id: I4e0e6211c10e5c1123beebd77aca28ac82ba7186
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
2022-08-19 14:04:28 +02:00
Tor Arne Vestbø
a8b49216d0 freetype: Propagate font data from font database to engine if available
QFreeTypeFontDatabase allows registering fonts either by filename,
ending up with FT_New_Face, or via raw data, resulting in a
FT_New_Memory_Face. We then register the font with QFontDatabase
using a custom FontFile handle, where store the filename.

When then getting a callback to QFreeTypeFontDatabase::fontEngine
we would pull out the filename from the handle and call
QFontEngineFT::create with this filename.

This meant that if a font was registered with raw data, the font
engine creation would only work if there was a corresponding valid
file name/path. The only reason this works for addApplicationFont
is that QFreetypeFace::getFace() has a hard-coded workaround for
:qmemoryfonts where it uses qt_fontdata_from_index to get at the
original data.

Luckily for us QFontEngineFT::create already takes a QByteArray
data argument, which is plumbed to QFreetypeFace::getFace as well,
so all we need to do is fix the first part of the plumbing by
adding the original data to the FontFile handle and passing it
on in QFreeTypeFontDatabase::fontEngine.

This would potentially allow us to remove the hard-coded logic
for qmemoryfonts, but this has not been further investigated.

QPlatformFontDatabase also has another fontEngine overload that
takes a QByteArray directly, but this code path is only used by
QRawFont for now. A future improvement would be to unify some
of this logic.

Finally, it's unclear why the FT font database uses a custom
FontFile as a handle, instead of the original FT_Face that was
already created in addTTFile(). As a result of the current
approach we end up creating the face both when registering it,
and when creating a font engine for it. Investigating this is
left for later.

Change-Id: I7e01820a82d2664e8f34c3553bdcebe6a7afa078
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-08-19 14:04:27 +02:00
Sona Kurazyan
4842cc1768 Remove qtnamespacemacros.h and use qtconfigmacros.h instead
Change-Id: Ibae6e6e255c1bb1ee52839a051d585de81833bf9
Pick-to: 6.4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-19 09:16:11 +02:00
Sona Kurazyan
0329792602 Extract header qexceptionhandling.h from qglobal.h
As a drive-by, remove the unused include for std::bad_alloc from
qglobal.cpp.

Task-number: QTBUG-99313
Change-Id: I4b26b4413e6fe7ac3b1e285d0db5b81b429a4713
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-08-19 09:15:39 +02:00
Sona Kurazyan
7d22847371 Move QT_NO_EXCEPTIONS define to qcompilerdetection.h
Task-number: QTBUG-99313
Change-Id: I952267f18fd7ed001162aba7589c0040dbb9560e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 09:15:35 +02:00
Thiago Macieira
73dbc1fdf6 QMetaObject: export the invokeImpl inner method
For other modules that wrap invokeMethod and equivalent, like
qtwebchannel.

Task-number: QTBUG-105596
Change-Id: Ic6547f8247454b47baa8fffd170bbca806b04d8f
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-19 00:09:10 -07:00
Mikolaj Boc
86bb62f2e7 Use popup() instead of exec() for file dialog's context menu
There are seemingly no differences in how the menu operates and this
fixes WASM without asyncify hanging on menu open attempts.

Fixes: QTBUG-104963
Change-Id: If4364f08acb75947e03ecced85d77af9af0498ba
Pick-to: 6.4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-19 07:07:49 +00:00
Michael Weghorn
0131dbd2f9 a11y atspi: Drop commented out "say hello to d-bus" code
This looks like a remnant of previous WIP code and was
added in commit 8e1ff45e74
("Add Linux Accessibility Bridge").

Change-Id: I8fab2c3554af101ed134715a4d4a494bdb01fc98
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-19 04:43:01 +02:00
Michael Weghorn
e6599bfa61 a11y atspi: Send correct D-Bus reply for GetAttributeValue
Only return a string for the attribute value
(an empty string if the attribute is not set).

The previous implementation was based on the incorrect
signature in the XML spec for the AT-SPI Text interface from
before the AT-SPI commit that removed the extra out params [1]:

    commit 8786849ce6e9914383aa766ff9ce7e00f5b2178d
    Author: Patryk Kaczmarek <patryk.k@samsung.com>
    Date:   Mon Sep 28 14:23:15 2015 +0200

        Fixed atspi_text_ functions

          * atspi_text_get_text_attribute_value
              Fixed dbus signature in _atspi_dbus_call function
              and add missing argument for string.

          * atspi_text_get_default_attributes
              Receiving return value by reference from hash table

        https://bugzilla.gnome.org/show_bug.cgi?id=755731

[1] 8786849ce6

Fixes: QTBUG-105752
Pick-to: 6.4
Change-Id: I66d3c484ecc4b469684635723242c915e4365e6a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-19 02:43:00 +00:00
Michael Weghorn
c2289ca582 a11y atspi: Add missing closing tag in introspection XML
Pick-to: 6.4
Change-Id: I4497353ef33a10b94141b24b9cda3fa7ee3e17b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-19 02:42:58 +00:00
Ilya Fedin
b5457082bb QGtk3Theme: Support setting dialog parent on Wayland
This adds support for setting parent window for GTK dialogs on Wayland
using the new API added for portals

Change-Id: I29085c926ce4338ff2ad75728d566ec843d3aa5a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-08-19 02:15:02 +04:00
Tatiana Borisova
6a3509baa2 Put code related to timezone functionality under QT_CONFIG(timezone)
Pick-to: 6.4 6.3
Change-Id: I0d1573dbb4ae4f9740fc19546950ae4316aa4c0c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-18 18:05:09 +00:00
Richard Moe Gustavsen
0250f9364f iOS: use NSProcessInfo to resolve timestamps in simulator builds
We currently build Qt for simulator using X86_64, even
on ARM based macs. This results in the simulator running
on ARM, while the app is running inside it using Rosetta.
And with this combination, the event.timestamp, which is
documented to be in seconds, looks to be something else, and
is not progressing in sync with a normal clock.

Sending out mouse events with a timestamp that doesn't follow
normal clock time will cause problems for mouse-, and pointer
handlers that uses them to e.g calculate the time between a
press and release, and to decide if the user is performing a tap
or a drag.

For that reason, we choose to ignore UIEvent.timestamp under
the mentioned condition, and instead rely on NSProcessInfo.
Note that if we force the whole simulator to use Rosetta
(and not only the Qt app), the timestamps will progress normally.

Fixes: QTBUG-105810
Pick-to: 6.4 6.3 6.2
Change-Id: Ib4e60593cac3230567ebc53d634f434fcefc98d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-18 19:53:21 +02:00
Assam Boudjelthia
78c8561658 Android: skip tst_qvulkan vulkan11() and vulkanWindowGrab()
This fails on Android 12 in CI.

Task-number: QTBUG-105739
Pick-to: 6.4 6.3 6.2
Change-Id: Ibf3deb6b84564f12b5172f2522875fe70f8ce87b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 10:52:14 +00:00