Commit Graph

56144 Commits

Author SHA1 Message Date
Andreas Eliasson
3989f56c6b Doc: Revise OpenGL module landing page
Add the new qdocinc cmake and qmake snippets and reorganize some of the
sections structure.

Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: Iafa31856500e458c14feeb92bee660f44a65ffa9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-25 13:42:19 +00:00
Andreas Eliasson
b57e023b3b Doc: Revise Qt dbus module landing page
Move some of the detailed information into its own overview page and
reorganize the contents structure. Also, escape the _ character.

Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: I396877912bed66537e4a97ee3d109ff92e15d843
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-25 13:42:19 +00:00
Andrei Golubev
b365186860 Fix unused variables in qtbase
clang compiler recently got smarter and detects "pseudo used variable"
patterns where we declare a variable and only use it in self-increments,
self-decrements and other similar expressions

Errors:

qtbase/src/corelib/text/qlocale.cpp:3898:9: error: variable 'group_cnt' set but not used [-Werror,-Wunused-but-set-variable]
    int group_cnt = 0; // counts number of group chars
        ^

qtbase/src/corelib/text/qunicodetools.cpp:1372:21: error: variable 'uc' set but not used [-Werror,-Wunused-but-set-variable]
    const char16_t *uc = text + from;
                    ^
and more of the kind

Remove the ones that have no usage, mark others with [[maybe_unused]]

Pick-to: 6.3 6.2
Change-Id: Ib2d0722110e3da8c39e29ec78c0ec290d064c970
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-25 15:05:25 +02:00
Venugopal Shivashankar
242633430b Doc: Fix typo in the HTML tabs config
Pick-to: 6.2 6.3
Change-Id: I00fad2e1e686f977bd508109c1a6a5d064d7a3d6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-25 10:07:05 +02:00
André de la Rocha
53c8d0d40b Fix crash when calling QMainWindow::restoreState()
Restoring the state of a window with a dock widget could cause a crash
in a multiple display configuration if the scale or screen arrangement
in the system had changed after the state was saved. In this case, the
original top-left coordinate of the window could now lie outside of any
screens, which would result in a NULL QScreen pointer being dereferenced
inside QDockAreaLayout::constrainedRect().

Fixes: QTBUG-102718
Fixes: QTBUG-102541
Pick-to: 6.2 6.3
Change-Id: Ie5e3209b82a33a1dc4568611c1b2ee3a6d8830b7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-24 23:14:11 +02:00
Tor Arne Vestbø
d42ad7b01e QFontDatabase: Clear font cache before emitting fontDatabaseChanged
Matches the ordering in QFontDatabasePrivate::invalidate() and ensures
that when the fontDatabaseChanged signal is processed by clients the
cache is ready to be filled again.

Change-Id: I9d09060284c6090ae2748147f6ee75b9f9b173c5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-23 16:00:13 +02:00
Yuhang Zhao
4ec9b0cd19 Windows QPA: fix the FullScreen standard key
If you try to use the QKeySequence::FullScreen
as a shortcut for your Qt applications, you'll find
it's not working. This is due to this key combination
is being skipped by Qt and it's being passed to Windows's
default handling procedure. This is wrong because
Windows doesn't provide any default action for this
shortcut so nothing will happen.

Change-Id: Id73b7275764fe63c119a6d673a665b0090944fef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-04-23 19:02:02 +08:00
Yuhang Zhao
fa1f3ad73a Windows QPA: Enhance theme change notify
DWM colorization color change should also be considered
as a theme change event.

Change-Id: I55562b9d43988aafc8a60a6264fe16dccbefff92
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-04-23 19:02:02 +08:00
Sona Kurazyan
fedba8eaab uic: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Change-Id: I0d3c232a9fa95aea854445922f100b89c6d6f5a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-04-23 09:47:03 +02:00
Thiago Macieira
3aef84d600 qhashfunctions.h: add std::hash specialization for QByteArrayView
[ChangeLog][QtCore][QByteArrayView] Added std::hash specialization.

