Commit Graph

58111 Commits

Author SHA1 Message Date
Friedemann Kleint
33bee95910 Brush up the drop site example
- Use qsizetype
- Use new string literals instead of deprecated QLatin1String()
- Streamline some code
- Remove unused member variable
- Remove module include

Pick-to: 6.4
Change-Id: Ia96424a23f3ae10e57db942de49949ce3aef8876
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-21 20:52:14 +02:00
Axel Spoerl
10a143ccd7 Prevent dock widget from resizing upon unplugging from main window
QDockWidgetLayoutState::itemRect() has been used to calculate a dock
widget's size when unplugging from the main window. This method is meant
to calculate the size of the rubber band, showing the dock widget's
dock area.

The rubber band is by QDockAreaLayout::sep wider (top or bottom dock)
or higher (left or right dock) than the respective dock widget. This is
to make sure the rubber band is never fully covered by the dock widget.

By wrongly using itemRect() also for the dock widget's size after
unplugging, the dock widget grows in size each time it is unplugged.

This patch passes an invalid QRect to QDockWidgetPrivate::unplug(), in
order to prevent resizing.

tst_QDockWidget::unplugAndResize() is extended to check size
consistency after unplugging (corrected for frame margins).

Fixes: QTBUG-106531
Pick-to: 6.4 6.2
Change-Id: I1cf9f695691b0e165a5cb2881781602426e5d587
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-21 18:41:43 +00:00
Fabian Kosmale
a8ccd9cd84 moc: Do not fail to compile meta-methods containing non-const ref types
Amends 2d0c31e7d9. We were using
MetaTypeDecay in qTryMetaTypeInterfaceForType; but that is not used by
moc when complete types are enforced. Change qt_metaTypeArray to also
use qTryMetaTypeInterfaceForType, so that the code path for "force
complete types"[0] and the normal one do not diverge.

[0] Most easily enabled by using one of the QML type registration
macros.

Fixes: QTBUG-106672
Pick-to: 6.4 6.4.0
Change-Id: I9bf14873d1d0c4127a676643f7e8eb77f6e42dc8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-21 18:41:43 +00:00
Alexey Edelev
0a4761522b Avoid the 'file' command shadowing
Avoid the 'file' command shadowing by a variable and use file name when
filtering header files by type.

Amends 8539e641f6

Task-number: QTBUG-103196
Change-Id: If012975efafaf119cffbd89baf84df334bc057ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-21 20:41:43 +02:00
Axel Spoerl
ae22bff97e Implement appearance detection generic unix themes
Detect appearance and reimplement QPlatformTheme::appearance() in
KDE and Gnome themes.

Task-number: QTBUG-106381
Change-Id: Id65ea1e47696fbfb87db5ed194300d652e0bbe66
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-21 20:41:43 +02:00
Mate Barany
c986c046b4 QtGui: Use static const QString array to initialize QStringList
This commit addresses a comment from the review of QTBUG-98434.

Introduce a static const QString array for the name filters and create
the filtering QStringList from this array.

Task-number: QTBUG-103100
Change-Id: I7e07ea1083d802340c943f4a67eb4a831be4516a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-21 16:45:44 +02:00
Mate Barany
cf396c2da9 QtGui: Use isEmpty() to check for empty string
This commit addresses a comment from the review of QTBUG-98434.

Use isEmpty() to check whether the string is empty or not.

Task-number: QTBUG-103100
Change-Id: Ia7c298bc4436d974b0369e178a370764c1dbe051
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-21 14:01:43 +02:00
Sona Kurazyan
8b9c7fa53a Improve docs for QtNumeric header
- Move the docs for functions from qnumeric.h from qglobal.cpp to
  qnumeric.cpp.
- Update the '\relates' commands to refer to QtNumeric
  instead of QtGlobal.
- Add overview page.

