- 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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
These were copied from *.qdoc files by a mistake.
Change-Id: I2379422c2c8558bd8c2111170d0c1d97f06797da
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
[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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
_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>