Change-Id: If05aeeb7176e4f13af9afffd16e7f03dfa413a66
Reviewed-by: Rui Oliveira
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-04-22 17:34:15 -07:00
Thiago Macieira
507115ebbb QtOpenGL: Fix build with GCC 12: qt_imageForBrush is in QtGui
/usr/bin/ld: lib/libQt6OpenGL.t.so.6.4.0: protected symbol `_Z16qt_imageForBrushib' isn't defined

Pick-to: 6.2 6.3
Change-Id: If05aeeb7176e4f13af9afffd16e845af9638337b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-04-22 14:20:06 -07:00
Sona Kurazyan
77b9ddfb53 Android: use Qt major version for detecting OpenGL and QtQuick libraries
Change-Id: Ia7651ad09d7aab70cf32fcd56f9fb75202ace768
Pick-to: 6.3 6.2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-22 20:43:50 +02:00
Volodymyr Zibarov
7febf0b30e QGraphicsScene: Fix popup position for QGraphicsProxyWidget
screenGeometry() for proxy widget was returning visible part of the
scene instead of screen geometry for enclosing first view

Pass button center position to screenGeometry() to get correct screen
for cases when graphics view occupies two screens

Fixes: QTBUG-98785
Pick-to: 6.2 6.3
Change-Id: Idaeb3c3faf739751c93624a06fa0fd3d65388236
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-22 21:11:12 +03:00
Dimitrios Apostolou
72793ef31d Generalize exclusion list
It seems there are some tests in the various Qt modules that skip
writing the XML testlog file. If there are good reasons for that (for
example test is a custom shellscript) then it should be added to the
DUMB_TESTS list.

Change-Id: Iffb00e1fda42bb8e7338a94c9320e45900db1bc1
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-04-22 15:39:03 +02:00
Dimitrios Apostolou
399dbba775 qt-testrunner: improve error logging
Do not print full stack traces when a controlled exception occurs,
instead print just the exception name and the message.

Change-Id: I5669862d2e98c550d88d1d11fb2bf49f197cfc17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-22 15:38:59 +02:00
Axel Spoerl
42444a18b0 Clarify comment for QDockAreaLayout::sep
QDockAreaLayout::sep represents the visual margin between a dock widget
and its frame, i.e. a dock within the main window.
The comment 'separator extent' has been replaced by a clearer version.

Change-Id: Icfb3d549a5bcb00c5f1cf4558c5a1c4f995e31f0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-04-22 15:35:02 +02:00
Axel Spoerl
a5dec542fa Shrink dock areas if main window width/height is below 160px
Empty drop areas have a fixed size of 80 pixels in QDockAreaLayout.
If a main window is below 160 pixels wide or high, drop areas start to
overlap. If a main window's width or height is 80px or less, drop areas
fully overlap. Dock widgets can't be dropped in overlapping areas,
because the dock area becomes ambigous.
This patch decreases the width and height used to calculate the drop
area rectangle by the extent necessary to prevent docking.
QDockAreaLayout::sep (margin between a dock widget and its dock) is
used as the new minimum height and width.

Change-Id: I1db3282cfc7c602b59bb2f20ba616efe1719b0cb
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-04-22 15:35:02 +02:00
Tor Arne Vestbø
656dde05e8 QFontDatabase: Allow partially populating the font database
We were using the count of the registered families as the way to
determine if the font database had been populated yet. As a result
we needed to invalidate the font database every time an application
font was added to an empty database, as once the application font
was added, the font database was no longer empty, and we would end
up failing to populate any of the system/platform fonts.

We now have a dedicated flag for tracking whether the font database
has been populated, and we track whether an application font has been
populated by looking at its properties list, avoiding a second round
of populating when the full initialization happens.

This also opens up the possibility of the platform font database
populating (lazily or fully) fonts up front, for example as part
of resolving theme fonts.

The Windows font database had to be taught to invalidate itself
at the right moment, instead of assuming doing so during populate
was okey.

Change-Id: I80c893df755d8d35fb8a84dd7a83c6756a8f24a2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-22 15:27:43 +02:00
Edward Welbourne
396190686c Exploit the new macro varargs form of Q_GLOBAL_STATIC
Convert various uses of Q_GLOBAL_STATIC_WITH_ARGS() to the less
verbose form the recent reworking makes possible.

Change-Id: I57820660b5d00d39bf54b5a08cb921ebaec57c7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-22 15:27:43 +02:00
Kai Köhne
48561178e2 zlib as static library
Do build zlib as static 3rdparty library. This makes it easier to
disable warnings.

Pick-to: 6.3
Change-Id: I1db331b671b64e68d81c56b0df337983c3bbe7fa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-22 14:34:47 +02:00
Tor Arne Vestbø
e3941facca Send ThemeChange event to all windows when system theme changes
The QWSI event for theme change has an optional window parameter to
specify the window affected, but most platform react to global theme
changes, and end up passing nullptr into the event.

The reasonable thing to do in QGuiApplication in that case is send
a theme change event to every QWindow, so that they are all notified
about the situation.

This approach is what the Windows platform plugin was doing already,
but did so by iterating manually over the windows, resulting in multiple
calls to QGuiApplicationPrivate::handleThemeChanged -- one for each QWSI
event.

Change-Id: Ifb27b6c31231377c0df389a592cafd0075d3d8bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-22 14:34:47 +02:00
Alexandru Croitor
dc4bc1e575 CMake: Fix interleaved configure output
message(STATUS) prints output to a buffered stdout, whereas
message(NOTICE) or just message() print to unbuffered stderr.

We use a mix of message() calls when printing the configuration
summary, which caused interleaved output.

Because CMake offers no message(FLUSH), we work around the issue
by calling execute_process(COMMAND -E echo " ") which does
call std::cout << s << std::flush;

We seem to have to do it twice, before and after the
detailed configuration summary is printed.

Pick-to: 6.2 6.3
Change-Id: Ibc075551fc0547073f0696477e54d9b9c1edca97
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-04-22 14:34:47 +02:00
Alexandru Croitor
8a56b4ad9b CMake: Embed an empty qt_prfxpath if Qt is relocatable
When Qt is configured as relocatable,
 QT_CONFIGURE_PREFIX_PATH_STR -> qt_configure_prefix_path_str ->
 qt_prfxpath
is not used in relevant code paths.

Specifically qlibraryinfo.cpp getPrefix() uses getRelocatablePrefix()
instead of QT_CONFIGURE_PREFIX_PATH.

Thus, when Qt is configured as relocatable, set qt_prfxpath to an
empty string.
This avoids embedding a CI path like /home/qt/work/install into the
official packages, which makes reproducible builds a closer reality.

Change-Id: I9209b08e651ad0b7fdc4049df333e0978e05f1f5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-22 14:34:47 +02:00
Alexandru Croitor
251033fb0a CMake: Work around build rpath issue when CMAKE_STAGING_PREFIX is set
CMake has logic to rewrite build rpaths that contain
CMAKE_STAGING_PREFIX to instead point to CMAKE_INSTALL_PREFIX.

This breaks running executables from the build directory, because
their build rpath will point to a location where the libraries might
not exist yet (we didn't install Qt yet).

Work around this by setting CMAKE_STAGING_PREFIX to a fake path, so
that CMake does not do the rewriting anymore.

CMAKE_STAGING_PREFIX needs to be set at subdirectory scope, not
function scope, which is why
qt_internal_apply_staging_prefix_build_rpath_workaround() is a macro
that is called from within each Qt internal function that creates
a target.

The workaround can be disabled by configuring with
-DQT_NO_STAGING_PREFIX_BUILD_RPATH_WORKAROUND=ON

The downside of this workaround is that it breaks per-subdirectory
install rules like 'ninja src/gui/install'.
Regular global installation like 'ninja install' works fine.

This is similar to what we do for tests in
qt_set_up_fake_standalone_tests_install_prefix()
introduced by 20292250d4
The reason it's not as good for other target types is because in
contrast to tests, we do want to install them.

In case if someone does call `ninja src/gui/install' they will most
likely get a permission error, telling them it's not possible to
install into
/qt_fake_staging_prefix/
 check_qt_internal_apply_staging_prefix_build_rpath_workaround