Task-number: QTBUG-106154
Change-Id: Id39f2508415995a4c7a9dcc0a323447dbe348978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-21 14:00:44 +02:00
Sona Kurazyan
bee606b091 Extract overview page for QtLogging header from QtGlobal docs
Task-number: QTBUG-106154
Change-Id: I7a60225bc8d848f52c3f51f8f4d0a360cb4ea744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-21 14:00:44 +02:00
Sona Kurazyan
d5395219b9 Move QFlags docs from qglobal.cpp to qflags.qdoc
Task-number: QTBUG-106154
Change-Id: Ibcd306c98b71d334d12724e667a5c7bd13a140d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-21 14:00:44 +02:00
Alexey Edelev
79d3fba2eb Propagate QT_HOST_PATH_CMAKE_DIR to multi-ABI external projects
If QT_HOST_PATH_CMAKE_DIR is set it also needs to be used by multi-ABI
external projects. Add it to a list of cmake arguments.

Pick-to: 6.3 6.4 6.4.0
Fixes: QTBUG-106616
Change-Id: I5b12f72cabdad86846851fb3605e5388896e5abf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-21 14:00:37 +02:00
Mate Barany
ec19ced731 QtGui: Fix mismatches between string types and string literals
This commit addresses some comments from the review of QTBUG-98434.

Some strings were initialized with incorrect literal types - fix the
mismatches between the string types and string literals.

Task-number: QTBUG-103100
Change-Id: I5f9f8a2c1583c21711f7b9ff177917f20690b5a3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-21 14:00:37 +02:00
Alexey Edelev
6f12603cb1 Use PARSE_ARGV signature to process arguments instead of escaping
Use PARSE_ARGV signature of the cmake_parse_arguments function to avoid
escaping of semicolons when passing arguments to the
qt_internal_add_configure_time_tool and
qt_internal_add_configure_time_executable function.

Amends ac74b60c9c

Task-number: QTBUG-87480
Change-Id: I343abbd75107e56aaccab6e388db8dbda0525af3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-21 14:00:37 +02:00
Alexey Edelev
0b59c204a4 Add qt_configure_file_v2 function
The function does the same as the original one but respects semicolons
in CONTENT argument due to the use of the cmake_parse_arguments variant
with PARSE_ARGV.

Change-Id: I263662dc18e411a735b586995b82791fc6b888ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-21 14:00:37 +02:00
Ulf Hermann
00b9409843 Android: Disable androidtestrunner extra timeout
We already have:

a, a timeout as part of QtTest. By default it lets each test function
   run for 5 minutes. This timeout can be configured using
   QTEST_FUNCTION_TIMEOUT.
b, maxTimeBetweenOutput in the CI. The CI will kill the process if too
   much time passes between individual output lines of a test.
c, maxTimeInSeconds in the CI. This does exactly the same as the
   androidtestrunner timeout.

The CI timeouts can be centrally tuned per platform and Qt module. This
is preferable over a special timeout just for android.

As other people may be using androidtestrunner for unrelated projects,
don't delete the timeout, but simply disable it from CMake by setting
it to -1.

Task-number: QTBUG-106479
Task-number: QTBUG-101596
Task-number: QTBUG-100242
Change-Id: If4ce00948e204182bb12ac4859d3b0dd193de7ad
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-21 14:00:37 +02:00
Sona Kurazyan
a1e19c4a8c Fix the license headers
These were copied from *.qdoc files by a mistake.

Change-Id: I2379422c2c8558bd8c2111170d0c1d97f06797da
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-21 13:22:45 +02:00
Jaishree Vyas
b62c3a8545 Document QAtomic testAndSet
[ChangeLog][QtCore][QAtomic] Documented new overloads of testAndSet()
that were originally added for 5.3.

Fixes: QTBUG-103008
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I96c7b5828dc284651e6514389f405d7670d6784b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-21 08:31:24 +02:00
Sona Kurazyan
24dedaeaa1 QFuture: fix handling of cancelled continuation chain
To support cancellation of continuations attached via the parent future,
for each future returned by a continuation we store a pointer to its
parent (i.e. future the continuation is attached to). Later, before
executing a continuation, we go through chain of parents and check if
any of them is cancelled. However, if one of the parents is destroyed
while the chain is executing, the next continuations' parent pointers
will become invalid. So storing the parent pointers isn't safe.

