The snippet referred to had a duplicate identifier to an earlier snippet
in the snippet file, causing that one to be quoted instead.
Change-Id: Id46f6da807806f874291cd5d4c25b8884e511cfc
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit d2c9982a568181d55a9043c8646a4ee88b635fc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use string(FIND) instead of if(MATCH) since paths containing special
regex symbols like "+", can either cause an invalid MATCH result or it
can lead to regex compilation errors like
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
Amends 6e7f871edfd35174b40c7eb7386282bfe019f276
Fixes: QTBUG-131782
Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: I59a2c3e4fe2431303c7cbca8fd54360f254da90f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9cb0d48aae81c5436bda783b64721d0b77bc3f6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The generic stylesheet rule (* { border: none; })
was overriding specific styles for
the menu-indicator, causing the dropdown arrow
to appear larger than intended. This rule was
removed to restore default or explicitly set
styles for the arrow, ensuring consistent
visual appearance
Task-number: QTBUG-120604
Pick-to: 6.5
Change-Id: If93de1e1595a2155e9a76644a3c615bd432bf53f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ebe9a6ca4bd0df04ae88f926eceda6dabe543748)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add entries for the cmake 3rd party files, as well as mimetypes
and gradient gen.
Task-number: QTBUG-122899
Task-number: QTBUG-131477
Change-Id: I22f243798d66422a0b52aa37532eba2b3210c98d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cecff9ec41ca9387386215540cb851ca8b65e2a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently we have two options that allow overriding the minimum CMake
version required to either build or use Qt:
- QT_FORCE_MIN_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_MIN_CMAKE_VERSION_FOR_USING_QT
These options require specifying an exact CMake version that should be
allowed, which is a bit cumbersome.
Introduce two new options that allow using any CMake version without
specifying the exact version.
- QT_FORCE_ANY_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_ANY_CMAKE_VERSION_FOR_USING_QT
Also introduce a Qt CI specific check that would allow using any CMake
in Qt's CI Coin, to allow decoupling of the minimum CMake version bump
from the provisioning of the new minimum CMake version.
This check should only be enabled temporarily, and then reverted back
once the provisioning is done.
The current change has the check disabled, it will be enabled in a
follow up change, so it's easier to revert.
As usual, using any of these options is not officially supported.
Task-number: QTBUG-131169
Change-Id: Icc3f51ad457ebf8f4251309be97e72a3ff4cd2e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit df7091d9f4cf7849cfc91f4987b2ad8cda141e0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to avoid caling toMSecsSinceEpoch() since it's expensive for
LocalTime (which is presumed to be the common case). We can do so when
both sides have the same offset from UTC (and this can cheaply be
determined) but that's no help for two local times months apart, one
in DST the other not. However, in this case, the difference in millis
is big enough that no plausible difference in offset can overcome it,
so we can again avoid toMSecsSinceEpoch() and simply compare millis.
This should make some previously-expensive comparisons cheap.
Add test-cases to the QDateTime ordering test that verify this doesn't
lead to mis-comparison at the biggest offset-difference known.
Fixes: QTBUG-131491
Change-Id: I1afd5d058c8663c908f898d4c50d0837549b87db
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ef540d77751e24fe0b345694f43cdafca3434c68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the messageHandler is called without loggers, we used to simply try
to restore the old message handler. This is not ideal and the assertion
seems to be wrong.
The situation of not having any loggers can occur during teardown, if
the message logger is called from a worker thread, while the application
thread stops logging (compare QTBUG-129722)
In this case, we simply forward the message to the original message
handler, which should simply print the message.
Change-Id: Ic8147f7ab6317f1ceb4f52c79ce298464a94de30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 56106d1bd770c474bc15df47ae6aa64d37ea3d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid double lookups to QRenderRule::styleHints by simply checking if
the returned QVariant from styleHint() is default-constructed.
Change-Id: I4ca657662c2af66582fb4fc7c2ed1b77258ab050
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f1fd15b4549a740dbd0abff44a43b551eef12d31)
Add setWindowFlags(Qt::X11BypassWindowManagerHint) to bypass the
creation of the frame. We are checking the geometry of the widget
itself, not of his frame in this test.
Remove the comments preventing that it can be flaky when debugging.
Remove unnecessary QApplication::processEvents().
Remove several unnecessary qWait().
Change-Id: I4a4bcf5cb9522a9a504925c1ae31f0677deae3b1
Pick-to: 6.7 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cf45ae08bc90b5dbbd20a7e7842856805205bca4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since 6.8, QML has popupWindow. When in popupModeMode,
it does not necessarily have a popupWidget.
Not checking whether popWidget is nullptr will cause the
program to crash.
Fixes: QTBUG-131664
Change-Id: I624b62ef7185f0ab35215c2c34b0d6e9c80539a0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 706d54eefee22e2feb16a7a7717c0a48ff270460)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A checked QToolButton should be drawn similar to a checked QPushButton.
As a drive-by avoid calculating the paint rect twice and make the code a
little bit more readable.
Fixes: QTBUG-129439
Fixes: QTBUG-129700
Fixes: QTBUG-130822
Change-Id: I573132e804f26b9fa41112267a9f685680cf0864
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b3c0b08eb040bbd76b81a7c6172e3846e8ec0000)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Surprisingly, moc had no awareness of constexpr at all. This would still
mostly work, as we were just skipping it, except for the case where
constexpr appears as the last keyword – in which case we'd pick it up as
the type name.
Fix this by adding constexpr as a known token, and add it to the list of things we ignore in testForFunctionModifiers.
Pick-to: 6.5
Fixes: QTBUG-122609
Change-Id: I0ae0c0477e611ff83fbb841233035bea52216be2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 984ad9019a62a9a130647dbd765e38ee2e6250c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The file is used only in the local scope so no need to have it
as a pointer. As a pass-by, use WriteOnly open mode.
Change-Id: I9999f4aed0f888af9a3e08ed6c3573432c29d195
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 7539b659d9ffbb3c44e45bdb7d9669a6df8915c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's good to give a hint about what changed, and it helps behavior of
QQmlDelegateModel when that is used in the view.
Fixes: QTBUG-131487
Change-Id: I8478eaf1e8294e101f3fedc285e44f83e600c566
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bf714c246b5e45d259a07cf19b668f091fa396a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There doesn't seem to be any reason that it should require an instance
of QApplication. However, given that the model is by design
asynchronous, it does need to live in a thread that runs an event loop.
Add a note about that to the "Caching and Performance" section, and
apply some drive-by editing.
Amends fb9ec8ad44
Task-number: QTBUG-66177
Change-Id: Ibe3095e0264ce033732d1c724f59a871e2a0d3b8
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 22bde5209a7a3c510d4b90b9eaee413f3ba3dee4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Documentation of QMetaProperty mentions deprecated members, which
includes type(). Added link to the metaType() to avoid confusion.
Fixes: QTBUG-131446
Change-Id: I8d96bcf712c78ca2b9ce609e511d275053cf6cbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 07c5ff8246b568f2d89e8b0e8236b1ec517e16b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When drawing an indeterminate progress bar, QPainter::drawLine() is
called very often. Avoid it by first calculating all lines and then call
QPainter::drawLines() once with all lines to draw.
Change-Id: I51ce23236b945b30da649fd06aad60676321e403
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0eedffa01daed077aba4781b240068929cf768be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cleanup drawing of PE_IndicatorToolBarSeparator - there is no need to
call QRect::topLeft/bottomRight() and then only use x or y. No need to
stress the optimizer that much.
Change-Id: I477dcea6c9bebd981777fdc1eb53963074257e01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9fa471f9c7b4f2218109fa4bd17d66cf5b24101d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move common tasks into a lambda to improve readabilty and avoid
copy'n'paste errors like it happened for SC_TitleBarContextHelpButton.
Task-number: QTBUG-130673
Change-Id: I5cb198b976d459b73e339d066def92d70b71ade5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9a97e78d8310c13212aacd578f5529b5521e395a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logging category now silences QtWarningMsg and below by
default, so we can be more granular in our logging.
Use info logging category for registering/unregistering, to allow
filtering out the detailed debug logging while still seeing when
devices are registered/unregistered.
Log the number of buttons for pointing devices, if there are any.
Log the device for wheel events.
Change-Id: Ie046fee1659fc3967caf7eafbaf46f3ed22be5bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 1ad00d3878271450cc55eb84d4c5f3cddd460b8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We will need these checks in the qcomparehelpers.h header, so move
the code there.
As a drive-by, use QtOrderingPrivate namespace instead of QtPrivate,
and also mark the constexpr bool variables as inline.
This is required for the follow-up patches.
Task-number: QTBUG-127095
Task-number: QTBUG-120305
Change-Id: I1ea827ecf68b6bffa347dae22ddac25c059b53a9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 678e9f614bc5a05d2ff16cf916397998e7cdfca1)
548351 changed QWindowsIntegrationPlugin and
QWindowsDirect2DIntegrationPlugin so that their CMake targets link
directly to UIAutomationCore.lib/.a instead of loading
UIAutomationCore.dll dynamically at runtime; however, it did this by
first locating the library via `find_library()` and then using the
absolute path to the DLL import library found. If Qt was built
statically, this would cause that absolute path to be added to the
INTERFACE_LINK_LIBRARIES of their export targets, breaking the build
if moved to another machine where the location of that lib differed.
Instead, simply list uiautomationcore as a library link by name only,
which shifts responsibility of locating the .lib/.a when consumers
build to the linker, as is done for all other Windows system libraries.
This ensures that the library is found correctly regardless of which
system Qt was built on.
Currently this only applies to MSVC due to limitations with
uiautomationcore.a when using MINGW, where the lib is still dynamically
loaded.
Pick-to: 6.8.1
Change-Id: I20011a51935af4093de83fff75efe2141da0655b
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit da367d0bffcd58a3217af937d767cf4f392d3c15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move one AND operation out of the loop, as it is only needed in the end.
Change-Id: I48adcd18c900654830a84813f26c95eee579b49d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fc947593ef78c92b67811ac14dae200b45b480ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Emojis would sometimes get an outline in a seemingly
random color. This was because the color run is not
initialized to the first layer. MoveNext() should be
called on the initially to move it to the first layer, so
the first layer we rendered would end up being a
monochrome version of the glyph with a random palette index.
[ChangeLog][Windows] Fixed an issue where emojis would sometimes
get an outline.
Pick-to: 6.5
Fixes: QTBUG-131587
Change-Id: I42c2828d66c6149cdb62c2b6271dfd49ca002db0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 51b584e6062e83e24950d5eccd826ea5a5b8af6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This comes at a price and it does not really make sense for
emojis.
Change-Id: I57148bff48a48bb81a03203626df25646c9acb6a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit fd9c9788f73cb088229701dd92443aa04005a4a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The C++ standard forces¹ us to overload the hidden friend qHash()
implementation instead of defaulting `seed` to zero. That doesn't mean
we need to reflect that technicality in the docs, esp. if it forces us
to deviate from the standard phrasing of qHash() functions to say
something about the default value of `seed` (which would, for a
defaulted argument, be shown in the docs).
Present the qHash() function in the canonical form to QDoc. This is a
(forwards and backwards) BC way to solve the issue. Going forward, the
correct fix should be to have qHash() functions call a private
hash(seed) member function instead, to fulfill the pointless
requirement of [1].
¹ [dcl.fct.default]/4, last sentence
Amends c2310f8e03.
Task-number: QTBUG-129574
Change-Id: I7890a0df092c9780601fc4c25e23d70d92db47e1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 27d792869b30721cecf493a54d89e9df6e75a6fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QAction object returned by QDockWidget::toggleViewAction() is owned by
the QDockWidget. QAction object is deleted when the QDockWidget is
destroyed.
Fixes: QTBUG-70171
Pick-to: 6.5
Change-Id: I279366209228c88241e3bf70c17c117a2bf91f40
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f5e127c842f4fad459d8abdfea8ae45025b6107f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We had input handling enabled as a precondition for setting focus.
This is wrong, we need to have the focus for toggle buttons
and other non-input things as well.
(Also toggle buttons act on spacebar).
Also selects a new active window if the window
that is active (i.e a dialog) is deleted.
Also shift + tab did not always work, fixed
to emit Key_Backtab
Fixes: QTBUG-130371
Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ef8bf4c2cf3d86a869ff8a555d4e390168864144)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
87d8ee755b changed the logging behavior
on Android to use the category as tag. But it was missed that
`formatLogMessage` only fills the fields given in the messagePattern.
Our default messagePattern includes the category but on Android it
is never filled since this change.
So we change the default messagePattern on Android to omit the category
and only use the category as tag when the category is not given in the
messagePattern.
Pick-to: 6.5
Task-number: QTBUG-94708
Change-Id: I80f65d0f7f8c0ca9c2fff2dcd63d4599848b6e2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 709bc29a1d2abf40bf3f1c067fe3b96b6e0c09d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As a drive-by replace calls to QList::append with emplace_back,
to avoid repeating value_type.
Task-number: QTBUG-115841
Change-Id: I027d82706f3545dd63c6b8ba89ba66ae938e07f9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6ed725b3b93d15a45501fecb6f1fa711ef65e17e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Briefly sketch the new features in std::chrono and how Qt now provides
access to them.
Task-number: QTBUG-128837
Change-Id: I99a94ac9d0ed292ec9e3b0057ba6a9e2092200ed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 856aaa4c0c4992b3be57c0a6c5ccb81dd6ea8b86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've encountered that under some circumstances DecryptMessage may
return undocumented SEC_E_DECRYPT_FAILURE status. It's probably a bug
in Schannel on Win 11, as there is no such problem on Win 10.
In such cases, since we didn't handle this specifically, we can end
up in an infinite loop in TlsCryptographSchannel::transmit() when
`intermediateBuffer` is not empty and `bytesRead` is 0.
To fix this, we just add SEC_E_DECRYPT_FAILURE status handling and
will disconnect from the host and emit the error respectively.
Change-Id: I340669a967be420c74cb01296629f94c4720c958
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ed0eb386dad22b0984151b92168dcbf9b57c381b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were some syntax or links that javadoc doesn't
recognize and throws an error about, this fixes all of
them.
Change-Id: I301ec22bc14c2e41e3253222efbb38c3c2c9eeba
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 1fa1ceeadc7bd0db051e82429bf8791d9a82c4e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It takes some time to display the keyboard. For this reason, in case the
keyboard was not displayed yet - we could wrongly assume that the
keyboard is hiding. To avoid this situation, there is a new check.
In case the keyboard has just been opened and it is not displayed yet,
the execution of HideKeyboardRunnable is postponed to give time for the
keyboard to be displayed.
Fixes: QTBUG-130000
Change-Id: Iee1310c777ebbb807990bf3cec39e6d07481dfad
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4de9b94042dd173c6db31a4641a1513a9b319a79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move implementation for checking if keyboard is displayed on the screen
from QtInputConnection to QtInputDelegate.
The QtInputDelegate class is responsible for showing/hiding the keyboard
and handling its visibility. Moving mentioned implementation there seems
reasonable. Also, this implementation will be used internally by
QtInputDelegate in the future.
Task-number: QTBUG-130000
Change-Id: I47cf8e8fb2ee9bea535b9e009dd4b43b28f19b80
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 229cff37c0b6f822e9c22734e66d8ce117723d22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For Android above API 30 we can directly just check if the keyboard is
visible. We do not need to calculate it size. This is useful as
floating keyboard has wrong size.
Task-number: QTBUG-130000
Change-Id: Ia91d8b9ddefc97f8d65a657aa7e75bb146feb00e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit d97bfafa86e752cc3a739d8efb749ddea2120ca5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This part of code seems to be really old.
Unfortunately in newer device the Navigation Bar is bigger than 100.
So when Navigation Bar is visible - we assumed that keyboard is visible.
That is why this part of code is "dead" for devices with higer resolution.
To make this solution more flexible, we need to rely on the screen size.
Task-number: QTBUG-130000
Change-Id: I387fe58b4c6d22de83394cc8f51c75e7a55e72a1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit 34d184911eac07c97f44e87de27f7e37a4ebda81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We get a local reference from New*Array, and then construct a QJniArray
from that, which will create a new global reference, without deleting
the local reference.
Instead, go through QJniObject::fromLocalRef, and release the local
reference also in case of failure.
Change-Id: I88108315240133369efab30e55fdbea17a17a26d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
(cherry picked from commit 37638c84efaf2810ad49da0b987f19287d8c4ad6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>