Fixes: QTBUG-102592
Change-Id: I6ce78dde1924a8d830ef5c62808ff674c9639d65
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-04-22 14:34:47 +02:00
Laszlo Agocs
4f2b4e0e5e rhi: Add a feature flag for non-fill polygon modes
It's one thing that this is not part of OpenGL ES, but it is optional
even with Vulkan, with some mobile GPUs not offering the feature at all.

Change-Id: I4e2c6642eccb0793e69074b4b6eeb2b7cef3516e
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-04-22 14:34:46 +02:00
Eskil Abrahamsen Blomfeldt
7fa2a1a479 Remove last traces of old Harfbuzz
In Qt 6, we removed the "old" Harfbuzz and Harfbuzz-NG became the
only option. But the QT_HARFBUZZ=old environment variable would
still be read and would disable certain parts of the code path.

This has caused some confusion when porting older applications,
where QT_HARFBUZZ=old was used to work around issues with the
earlier versions of Harfbuzz-NG. Setting it now causes text to
disappear completely.

To avoid this confusion, we remove traces of the QT_HARFBUZZ
environment variable as well.

[ChangeLog][Text] Fixed an issue where setting the legacy
environment variable QT_HARFBUZZ=old would cause text to
disappear from the application.

Fixes: QTBUG-102774
Change-Id: I0f07cdb2418202fc36b82e766ad9547c34477175
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2022-04-22 13:10:59 +02:00
Friedemann Kleint
6eb9439809 Adapt generated sources of uic to latest string changes
Use _s literals everywhere, removing all codepaths generating
QLatin1Strings for comparisons and other optimizations.
This is now possible since string literals are now longer duplicated.