This commit changes the logic of handling the cancelled continuation
chain in the following way:

- Instead of storing a parent pointer in the continuation future's data,
  we do the opposite: we store a pointer to continuation's future in the
  parent.
- When a future is cancelled, we mark all continuation futures in the
  chain with a flag indicating that the chain is cancelled.
- To guarantee that the pointers to continuation future's data don't
  become invalid, we clean the continuation (that stores a copy of its
  future's data and keeps it alive) only when the associated promise
  is destructed, instead of cleaning it after the continuation is run.

Fixes: QTBUG-105182
Fixes: QTBUG-106083
Pick-to: 6.2 6.3 6.4
Change-Id: I48afa98152672c0fc737112be4ca3b1b42f6ed30
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-21 01:18:31 +02:00
Axel Spoerl
4973155512 Replace QPlatformTheme::Appearance by Qt:Appearance
With the introduction of Qt:Appearance, its predecessor in
QPlatformTheme has become redundant.

This patch replaces all occurrences of QPlatformTheme::Appearance with
the new enum class.

Task-number: QTBUG-106381
Change-Id: I5406f1b7c19f68571f074617c681318c96a6517e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-20 22:25:59 +02:00
Axel Spoerl
feed452a99 Make commit() call in QTouchEventWidgetSequence explicit
Calling commit() in the QTouchEventWidgetSequence destructor bypasses
the vtable. This causes a compiler warning.

This patch eliminates the warning by explicitly calling
QTouchEventWidgetSequence::commit().

Pick-to: 6.4
Change-Id: I1354aa22d2a85a609adc307338d118c5789df93f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-09-20 19:47:34 +02:00
Edward Welbourne
89d58147ea Fix use of 0 as null pointer in tst_QDateTimeEdit
Change-Id: Ie529150801e3bbfc7c3203e49f712239cb3e82bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-20 19:47:34 +02:00
Kai Köhne
cd81fa3a47 Shorten too long configure output line
Keep the line short. While at it, also mention Intel, because
that's where the technology is available at (and searching for
Intel CET will lead you to the right places).

Change-Id: Iefe0d735a814880d49fbe82cfd3a790af656377e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-20 19:09:31 +02:00
Johannes Kauffmann
184743cc79 tst_qtnoeventloop: add missing override
Change-Id: I24ad2f4d069ce1c7a894f8466927acb6dfd266d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-20 19:09:31 +02:00
Johannes Kauffmann
2ce2992f5e tst_qprocess: remove unused loop counter
Change-Id: I1eece5a676cfa02fff27be01f25b07ddd82c40d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-20 19:09:31 +02:00
Tor Arne Vestbø
8e577b6d10 windowflags: Add control to toggle Qt::NoDropShadowWindowHint
Change-Id: I53b496c7b27a73cfb6052af3cd8643a971609523
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-20 16:34:57 +02:00
Tor Arne Vestbø
6fc751aedf windowflags: Report QWindow compound window states
Pick-to: 6.4
Change-Id: I44b923df6851d0f51ac39bcbb4a569cb2fde775d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-20 16:34:57 +02:00
Tor Arne Vestbø
55a7385296 macOS: Report compound window state when state changes
Otherwise we lose the fact that the window is both maximized and
minimized, if the minimize transition is asynchronous, as it is
on macOS 13.

Task-number: QTBUG-104210
Pick-to: 6.4
Change-Id: I76199e98927e6e4a0f379d78db0603faa80aa4b0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-20 16:34:57 +02:00
Tor Arne Vestbø
9796670732 Clarify that FramelessWindowHint does not guarantee fixed sized windows
Depending on the window manager or operating system the act of making
a window borderless may also affect the ability for the user to move or
resize a window interactively. However, this is a side effect of making
a window borderless, and should not be relied on. The correct way to
ensure a window has a fixed size it to use setMinimum/MaximumSize.

