Commit Graph

53917 Commits

Author SHA1 Message Date
Richard Moe Gustavsen
8ba3a2f911 Revert "Code style fix"
This reverts commit e1d7df5ce9.

The offending patch removed handling of page-up and page-down
shortcuts in QScrollView (including subclasses like QTextBrowser).

Pick-to: 6.2
Fixes: QTBUG-97908
Fixes: QTBUG-90352
Change-Id: If760e983a082edb53e12e1311e2c7f2676d80bb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-11-02 13:00:43 +01:00
Alexandru Croitor
f04dbdfc97 CMake: Don't create targets if dependencies are not found
If one of the dependencies in QtFooModuleDependencies.cmake is not
found, QtFoo_FOUND will be set to False by find_dependency.

In that case, we should not create imported targets that belong to
that package.
It would be misleading for projects that do target existence checks
instead of package_FOUND checks as well as generally being
incorrect. The created imported targets might be referencing other
targets that would not exist.

Pick-to: 6.2
Fixes: QTBUG-97896
Change-Id: I09198aa3f19be047b27c29329b6e62c30fa09dc0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-11-02 11:51:26 +01:00
Morten Johan Sørvig
25781a1396 wasm: add sse2 compiler flags again
Now with QT_FOR_CONFIG += core-private.

Change-Id: Iadc61e21db6566f20c32595ef1ab83f37bc5c651
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-02 09:00:23 +00:00
Yuhang Zhao
2526df506b Remove pre-Win10 code paths in QtBase
Mostly a removal of dynamically loaded API.
They should all exist on Windows 10 1809
(Qt6's minimum supported version).

accessibility parts left untouched to make
sure MinGW still compiles.

Task-number: QTBUG-84432
Pick-to: 6.2
Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-11-02 13:55:15 +08:00
Volker Hilsheimer
35ddf34988 Add QMenu::menuInAction as a static helper
QAction::menu is deprecated, as it makes QAction (a QtGui class) depend
on QtWidgets. The template hack works, but shouldn't become a permanent
solution and is already deprecated.

To get the QMenu out of a QAction that contains it, add a static helper
to QMenu instead. QAction continues to store the menu pointer so that
we don't have to use a dynamic property or an associative container in
QMenu.

Change-Id: Ieb6a2b1900d2fc2f16dd5a4a8ab7da98604642d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-01 23:22:55 +01:00
Joerg Bornemann
6ab16d52d2 configure: Remove unused facility to define variable assignments
The function qt_commandline_assignment and everything related to it is
removed from configure.  It was only used in qtbase, and all usage has
been removed.

More general variable assignments will be added in a subsequent commit.

Task-number: QTBUG-88210
Change-Id: I7cfa782e89914f2b0dc0277c46e425c8a825557e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 22:32:01 +01:00
Thiago Macieira
a9d8794cf0 QCollator: add public, static functions to do comparisons
Collation with the default QCollator object (no numeric, punctuation or
case sensitivity changes) is a common-place occurrence, so add two
functions to do this work.

It's also what QString::localeAwareCompare() calls.

The test ends up testing that default, static collator updates after the
default QLocale changes too.

Task-number: QTBUG-95050
Change-Id: I7e0b82c2d2fe464082d8fffd1696ac77f32840b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-01 22:30:23 +02:00
Edward Welbourne
25d807f629 Correct qcollator_posix.cpp's check against system locale
The check was made against the default locale but the code calls the
system functions (wcscoll, wcsxfrm, wcscmp) for locale-specific
collation, so should be comparing to the system locale's collation
locale (i.e. LC_COLLATE). Also correct the Android-only check in
tst_QCollator::compare() which duplicated the check but neglected the
C locale, which is also supported (via QString::compare).

Pick-to: 6.2
Change-Id: I48c3237dd6825e2070272ab88d95bdb8cbb9fc37
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-01 22:30:23 +02:00
Thiago Macieira
48856934ec 3rdparty: update TinyCBOR links to 0.6.0 final release
No code change.

Pick-to: 6.2
Change-Id: Ice04365c72984d07a64dfffd16b28c74ee1c07eb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-01 13:30:23 -07:00
Joerg Bornemann
1bc41f7a7e configure: Remove declaration of the DBUS_[HOST_]PATH variables
These variable were used in Qt5 to specify the install location of the
DBus library.  In Qt6, pkg-config and the usual CMake mechanisms are
used.

Change-Id: Ic3d61d50c1051200c12bac861dc1fbfe0cb8a4a1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 21:01:07 +01:00
Joerg Bornemann
eb6fc1cab9 configure: Remove declaration of the MYSQL_PATH variable
This variable was used in Qt5 to specify the install location of the
MySQL library.  In Qt6, MYSQL_INCLUDE_DIRS and MySQL_LIBRARIES serve
this purpose, and MYSQL_PATH is unused.

Change-Id: I2df12b79777af50c719a5b6bc5feadc2c59c0c3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 21:01:07 +01:00
Joerg Bornemann
ce34ed6eab configure: Remove declaration of the OPENSSL_PATH variable
This variable was used in Qt5 to specify the install location of the
OpenSSL library.  In Qt6, OPENSSL_ROOT_DIR serves this purpose, and
OPENSSL_PATH is unused.

Change-Id: I40cc412bb35666dac3dd134ca8bfb67f3d524f80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 21:01:07 +01:00
Lars Knoll
28138aa80a Fix show()/hide() for child windows on xcb
Change e946e6895a implements proper
support for ICCM 4.1.4 window state handling. One issue it addressed
is that a show() after a hide() needs to be delayed until the window
manager/X-server has processed the previous event.

This was handled with a deferred task list to send the map/unmap
events. According to ICCM, we should wait for the _NET_WM_STATE
notification before processing the deferred events.

But this is only true for top level windows, as child windows are
not handled by the window manager and will never receive any
_NET_WM_STATE notifications. For those, we should use the unmap
notify event, which means that the X-server has processed the unmap
and handle deferred events once that notification has been received.

This fixes an issue in Qt Multimedia, where QVideoWidget would not
show the video anymore after a minimize of the player or when making
the QVideoWidget fullscreen. This is because QVideoWidget uses an
embedded QWindow to render video using HW acceleration.

Fixes: QTBUG-97257
Pick-to: 6.2 5.15
Change-Id: I5c47eba3276a1f243bdafd5346f353c7843403bb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-01 20:28:13 +01:00
Yuhang Zhao
2962e27441 qtbase: remove last piece of DwmIsCompositionEnabled
DWM composition is always enabled and can't be
disabled since Windows 8 [1].

As a drive-by, remove an old workaround for MSVC 2012,
which is not supported by Qt6.

[1] https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmiscompositionenabled

Change-Id: I2ec055d794c91d69c141dca7cec80beb9468628c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-11-02 03:15:17 +08:00
Oliver Eftevaag
859f2ca1a6 Add const to read only local variables
Pick-to: 6.2
Change-Id: Ideb34a5009277b919a8a3834e53af4ff550dfc6e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-11-01 19:15:17 +00:00
Tor Arne Vestbø
06513ce175 Remove CFBundleGetInfoString from CMake Info.plist templates
It's been deprecated since Mac OS X 10.5.

qmake templates fixed in 0768a28fbf.

Task-number: QTBUG-74872
Pick-to: 6.2
Change-Id: If7d988f27f07b6fa095b2ea51a87c306361d63d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 18:58:00 +00:00
Ievgenii Meshcheriakov
de641fbc14 QAbstractProxyModel: Use QCompatProperty with custom getter
Use new API for QCompatProperty with custom getter instead of ad-hoc
solution.

Task-number: QTBUG-89655
Change-Id: I06481ad4d360b178be001ceb9c6c8460b73391f6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2021-11-01 20:02:17 +02:00
Michal Klocek
eb5cae26a4 Add warning about QCoreApplication deferred delete
In some bug reports we got code which does deleteLater()
on QCoreApplication, however this is not going to work as
the user may expect.

In cases where an application uses Qt WebEngine, this leads
to weird looking crashes on exit as webenginecontext is not
destroyed.

Pick-to: 6.2 5.15
Change-Id: I4d284f30b0c7cad15ba6da3d65cdf813c36ee036
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-11-01 18:52:04 +02:00
Kai Köhne
ca298bbefc Fix various configure time warnings about missing QT_BEGIN_NAMESPACE
We now have a couple of global.h headers that do only start with 'q'.
We can't change this anymore, so let's just accommodate for that.

This fixes the following warnings

  qtserialport/src/serialport/qserialportglobal.h does not include QT_BEGIN_NAMESPACE
  qtwebsockets/src/websockets/qwebsockets_global.h does not include QT_BEGIN_NAMESPACE
  qtwebchannel/src/webchannel/qwebchannelglobal.h does not include QT_BEGIN_NAMESPACE

Pick-to: 6.2
Fixes: QTBUG-97831
Change-Id: I12aae13eb0d782d366cb84999392a544c30cdd79
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-01 17:17:29 +02:00
Andrei Golubev
b01f08033b Inline QPropertyBindingDataPointer
The only non-inline function of that class was observerCount() which
would use two of the inline functions defined in the header file, so
we can safely inline observerCount() and make the whole class contain
only inline methods

Consequently, inline class doesn't have to be exported in Windows

Change-Id: I41d144d9a50420bbc0091992b36cc36ac2567704
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-01 17:12:44 +02:00
Allan Sandfeld Jensen
7cb2159388 Match documentation of shared pointers to new definitions
We also have move semantics and noexcept.

Pick-to: 6.2
Change-Id: Idcb1d39f79ff45738c641f8dd07fb71cf32d9aca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-01 11:20:32 +02:00
Volker Hilsheimer
e2e5f448ca Implement QTest:mouseMove widget overload to send event
We cannot assume that calling QCursor::setCursor results in a mouse move
event, and we can definitely not assume that the previously pressed
button (via QTest::mousePress) will be included in such an event.

Instead, follow the mechanism used in the QWindow-overload to keep track
of the mouse buttons pressed, and make those the buttons pressed in the
mouse move event we generate.

[ChangeLog][QTestLib] QTest::mouseMove no longer moves the mouse cursor
via QCursor::setPos, but instead generates a QEvent::MouseMove. Testing
of code that relies on QCursor::pos needs to be done with explicit calls
to QCursor::setPos.

Change-Id: Ia643bcc999498a0dc93479b77e107b989dfe202d
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-30 11:46:03 +02:00
Thiago Macieira
a887b7750c qconfig.cpp: use qOffsetStringArray
It's been there for ages, we may as well use it and remove unnecessary
complexity from CMake.

Pick-to: 6.2
Change-Id: I2bbf422288924c198645fffd16a9742567a7e4af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-10-29 20:26:13 -07:00
Alexey Edelev
388136e860 Add --no-rcc-bundle-cleanup option to androiddeployqt tool
Add --no-rcc-bundle-cleanup option to androiddeployqt tool that helps
to debug android build procedures and check the raw rcc bundle for
missing items. Also add the QT_INTERNAL_NO_ANDROID_RCC_BUNDLE_CLEANUP
CMake variable that adds the option when configuring projects for
Android.

Change-Id: I1f30ba979f9fb3274e44a53fdc5ebde4e65f0843
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-10-29 19:32:16 +02:00
Ivan Tkachenko
a670839c61 Doc: Fix broken formatting
Amends f25bc30d8d

Pick-to: 6.2 5.15
Change-Id: Ia42c7639e4919de3f995d771bfc7d8237a8773d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-29 16:06:31 +00:00
Mårten Nordheim
85a6a5bfe1 QNI: iOS: Fix copy-pasted warning messages
Change-Id: Id2b3ff8857a4f86ec88a0f4a8d08a227e145ae4d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2021-10-29 16:06:30 +00:00
Fabian Kosmale
77b99e8111 QMetaType: Avoid superfluous template instantiations
Apparently msvc still parses the template and generates code for it when
it encounters an extern template declaration. Thus, instead of speeding
up compilation, it gets slowed down significantly as the instantiation
would happen in every compilation unit that (transitively) included
qmetatype.h.

Task-number: QTBUG-97601
Change-Id: Id5e934afb14ad8973df1b9197aef336b22220111
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-29 17:31:57 +02:00
Fabian Kosmale
bbfd625b63 qglobal.h: Do not include <algorithm>
algorithm is a rather heavy header, so we do not want to include it
everywhere. It most likely was put into qglobal, because before C++11,
swap could be found there. However, since C++11 it is located in
<utility>, which we already include. Thus drop the superfluous include.

[ChangeLog][QtCore][Potential source breaking change] The <algorithm>
header is no longer transitively included with qglobal.h. If you used
functionality from that header and relied on the transitive include, you
will now need to explicitly add the header.

Change-Id: Idc1912956b483d313dafd61b8f6a49d60eed8d3c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-29 16:56:47 +02:00
Laszlo Agocs
e7a1fbfc47 rhi: Add texture array support
Arrays of textures have always been supported, but we will encounter
cases when we need to work with texture array objects as well.

Note that currently it is not possible to expose only a slice of the
array to the shader, because there is no dedicated API in the SRB,
and thus the same SRV/UAV (or equivalent) is used always, capturing
all elements in the array. Therefore in the shader the last component
of P in texture() is in range 0..array_size-1.

Change-Id: I5a032ed016aeefbbcd743d5bfb9fbc49ba00a1fa
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-10-29 15:57:13 +02:00
Morten Johan Sørvig
e7371fa159 windows qpa: re-apply 8d6e825d
“Handle invisible child windows gracefully on dpi changes”

This fix was accidentally removed by commit cd96d870
“Move VM_DPICHANGE handling to QWindowsWindow”.

Fixes: QTBUG-96466
Pick-to: 6.2
Change-Id: I3774f6305631ba47282d43e8480e2acaba517a96
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-10-29 15:57:13 +02:00
Alexandru Croitor
c78a652bd2 CMake: Warn when using unsuitable CMake due to issue finding host perl
CMake's Modules/Platform/Android-Initialize.cmake was setting
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH to OFF and host perl was not
picked up in PATH on Windows when building for Android.

Pick-to: 6.2
Change-Id: Ic98d8b38425231ef6aaf173fdfe958b573cc0c40
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
b04a0f0c04 CMake: Allow enabling/disabling QT_HOST_PATH checks via variable
One can now pass -DQT_REQUIRE_HOST_PATH_CHECK=OFF or
-DQT_REQUIRE_HOST_PATH_CHECK=ON to force disable or enable
the QT_HOST_PATH and QT_HOST_CMAKE_DIR_PATH validity checks.

One potential use case is if a project wants to manually find
QtFooTools packages by manipulating CMAKE_FIND_ROOT_PATH and such,
in which case they might not want to pass a QT_HOST_PATH.

Another potential use case is cross-building Qt with
-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON and allowing the same
generated toolchain file to be used on the device image.

By default the generated toolchain file would require a host path
because it expects that it's still being used for cross-compiling.
But once the toolchain file is deployed to the device there's no need
to use the host tools anymore.

Another use case is building a desktop Qt using the host tools of
another desktop Qt. The new desktop Qt can use its newly built tools
just fine and wouldn't need the original desktop Qt tools.

QT_REQUIRE_HOST_PATH_CHECK needs to be added the list of vars to pass
through to try_compile calls.

Change-Id: I4b922b5d854828e6b9210dd8c07b4b1b8630aad1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
f917df2752 CMake: Fix _QT_TOOLCHAIN_VARS_INITIALIZED check in toolchain file
The environment variable check to set extra env vars
was using invalid syntax. The condition always resolved to TRUE
which means the env vars were constantly re-assigned inside each
try_compile project.

To check for undefined-ness, one can use if(NOT DEFINED ENV{...})
To check for false-ness, one can use if(NOT "$ENV{...}")
To check for string emptiness, one can use
  if(NOT "$ENV{...}" STREQUAL "")

In this particular case checking for false-ness is good enough.
The extra re-assigning had no visible effect, so this is just cleanup.

As a drive-by, clarify one comment.

Amends ca59c20939

Pick-to: 6.2
Change-Id: I8fd400101efa9e610a81268c33cac8c0cb33cba3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
402b8b9cee CMake: Use Qt6HostInfo dir for Tools CMAKE_PREFIX_PATH assignment
Instead of hard-coding a lib/cmake suffix to CMAKE_PREFIX_PATH
use the parent directory of the Qt6HostInfo package which is always
searched for when QT_HOST_PATH is set.

Amends d2359b2d4e

Pick-to: 6.2
Change-Id: I7f3c8fe17bc82f733580d68d928146434a57d849
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
102c1cff72 CMake: Clean up and improve QT_HOST_PATH_CMAKE_DIR computation
Previously when one wanted to use a cross-compiled Qt with a host Qt
installed in a non-default location, they'd have to provide both
QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR.

This change will now try to first check if ${QT_HOST_PATH}/lib/cmake
is a valid path on disk and use that. This is nicer to the user
because they don't need to specify 2 paths anymore.

Furthermore the path computation and sanity checks are now done after
any extra toolchain cmake files are loaded, to give an opportunity
to the files to set the paths first.

Finally, both variables need to be added to
__qt_toolchain_used_variables so they are passed along to try_compile
calls if the variables are specified manually.
Otherwise when the toolchain file is loaded by a try_compile project,
it will error out saying no host path found (as long as the initial
paths embedded in the toolchain are invalid).

Amends 93fc3afe71 and
ec90f9013b

Pick-to: 6.2
Change-Id: I433239b36b084f2d0a7a0dd043fdf87d77c138f3
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
c82bca9efe CMake: Fix forcing usage of host tools when doing a desktop build
One can now set QT_FORCE_FIND_TOOLS to ON together with passing a
QT_HOST_PATH to ensure that a new desktop build uses
already existing tools from a different Qt host (desktop) installation.

Depends on a0e56294c1
to work, which is not in 6.2, but this change is still included in
6.2 because it cleans up the conditions a bit to make them more clear.

Amends 42d3b21c92
and 5a779a4ad3

Pick-to: 6.2
Fixes: QTBUG-95099
Task-number: QTBUG-97658
Change-Id: If6258fb1091c6c1e457f22ae5f468b811bd20d57
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-10-29 15:34:12 +02:00
Alexandru Croitor
9ed274a48d CMake: Enforce lookup of host Tools packages in qt_internal_add_tool
When cross-building, qt_internal_add_tool would accidentally find device
QtFooTools CMake packages as a result of calling find_package. It should
have found host Tools packages instead.

The reason was due to a combination of setting
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to BOTH, find_package preferring
the lookup of packages in CMAKE_FIND_ROOT_PATH before CMAKE_PREFIX_PATH
and there being a Tools package in the device sysroot.

Because qt_internal_add_tool didn't adjust CMAKE_FIND_ROOT_PATH to
contain the host path, the device package was picked up.

Change the implementation not to set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
and instead modify both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH
to prefer the host packages instead.

This aligns to the behavior that was introduced in
ec90f9013b
which is used in QtModuleDependencies when looking for Tools packages.

Pick-to: 6.2
Fixes: QTBUG-97599
Change-Id: I8e38284774ae97981ccfd5071465609f3de80f01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-10-29 15:34:12 +02:00
Volker Hilsheimer
ffc9323671 Fix performance regression when avoiding scrollbar flipping
Amends 6c4dc722cb.

Don't search for the optimal size of the scrollarea's widget if it can't
be found anyway. Try the size with scrollbar first, which covers the
vast majority of sizes.

Optimizing the loop with e.g. a binary search adds no value, as the size
is often just a pixel too small.

Since we can't rely on the number of height-for-width calls, we can't
meaningfully test this behavior. The number of calls is still very high
during showing and resizing; optimizing this further is for a separate
commit.

Fixes: QTBUG-97811
Pick-to: 6.2 5.15
Change-Id: If145302e6414b32cf1ce7251ff33b0039f584867
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-29 14:53:56 +02:00
Alexey Edelev
53ffa665d0 Fix target existence check in qt6_android_generate_deployment_settings
Move the check to the beginning of the function.

Pick-to: 6.2
Change-Id: Ia44bb2e56626b00e75efabf2ebdc8eb97eee0ff8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
2021-10-29 14:53:56 +02:00
Alexey Edelev
d273f38726 Replace deleteRecursively function with QDir::removeRecursively
Use QDir::removeRecursively instead of deleteRecursively when cleaning
up top-level build folders.

Change-Id: Ifb406fc1965a0781eab4fd63a3764a84f4309d25
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-29 14:53:56 +02:00
Edward Welbourne
3b51b8c31d Fix signed/unsigned comparison warnings in tst_QArrayData
QArrayDataPointer<>::size is now a qsizetype, not the uint it used to be.

Pick-to: 6.2
Change-Id: I09d7e5a50401b46a12f29f93b2b39d646b771cfc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-10-29 14:11:46 +02:00
Robert Löhning
ee487c6b89 QVarLengthArray: Add explicit assertions for implicit assumptions
Change-Id: I4dfbf6174483b4af91f31a05c18cfec2aaec6e1f
Pick-to: 6.2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-29 12:11:46 +00:00
Mårten Nordheim
a6947853ee QNI: transportMedium support for iOS
It can only differentiate between cellular and not cellular
and then we can determine if it's disconnected or (presumably) using
wifi.
It is also explicitly not supported on macOS, which adds to the
confusion.

Task-number: QTBUG-91023
Change-Id: I1d002ba06dd9acf1a0daabfb2a4193c07871e9b4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-29 13:01:55 +02:00
Ivan Solovev
f40e0bcf67 Extend documentation for bindable properties
Extend the general property system page with a section on how
to use bindable properties.
Add some cross-references to improve the user experience.

Task-number: QTBUG-97656
Pick-to: 6.2
Change-Id: I2520cdc168e3a8a66ea387e4ab717f4e0f969424
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-10-29 13:01:55 +02:00
Mike Achtelik
d6da61f3b9 Android: Treat ACTION_CANCEL as TouchCancelEvent
Change 64d62c53c1 started treating an
ACTION_CANCEL as a TouchPointReleased. This leads to unintentional
presses, if e.g. an edge swipe for the android back gesture starts on a
MouseArea.

When Android takes possession of the motion, an ACTION_CANCEL is
delivered, which needs to be handled as such. It should not be treated
as a normal up event that triggers a press. Otherwise, we get the
above-mentioned issue, where an unintentional action is performed.
So let's use QWindowSystemInterface::handleTouchCancelEvent to treat it
as a canceled touch in Qt.

Task-number: QTBUG-72110
Pick-to: 6.2 5.15
Change-Id: I68650a180130501568e5a1e9a7f20ea469461e97
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-10-29 08:39:55 +02:00
Lorn Potter
97be0cca17 wasm: fix changing cursor shape
The previous implementation would occasionally result
in a crash when a window was closed.

Apparently 'auto' cursor does not work so well,
so we now use 'default' name.

Fixes: QTBUG-96178
Pick-to: 6.2 5.15
Change-Id: I0179d20dbdc01f0e3021d746324e1e39c678a298
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-10-29 04:18:34 +00:00
David Skoland
d685c4682b Revert "wasm: Hide popups when a window is left-clicked"
This reverts commit 0921caf976.

Reason for revert: This change breaks mouse press handling in popups themselves. I'll make another solution.

Change-Id: Ib9fd41f3f078e6abf22e5b0f75724d4acc737ead
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-29 01:16:35 +00:00
Joerg Bornemann
7531994379 CMake: Fix undefined reference to WinMain errors with MinGW
When linking against Qt with MinGW, libmingw32.a must come before
libQt6EntryPointImplementation.a on the linker command line.  Otherwise
the linker cannot find the WinMain symbol that's defined in the
EntryPointImplementation library.

Under certain circumstances, mingw32 was linked after
EntryPointImplementation.  To reliably ensure the order of said
libraries, we introduce the imported library EntryPointMinGW32.  This
target represents libmingw32.a and links against EntryPointImplementation.

The link dependencies look like this:
EntryPointPrivate -> EntryPointMinGW32 -> EntryPointImplementation

The imported library EntryPointMinGW32 is defined in a separate .cmake
file which is included by both src/entrypoint/CMakeLists.txt and
Qt6EntryPointConfig.cmake.  This is needed, because the consumer outside
of Qt must access this imported library, and we cannot export imported
libraries.

Pick-to: 6.2
Fixes: QTBUG-93671
Change-Id: Ib3c5e80cbcc9c793d000e5ad637325bcf735a1ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-28 22:15:46 +02:00
Janne Juntunen
825505c439 QNX: Handle missing elf.h gracefully
It seems that after commit id 46fc01d7ca
the qpluginloder test case cannot find elf.h in QNX test environment.

This is just a workaround, fix for missing elf.h (QTBUG-97833) needs
to be done later on.

Change-Id: I3f6ec36c8ceaed82552fd0e156a56637c056780d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-28 20:14:45 +03:00
Thiago Macieira
0f6453703c QLoggingRegistry: Disable internal tracking of source file names
Commit d78fb442d7 (5.4) did this for all
regular users of our macros, but obviously missed this manual override.
So apply here too.

Change-Id: I8c6a0ff3ec184205a544fffd16af7734fed2ebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-27 12:40:33 -07:00