Task-number: QTBUG-98434
Change-Id: Ie35199593dc13a36afd92e3a0dd8d58ec492e4b7
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-22 08:09:24 +02:00
Tim Blechmann
3eca801f9d cmake: skip precompiled headers for generated resources
resource compilation is typically not bound by parsing headers, so they
don't benefit much from using precompiled headers. otoh, if we don't use
precompiled headers for them, we may have better turnaround times, as
these sources can be compiled in parallel with the pch compilation and
they don't have to be rebuilt when a pch changes

Change-Id: Ib4560ff31196e729f8efbcfb83cacfad127d90cd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-22 09:10:43 +08:00
Sona Kurazyan
301f0a6fb0 QtNetwork: replace remaining uses of QLatin1String by QLatin1StringView
Task-number: QTBUG-98434
Change-Id: I0bb9d534ee42ccbf7d353e251ef58901a86923b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-21 23:53:15 +02:00
Sona Kurazyan
46d6cc47cf QtNetwork: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434
Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-21 23:53:15 +02:00
Sona Kurazyan
f2637e1a77 QtNetwork: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Change-Id: I121f87214b77aeab1dfd3e62dc5adaa6255cc0e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-21 23:53:15 +02:00
Mårten Nordheim
e2a1329910 QHttp: Don't reorder content-length header for no reason
If the user supplied a content-length, and we also know the size of the payload
then we would set the content-length again, which is a remove + add on a QList.

This is completely avoidable if we are setting the same size anyway.

Fixes: QTBUG-102495
Change-Id: If62739cadb453dbda4c21e858ba3a17baaf71fb4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-21 23:13:24 +02:00
Edward Welbourne
3962a194d9 Tidy up some local variables in QSettingsPrivate::iniEscapedString()
A loop variable could just as well be declared in the loop.
The startPos variable sits more naturally just before its first use
than where the removal of the loop variable's declaration left it
isolated.

Change-Id: I4754b9dfe4b142e5a183a0d9555c9d3237bc6bbd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-21 23:05:47 +02:00
Edward Welbourne
6c5dac1685 Fix handling of DateTime values in QSettings
Since 5.6.0, Qt's serialization of QDateTime in QSettings files has
had special-case handling to use a newer QDataStream version than the
one QSettings uses for most other types. This was handled in the
serialization and parsing, but not taken into account in the code that
turned binary data into content suitable for saving to an ini file.

In Qt 5 this caused no problem when no iniCodec was set on the
QSettings object but Qt 6 now uses UTF-8 as (in effect) codec on every
QSettings object. This lead to the binary data encoding QDateTime
being encoded as if it were Unicode, instead of using \x tokens where
suitable. This lead to an unintended incompatible change in how
QSettings stores QDateTime values: Qt 6 was still able to read Qt 5's
values, but Qt 5 was unable to read Qt 6's settings files (unless it
sets its iniCodec to UTF-8, which works round the problem).

The code to convert raw binary data to ini-file-friendly value texts
had a special case for ByteArray and Variant values, to ignore the
codec and use \x tokens: when support for QDateTime was split from
Variant, it gained a DateTime prefix in the parsing code that wasn't
included in this special handling. So add that now.

The resulting DateTime values now match Qt 5 so are readable by it and
by Qt 6 (including versions prior to this change); and the code to
read a DateTime can still read what earlier Qt 6 versions have been
writing. It is likely a Qt 5 QSettings with an iniCodec other than
UTF-8 may have problems with the result, but that was already true.

This amends commit 73b8cd879c