Fixes: QTBUG-103503
Fixes: QTBUG-106710
Pick-to: 6.4
Change-Id: I6d82380f5a9af1f08b12cb445792ecbf71bb0377
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-20 16:34:57 +02:00
Tor Arne Vestbø
dc1f931a91 macOS: Handle asynchronous deminiaturizing of windows
As of macOS 13 this operation is now asynchronous.

Pick-to: 6.4 6.2 5.15
Change-Id: I9431e24803c53a3fa455707b20a6814290718766
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-20 16:34:57 +02:00
Mikolaj Boc
b4780f1990 Get rid of copypasted code between isWindowBlocked's overrides
The code in QGuiApplication::isWindowBlocked and
QApplication::isWindowBlocked is very similar, a result of copying and
pasting. Due to the copying it is difficult to modify the code and the
implementation is hard to comprehend, too.
There are ultimately only two parts that are different. First is that
QApplication's override may also specify a certain window as
non-blockable if it is a popup window. Second, default modality is
computed in QApplication if a modal window does not have one assigned.
The differing parts have been extracted following the template method
design pattern.

Pick-to: 6.4
Change-Id: I3b9aa206a3c7211fe022730943bf6f76aa5ae6d2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-20 16:34:57 +02:00
Mikolaj Boc
de56047620 Redirect resize from QSizeGrip to system resize in wasm compositor
Using two different resizing techniques (one in QSizeGrip, one in
QWasmCompositor) leads to strange behavior while resizing wasm windows.
Redirect the QSizeGrip's resize to wasm's compositor resize (which might
be considered system resize) to avoid that.

Change-Id: Idfc062643caac3ceee879bfb875d943aade28378
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-20 16:34:57 +02:00
Venugopal Shivashankar
4a338aa180 Doc: Update the animation framework overview
- Clarify how the object ownership works
- Language clean up
- Update the snippets

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-106071
Change-Id: I7caf42a150ef82dee920df4d03db6fd988796bd4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-09-20 14:28:08 +02:00
Santhosh Kumar
82e7ac23a0 Clear WA_UnderMouse attribute when widget gets hidden
From 6.3 onward, hiding a widget doesn't automatically clear
QT::WA_UnderMouse attribute.

This leads to multiple buttons drawn with highlighted rectangle at the
same time (refer bug). The behavior is observed after
commit 0246bfd40a made as part of
bug QTBUG-53286.

This patch clears WA_UnderMouse attribute in widget hideChildren() and
subsequently, widgets that are hidden will not inherit this attribute
on the next show operation.

The attribute will be set only when the widget is under mouse cursor.

Fixes: QTBUG-104805
Pick-to: 6.4
Change-Id: I4988eb72577fd557a328fd08bb09fa2fbded3138
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-20 10:34:08 +00:00
Vladimir Belyavsky
013c346a8d QTextLayout: fix maximumWidth() for a text containing line separator
When laying out, we need to increase layout's maximum width _only_
if the previous line was not explicitly wrapped by a line or paragraph
separator, or if the current line's width is greater than the
previously accumulated layout's maximum width.

Fixes: QTBUG-89557
Fixes: QTBUG-104986
Pick-to: 6.2 6.4
Change-Id: Ib7cc4b9dda8f20166dcbd5cfd3b56424bb33d14a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-09-20 06:52:21 +00:00
Michael Weghorn
53086094d8 a11y: Fix QAccessibleTableInterface::selectedRows doc
While QAccessibleTableInterface::selectedColumns returns
the selected columns, QAccessibleTableInterface::selectedRows
should return the selected rows.

