Commit Graph

41238 Commits (1fbd8c282e2eb293cdcb1f0ff097ff9548be975d)

Author SHA1 Message Date
Stefan Wastl 1fbd8c282e macOS: Use originating view as drag source when dragging multiple items
We're already tracking the last view along with the last event, so
use that instead of always assuming the drag started from the window's
content view.

Fixes: QTBUG-102584
Pick-to: 6.2 6.3
Change-Id: Ibe8506b0f91ecdfe6e7fe91e17c129b4d7552880
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: <stefan.wastl@native-instruments.de>
2022-04-26 00:24:40 +02:00
Edward Welbourne 0248838ee0 Correct leap year sequence in systemTimeYearMatching()
In the sequence for the early 32-bit time_t leap years, I somehow
managed to get two of the entries swapped. This amends
commit 1f4b237dad

Pick-to: 6.3
Change-Id: I5cb9080f8c6a24e2163508e640747c6fbbe93dbd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-25 19:18:49 +02:00
Edward Welbourne 383368a321 Support test-case selection based on global data tag
In the same ways as for blacklisting. In the process, move reporting
of an unrecognised tag outside the global-data loop, as the tag might
be, or start with, a global data tag; and also report the global data
alongside the test-specific data. Indent the lines reporting tags, as
this makes the structure of the lists more evident. Converted the tag
argument to QLatin1String() to facilitate searching and matching.

Updated documentation, including expanding on the option of specifying
the data tags on the command-line. Drive-by: fixed a link in the
documentation, removed a snippet that was nowhere used.

[ChangeLog][QtTest] When specifying what tests to run on a QtTest
command-line, it is now possible to include a global data tag in the
same way as a function-specific data tag or in combination with it.
Thus if the test reports itself as tst_Class::function(global:local),
command-line option function:global:local will select that specific
test and function:global will run all data-rows for the function on
the given global data tag.

Fixes: QTBUG-102269
Change-Id: I7c86d6026933b05f7994bfc3663a2ea6a47f5f38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-25 17:47:21 +02:00
Morten Sørvig 36507ae617 wasm: don't show the resize cursor for fullscreen windows
The compositor should not show the resize cursor for fullscreen and
maximized windows, since windows in those states aren't resizable.

Pick-to: 6.3
Change-Id: I58762b7729a02f9a3c78edafe5d9d5b364fb552f
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-04-25 15:42:20 +02:00
Morten Sørvig 029f90f7ea wasm: initialize htmlCursorName to "default"
The canvas cursor should always be restored to "default" if no cursor
is set, otherwise we get the I-beam cursor since the canvas is
contenteditable.

The code which handles setting and restoring the override cursors
handles this correctly, however we also need to set the default
htmlCursorName for cases where setOverrideWasmCursor() is not called.

Pick-to: 6.3
Change-Id: I23be7847d3a30ab78e3a8c9ec402285246bfefec
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-04-25 15:42:20 +02:00
Andreas Eliasson 998b21c25d Doc: Revise Qt SQL module landing page
Include new CMake and qmake snippets and reorganize some of the sections
structure.

Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: I47cc9b24818c26740e49e6365bf881874942b79c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-25 13:42:19 +00:00
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
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
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
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
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
Lorn Potter e70c953a59 wasm: fix initial window paint event
We were requesting to activate the window too soon, when the window was
still in the initial size of 600x600, in which case, the paint event was
not getting called. This would require the user to have to click the
window in order to see it.

Removal of this does not seem to effect showing of tooltips, which it
was added initially.

Change-Id: I3efa86be99a3d9e1d9eda87b7537fff1e96e6774
Fixes: QTBUG-102005
Pick-to: 6.3
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-04-20 11:06:17 +10:00