Fixes: QTBUG-102334
Pick-to: 6.2 6.3 5.15
Change-Id: Icc44a33db3dcc6400144bc001710b400ee883c90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-21 23:05:47 +02:00
Tor Arne Vestbø
bead1894b7 macOS: Reactivate current input context after discarding marked text
When composition is activate and the user switches from one window to
another we get callbacks that the original window resigned key and the
new window became key, which gets propagated as window activation
events.

QGuiApplication reacts to this by sending a QEvent::FocusAboutToChange
event to the window that lost activation, which QWidgetWindow then
responds to by committing the current input method.

Unfortunately, at the time we get the key window callbacks from AppKit
the keyWindow of NSApplication has already changed, so technically the
QEvent::FocusAboutToChange event is too late and not in sync with the
system state, manifesting in a bug in the input context and Text
Services Manager (TSM) subsystem on macOS.

In response to the commit of the input context we unmark (accept) the
current composition, and then tell the NSTextInputContext of the focus
view about this fact by calling discardMarkedText on it. But since the
NSApp.keyWindow has already changed at this point, the focus view's
input context is no longer the NSTextInputContext.currentInputContext,
and as a result discardMarkedText will activate and deactivate the TSM
document to ensure the right TSM document's marked text is discarded.
This leaves things in an inconsistent state, as the current input
context document, which was activated when the key window changed,
is no longer active.

We can work around this by manually calling activate on the original
NSTextInputContext.currentInputContext. The documentation notes that
this API should not be called directly, but unfortunately there are no
other call sites in AppKit that end up in ActivateTSMDocument.

A longer term fix would be to add plumbing to QWSI and QGuiApplication
to allow notifying the application about the upcoming window activation
before it happens, so that the FocusAboutToChange event and corresponding
commit comes in at the right time (before the current input context has
changed).

Fixes: QTBUG-102083
Fixes: QTBUG-101278
Pick-to: 6.2 6.3
Change-Id: I8d369d1ca87cbb74a168ff3082bd0ab58eb391c5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-21 23:05:47 +02:00
Ivan Solovev
37746d2f71 Android: fix A11Y object description
This patch amends a374d59abc.

That commit introduced refactoring of A11Y object description
announcements that also took a value into account.
However for the elements without values (like QPushButton), an unused
space is added at the end of the description.

This patch fixes the issue by explicitly checking that the value
interface exists and that the value string is not empty.

Fixes: QTBUG-102744
Pick-to: 6.3 6.2 5.15
Change-Id: Ic1ba50859fb91c871c242189967dcce35723a0b2
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2022-04-21 22:25:13 +02:00
Sona Kurazyan
9eb090d683 Add support for unwrapping QFuture<QFuture<T>>
Added QFuture::unwrap() for unwrapping the future nested inside
QFuture<QFuture<T>>. QTBUG-86725 suggests doing the unwrapping
automatically inside .then(), but this will change the return type
of .then() that used to return QFuture<QFuture<T>> and might cause
SC breaks. Apart from that, QFuture::unwrap() might be helpful in
general, for asynchronous computations that return a nested QFuture.

[ChangeLog][QtCore][QFuture] Added QFuture::unwrap() for unwrapping the
future nested inside QFuture<QFuture<T>>.

Task-number: QTBUG-86725
Change-Id: I8886743aca261dca46f62d9dfcaead4a141d3dc4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-21 20:25:13 +00:00
Mårten Nordheim
f08fd3c055 tst_QNetworkProxyFactory cleanup genericSystemProxy skipping
Instead of having Q_UNUSED and QSKIP in the test itself, we just skip in
the _data function.

Change-Id: I9da3d3104ec25e2645e5770e6392bd46958da072
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-21 22:25:12 +02:00
Tor Arne Vestbø
fd803a6d04 Rename QGuiApplicationPrivate::notifyThemeChanged to handleThemeChanged
The work done by QGuiApplicationPrivate in response to a theme change
goes beyond notifying.

Change-Id: I27c74adf6549c553e659c7b8e271945ce753031c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-21 22:25:12 +02:00
Richard Moe Gustavsen
5907a0a944 QApplication: deliver activation events for non-widget windows
Problem: if you create a hybrid Widgets and Quick Controls
application, you would need to use QApplication rather than
QGuiApplication. But in that case, the QQuickWindows would
never receive window activation events from QApplication.
And this causes problems for controls, since, for example,
the palettes in use there will never update upon activation
changes, and instead sometimes get stuck as e.g QPalette::Inactive
after application startup.