Change-Id: I0a4972e7c46536aa813d35512c02336cc1efb286
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-19 20:14:20 +02:00
Liang Qi
571e7a41f5 tests: improve tst_gestures on GNOME
There are some issues when testing QGraphicsView on GNOME(xorg)
overlapping with the default top bar. This change only move
the view a bit.

Notes:

* There is no CentOS in CI any more.
* panelPropagation() and panelStacksBehindParent() failed in CI
and local vm on Ubuntu 20.04, but only in CI on Ubuntu 22.04.

For example, we can turn the top bar off:

In Extension Manager, install Just Perfection, and disable Panel
in Visibility in it, all tests will pass too.

Task-number: QTBUG-84258
Task-number: QTBUG-103054
Pick-to: 6.4 6.2
Change-Id: I05c262540c85af00182cd142760c4a29554b04c9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-19 14:39:28 +00:00
Bartlomiej Moskal
7ae9632929 Examples doc: Tags fix for QtQuick examples
Four examples in QtQuick module had wrong tag in qdocconf file:
-QQuickRenderControl D3D11 Example
-Scene Graph - Direct3D 11 Under QML
-Scene Graph - Metal Texture Import
-Scene Graph - Metal Under QML

The first two are specific to Windows. The other two are IOS specific.
They were all marked as "android".
This commit changed those tags to correct one.

Pick-to: 6.4 6.4.0 6.3
Fixes: QTBUG-106436
Fixes: QTBUG-106438
Fixes: QTBUG-106439
Fixes: QTBUG-106469
Change-Id: I3d8d3cb54e4e552d7574c7c2f1d59437374c6446
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-09-19 11:25:36 +00:00
Mikolaj Boc
a5205d983b Set NO_EXCEPTIONS on executables on wasm
This reflects the true state of exceptions on WASM, which are always
disabled (DISABLE_EXCEPTION_CATCHING is always set with 1).

Change-Id: I7b681846159caf61f291f78a7b4ddf5260dc341f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-19 12:44:21 +02:00
Aleksandr Reviakin
aee64bbe13 wasm: capture pointer unconditionally on PointerDown event
The pointer events weren't captured previously
if, for example, mouse was pressed inside the window
and released outside of the window.

Pick-to: 6.4
Fixes: QTBUG-71948
Change-Id: Ie50e5c132fa03046f0c5b321c35a58cb9f34b67a
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-19 12:14:14 +02:00
Aleksandr Reviakin
81d9b5ada4 wasm: add DejaVu Sans as a fallback font
Add fallback font which supports emoji.
Similar logic of addding additional fallback fonts is used
for some other platforms.

Pick-to: 6.4
Fixes: QTBUG-87339
Change-Id: Iad9e7071bcc3c5bb1c11c6c745fd86f7d0f7860b
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-09-19 12:14:14 +02:00
Yuhang Zhao
dfabeead97 QWindowsKeyMapper: whitespace fixes
Code style fix, add some necessary whitespaces.

Change-Id: Ib6c5bf503faacec5dad804154ae992b2b0a49162
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-19 18:14:13 +08:00
Mikolaj Boc
bb582f7fd5 Use the js test runner for all tests on wasm
Make cmake changes that have ctest run the emrun test runner for
all tests that are build for wasm.

Change-Id: I8c07068d79cfd0d745dbcc3d3f025c7c48fe1069
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-19 08:54:02 +02:00
Mikolaj Boc
38049164c3 Make the clipboard paste from the outside work correctly
During the previous refactoring, two exceptions that triggered
native copy/paste events were omitted.

Fixes: QTBUG-106668
Pick-to: 6.4.0 6.4
Change-Id: Ie61dd6a0c1d9d2fdd47bd94be055d0221feae25b
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-09-18 21:44:35 +02:00
Thiago Macieira
9536a0ad48 {QSharedMemory,QSystemSemaphore}Private: use NSDMI for the members
Change-Id: If4c23ea3719947d790d4fffd171524225cc125fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-17 15:52:47 -07:00
Tor Arne Vestbø
705665957b macOS: Remove hard-coded logic for determining if key event has text
The normal flow for a keyDown event when sent to a text input enabled
view (NSTextInputClient), is that it's sent through interpretKeyEvents,
which in turn goes through the input methods, and result in either
composing (marking) text, inserting text, or executing a text editing
command such as moving the cursor to the beginning of the line.

  https://apple.co/3qDhwNb

In our case, we prefer to treat "simple" text insertion (non-composed
text) outside of the Qt input method protocol, and send these as normal
key events instead. The same applies when a key event results in a text
editing command that we don't handle.

The problem is that in the latter case, the key event would contain the
text that resulted from e.g. ⌘+K, or one of the function or arrow keys,
which in many cases would not be suitable for inserting into a text
field by a naive client that trusted the text property of the QKeyEvent.

To work around this two exceptions were added; first in 4dbce2a469
to ignore text when inside the U+F700-U+F8FF unicode range (arrow keys,
function keys, etc), and second in 933fab137d to ignore text for
events that had one or both of the control or command modifiers.

Unfortunately this hard-coded logic was not taking into account that
some keyboard layouts may produce text that match these exceptions,
for example ^⌥+ю with a Russian keyboard layout should result in
inserting a period.

Instead of continuing to add hard-coded exceptions to this logic,
(for example by only filtering out single-modifier events), we
instead use the information that the text input system gives us
via doCommandBySelector to decide whether the key event should
have text or not.

Note: We have similar workarounds for detecting text that is not
suitable for text insertion in other places of Qt, for example in
QInputControl::isAcceptableInput(), but since we can't assume the
client uses QInputControl for their text input needs we need to
filter out the text earlier than that.

Fixes: QTBUG-106393
Task-number: QTBUG-36281
Task-number: QTBUG-35734
Pick-to: 6.4
Change-Id: I7769098cba1c605f6fdb6b23964eb614578724bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-17 21:37:20 +02:00
Alexey Edelev
3800bcf526 Fix the way deffered files are added to a CMake source tree
Use relative paths when adding deffered files to the target sources.
The use of real paths causes issues in the build.ninja file on
Windows platforms.

Amends 3df618b8d9

Task-number: QTBUG-99808
Change-Id: I15b7c695e5f281f2a0ee96ba25ef27baa74ebd37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-17 15:03:38 +02:00
Samuel Mira
072387edec Android: Fix flickering on window resize and show keyboard
Changed to use display getMetrics which will return the size of the
application window, and use getRealMetrics to obtain the size of the
largest region accessible to the app.
I updated the fullscreen mode to use the new sizes.

Task-number: QTBUG-41170
Task-number: QTBUG-66727
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ic25555ed2e1b910b3fdbc0f3a31e3a19763a04eb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2022-09-17 08:42:48 +00:00
Thiago Macieira
66485a4c5d QSystemSemaphorePrivate: remove unused semaphoreLock member
Change-Id: If4c23ea3719947d790d4fffd17153314cc58c2a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-16 17:20:19 -07:00
Thiago Macieira
de25c1d27d QSharedMemory: remove QT_NO_QOBJECT
This was only needed for bootstrapped builds, but QSharedMemory is no
longer part of it since commit 75082c9f20.

Change-Id: If4c23ea3719947d790d4fffd171522c0d5f9aafb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-16 17:20:18 -07:00
Alexandru Croitor
469dbe5c6d CMake: Fix _qt_is_test_executable assignment for tests
_qt_is_test_executable can only be set on a test that is backed by a
real target. QMLTESTs might not backed by an executable target, if
they are missing cpp SOURCES.

Which led to errors like

 CMake Error at
  cmake/QtTestHelpers.cmake:510
 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  textedit
 Call Stack (most recent call first):
  tests/auto/qmltest/textedit/CMakeLists.txt:10 (qt_internal_add_test)

Amends 62c681a599

Change-Id: Ie66fd3e94484562061f851c0a034629959d091da
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-09-17 00:30:39 +02:00