This patch will make sure that we send out activation events
also for QWindows that are not QWidgetWindows.

Pick-to: 6.3 6.2
Change-Id: I649f5c653081c0c5249f4faf28a7de2c92f17421
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-21 22:05:05 +02:00
Laszlo Agocs
2d6007fa1c rhi: vulkan: Enable feature for line polygon mode
Turns out there is a fillModeNonSolid in VkPhysicalDeviceFeatures,
so to be true to the spec we need to enable that when setting the
polygonMode in a QRhiGraphicsPipeline to something other than the
default Fill. This way the validation layer won't bark at us.

Change-Id: I41f561a1796ba1d45229dc20bf1fb7bae3c43f48
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-04-21 21:27:28 +02:00
Joerg Bornemann
80a8ead08d Fix unresolved include in bootstraplib when using source copies
When QT_USE_BOOTSTRAP_SOURCE_COPY is ON, there are situations where
includes like
    "../../3rdparty/sha1/sha1.cpp"
in qcryptographichash.cpp cannot be resolved.  For example,
out-of-source MSVC builds are affected.

In-source builds are working by accident, because we're adding the
include path "<qtbase-build-dir>/src/corelib/global", and
<qtbase-build-dir> is <qtbase-source-dir>.

Linux/macOS builds are working by accident, because we're adding the
include path "<qtbase-source-dir>/src/3rdparty/forkfd".

Fix this by explicitly adding the directory where qcryptographichash.cpp
resides to INCLUDE_DIRECTORIES.

This amends commit 743bb66744.

Fixes: QTBUG-102720
Change-Id: I55fcc186ea4c81134c39023ced3f04458230109b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-21 20:35:24 +02:00
Giuseppe D'Angelo
86321a0deb Upgrade PCRE2 to 10.40
New upstream release.

[ChangeLog][Third-Party Code] PCRE2 has been updated to 10.40.

Pick-to: 5.15 6.2 6.3
Change-Id: Ice0516604259ad9fd36fe2708aa0239aafe381ca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-04-21 19:57:31 +02:00
Assam Boudjelthia
a9f18a6ec0 Android: de-duplicate shellquote helpers code in deploy and test tools
Move shellquote helper functions into a common place instead of having a
copy in each tool's code.

Change-Id: I9723c11f894a211864788a7635773610c0fde739
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-21 11:52:52 +03:00
Assam Boudjelthia
905bfb8503 Android: remove what appears to be non-necessary debug print leftovers
Change-Id: Ib87c6ada78180dcc686d24a048dbcfa159cac974
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-21 11:52:47 +03:00
Assam Boudjelthia
a91cc01011 Android: add helper functions to append .exe/.bat suffix when needed
Instead of having to do that each time for multiple paths, a common
helper function is better.

Change-Id: Ice2499f390a5790c5768eca037d186ad2e656ec7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-21 11:52:43 +03:00
Assam Boudjelthia
63d630bcbb Android: remove unused function in androiddeployqt
The "android" tool is deprecated and never used now, and this function
is not called by anything either.

Change-Id: I6fdb09934c93f5bc03610bcc4fd677f8bb2d4189
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-21 11:52:39 +03:00
Assam Boudjelthia
7fbf01bf07 Android: remove the old copy of gradle.properties after reading it
The file is going to be remove anyways in the next build, so just delete
it once we're done with it, this also makes the build folder doesn't
have files that are not needed.

Pick-to: 6.2 6.3 5.15
Change-Id: I948f028e9151b38a3ccc1ec628239ac91397e0d0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-21 11:52:35 +03:00
Łukasz Korbel
f10d0c781e Ensure tag used for logging on Android does not contain spaces
Tag passed to __android_log_print shouldn't contain spaces because
filter-spec used by adb logcat expects space-separeate list of
tag:priority specifiers. Effectively, its not possible to filter tag
using logcat if Qt's application name has spaces.

Pick-to: 6.2 6.3
Change-Id: I52b706b7a368d0700db45c0406bbfef279bc61fb
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2022-04-21 15:43:25 +07:00
Tor Arne Vestbø
e47c22480f Add QDebug operator for Objective-C id type
Not every id is an NSObject, and even those that are are sometimes
passed around as id<SomeProtocol>, in which case we still want them
to have pretty debug descriptions.

Change-Id: I50a02cd8fb9d6a2cbde3c4aef81116033d10b72c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-21 10:24:31 +02:00