This reverts commit 4d5aedac1de02ec21bc6f4ae8c66e1e7bfc665a4.
It broke window activation on iOS somehow.
Change-Id: I01fc476d23a65f39aa33d9abd06417ffcd13b5aa
Task-number: QTBUG-125142
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
The Windows 11 style checks for QProgressBar type and gets the
respective orientation required for rendering. This creates an issue
when we use QStyleItemDelegate as it's not QProgressBar type. This patch
removes that condition and gets the orientation information through the
style option similar to Windows Vista style.
Fixes: QTBUG-124447
Change-Id: Ic2b36d79d7af017262e44dd2800ad45fbe63f8f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When using QWindows11Style, the viewports background has to be set to
Qt::transparent to have the effect of rounded corners in ItemViews and
Combobox flyouts. Other Windows styles do not make use of transparent
windows, so this polishment needs to be reverted in case the style
changes. Other styles also do not manipulate the
QAbstractScrollArea::viewport palette and thus changing color schemes
results in not applying the new color scheme.
Fixes: QTBUG-123928
Change-Id: Icb529124f63587e75bb56e40e8b1fcfe3c61c55d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 7d7d843a3eacf11d2e9e5c2dd596f6daa3ab46f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2141c7998ace98dbc4f2da283c6611055cdbc162)
The lengthHelperContainer() implementation for sizeof(Char) == 1 case
is using qstrnlen() for the non-constexpr case.
qstrnlen() is an inline function which is effectively a nullptr check
and a memchr() call.
For some reason, on MSVC this combination resulted in very slow
compilation for the user projects, where each call to
QObject::setObjectName() was hitting this codepath.
Fix it by replacing the qstrnlen() call with strnlen_s() for MSVC.
It seems that for now all versions of MSVC are affected. However,
introduce a new Q_COMPILER_SLOW_QSTRNLEN_COMPILATION definition,
which will allow us to check for the compiler version later on.
For now this definition is set for all MSVC versions unconditionally.
Fixes: QTBUG-124376
Change-Id: Id769bef1e950ffa756acf7af39d362fd8b112019
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d849cb80a4ba468e2c6097ebfcab384ddaec8e67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7faabcce1ad66e51a0f8ebbbe722591d6b220f70)
Commit 8d127c57376e48dd49afe62cfb8e714d26759a69 refactored this code
from QByteArray::split to manually iterate over the list (and
QStringTokenizer doesn't work for QByteArray), so we missed the last
element in the iteration.
Fixes: QTBUG-124580
Change-Id: I455fe22ef4ad4b2f9b01fffd17c867f6ed350af7
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 038c199d59ff5e9e16fe2a010f3f1f55764cf5ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some unix-like concepts are supported by VxWorks VSB layer - UTILS_UNIX.
One of such methods is getgrgid(). Include it in
`qfilesystemengine_unix.cpp`, so that we don't need to exclude VxWorks from code that uses it anymore.
Task-number: QTBUG-115777
Change-Id: I72b301647bfdb208cb6859bb0f9994e3537fc345
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 21196d26d84f0f9984308660714921aa17790bc4)
The high-dpi painting fix for the arrow painting was missing
QPainter::AntiAliasing flag so the rectangle had some artifacts with
certain (small) sizes.
Also there is no reason to move the center by 1 pixel to the top left
anymore now that we're using decimal values.
This amends 3936d254ca0e7259cd97238c31df8413d03fd475.
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8a34d7ed937db261ce652bd66234783fb3338cbb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 74e8f673b827c57ebf2bf802840c19e4a1ac848b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For security reason, Wayland doesn't provide global position for
top level windows, so topLevelAt is not supported.
Fixes: QTBUG-113404
Pick-to: 6.5 6.2 5.15
Change-Id: Id60b8b77a1843344db4d4e4c13382ad87adac806
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 10c3dd87d3bc2e84d4f477888622f5fc7ed5d502)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These reveal a roughly factor of six slow-down for two valid date
formats and a roughly factor of twelve slow-down for an invalid one.
Pick-to: 6.5 6.2
Task-number: QTBUG-124465
Change-Id: Ibd21e43d4c64aced33ba5b21e4602e0dc4fd7548
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 4467ebc837aded07b0b0cbc3b34ce67f2c0e96f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The existing data comes under Unicode-DFS-2016 but future updates
shall come under Unicode-3.0, so update the existing headers with the
former and the generator script with the latter. Leave a note in the
attribution file about this transitional state and how to resolve it.
Replaced UNICODE_LICENSE.txt from src/corelib/text/ with
LICENSES/Unicode-DFS-2016.txt, as fetched using reuse download.
This doesn't look like a rename but only actually adds some irrelevant
lines about where on the Unicode website the upstream files (to which
we do not apply this license) come from and changes some spacing.
Pick-to: 6.5
Fixes: QTBUG-121653
Change-Id: I50c9f4badc77a9aa402af946561aff58ae9e3e7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit d5e40b5e58c187086d7c23af1860c1af28957ccc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation of `QStyle::drawControl()` states that
"The widget argument is optional" so it must not be used
unconditionally.
Change-Id: I8b5a8ed421c0ae2c667925e448c9a029b6deedfd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 30061e8960eb9d8abb8a98270e3e92beef60d7d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow-up from commit 299dfe which added a similar update
for expose events. This fixes missing DPR updates for
exposed windows.
Pick-to: 6.6
Change-Id: Ic1a9a41bd979270b97303abb71f1230bff001d19
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 041ca2a3a818955ebcbbc0acd164138ffd561a6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Location keys are meant to be used as regular expression.
The . need to be appear as `\.` in the regular expression.
The JSON parser interprets the `\`, hence the `\\.`.
Task-number: QTBUG-121039
Change-Id: Ie3b8fb9686d59db13e5522309adbf3877bd2a3f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit eb87f7bcb98afccde315a10c5e26dc3485f5d92f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When adding/fixing parts earlier it was missed that it was not handling
the _unsupported_ case, when authentication is not handled and there is
no resend. But there _is_ a challenge header.
Pick-to: 6.5
Fixes: QTBUG-123891
Change-Id: I21470df0ce2528bad3babffc6e9f19b7afd29d20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4f9387f2aee19e38f05cab76a71f0d067b8d80dd)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
There was a discrepancy that the multi-arg arg() overload would accept
any number of digits in the placeholder, resolving up to value 999
(e.g., %000001 was interpreted as placeholder #1), but the single-arg
arg() overload only supported exactly one or two digits. The single-arg
behavior was documented, so use it.
[ChangeLog][Important Behavior Changes] The QString::arg() overload
taking multiple QString-like arguments is now fixed to interpret
placeholders like the other arg() overloads: it will find at most two
digits after the '%' character. That is, the sequence "%123" is now
interpreted as placeholder #12 followed by character '3' (verbatim).
Fixes: QTBUG-118581
Change-Id: I455fe22ef4ad4b2f9b01fffd17c767a948d41138
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f0f2a9ef2600288b16b69c135389dfe1fea89a8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were two of it. The "year-match-*" tests have two year fields,
one four-digit the other two-digit, and deal with whether they match.
The second year-match-1999 had, however, only a "yy" year format; it
in fact belongs to the "just-yy-*" family that follows. So rename it.
Amends commit 5108192f67042656afdb3508f8cc2563167fae97 which landed in
6.7.
Task-number: QTBUG-107185
Change-Id: Ibfe0c33cb00dc068d0f670d27c43ec4dc4550c05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de5c507a55097c08602f38062bf5291c9cbb4e24)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow-up to commit ae6186c7e8cfdb9420b9119f5affbba7d069598d
* require the feature in headers that should only be seen when it's
enabled,
* expose the auto-test to being run even when the feature is disabled
(the parts of that depend on the feature have needed #if-ery) and
* fix the Darwin-specific test's misguided #if-ery.
Pick-to: 6.5
Task-number: QTBUG-108199
Change-Id: I398cf44c33ffdcb4bb04f54a9d8ccfef68741e4e
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 98581c54fe729f8d30341ebbc0576ad5430df268)
As of Qt 6.7 we no longer return jobjects from that API. The declared
QJniType::Context type (and similar types) is no longer jobject-like,
they are now QJniObject-like.
Task-number: QTBUG-123900
Change-Id: I215f84ac37907ae2b7950c40c7287590234e4e35
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 7d9cedec6aca825ea9b2280c4e3f3e30a0b51ccd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We'd end up trying to takeFirst() from an empty QStringList.
[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
startCommand() to crash if passed a string that was empty or contained
only whitespace characters.
Fixes: QTBUG-124512
Pick-to: 6.6 6.5
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7689095c39272
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 60bdf2b220151021e59baa372a050b9f72400b81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We weren't doing the decoding from UTF-16 to UTF-32, so weren't catching
invalid code sequences
[ChangeLog][QtCore][QXmlStreamWriter] The class now rejects writing
UTF-8 and UTF-16 invalid input (improper code unit sequences).
Task-number: QTBUG-122241
Pick-to: 6.6 6.5
Change-Id: I83dda2d36c904517b3c0fffd17b42d17c637fdc4
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit c25541e9ac4c7021c69c600906e5ca8c80f18401)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were iterating over code *units* and that yielded wrong results. The
one from the bug report was simply caused by the fact that
QUtf8StringView::value_type is char, which is signed on x86, so the
expression:
*it <= u'\x1F'
was true for all non-Latin1 content.
But in attempting to fix this, I needed to do the proper UTF-8 decoding,
as otherwise we wouldn't catch non-Latin1 sequences and such.
[ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that caused the class
to fail to write UTF-8 strings with non-US-ASCII content when passed as
a QUtf8StringView.
Fixes: QTBUG-122241
Pick-to: 6.6 6.5
Change-Id: I83dda2d36c904517b3c0fffd17b42bbf09a493d0
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 94c62e322264e2e7d61193ae74ba8556a330385c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of repeating the full template expansion.
Task-number: QTBUG-124117
Change-Id: I40526efc4e93413794c3fffd17c4f9e200733660
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 11f242174b5b53a7052e9d6edc7b75aa8f8d91c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both sides of it were calling the same appendTo(), so we can avoid
repeating ourselves. This MAY fix a warning with VS2019.
Fixes: QTBUG-124117
Change-Id: I40526efc4e93413794c3fffd17c4f9c96ee187f9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 2e8c6d467fa245e8bcb81cff63d2d9628e1ee81e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When digesting CLDR v44.1's github form, some data (e.g. pt_BR's
language endonym) were None that had perfectly sensible values in the
zip-file form. Letting __find() yield INHERIT entries lead to find()
sometimes returning None, where __find() should have tried harder or
raised an Error.
This further amends commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0
(after commit 0f770b0b34bcb5fa0a598b2ff76fe215fbc25f5c isolated its
magic value).
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I1af92a687cd50b8fd026c25f068c804a3516ef95
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 43cb4136a92331d1137ddd7453e7bb4ca130ecff)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
The existing caller returns early on finding a match, so never ran off
the end of the iteration unless there were no matches. I'll soon be
adding a new caller that wants to iterate all matches, so will run off
the end even when there are some. So only raise the Error if we found
nothing.
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I1cae4674eb5e83c433554c15ecc4441b756f20eb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit c8b70f4e511e26c73a9da453f4c2b5624e66a2c1)
Giving it a symbolic name is clearer (and saves me the need to
duplicate the comment when I add some more references to it).
This amends commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I7577e0cde783fcda840009c7aea46934964c6e4c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 0f770b0b34bcb5fa0a598b2ff76fe215fbc25f5c)
We used to set a private _q_foreignWinId property on QWindow when
creating foreign windows, and this was the mechanism which we then
passed the foreign winId to the platform plugin.
With c585802e946d97e7d177ea334a162dc7bc286b84 this was removed,
since we now were passing the winId through via explicit QPA
APIs, and since 0c6911e5cde24c45d6f2c08b6e71064bdd1eccfa removed
the ability to explicitly destroy() a foreign window.
But when closing a QWindow, we destroy both the window itself,
and all its children, including foreign windows. In this case
we still want to support recreating the foreign window, for
example when the parent window is shown again. To enable this
we restore the _q_foreignWinId private property, but keep
the limitation of not being able to explicitly destroy a
foreign window.
Pick-to: 6.5
Fixes: QTBUG-124160
Change-Id: Ia885ba9f043e64fb21eedd2b4c344679726f1b5c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 988039729f55a5e62e32b82c6f29ff7457e91d9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pass the pointer to the current state, not a pointer to a pointer to it.
[ChangeLog][QtCore][QStringConverter] Fixed a bug involving moved
QStringEncoder/QStringDecoder objects accessing invalid state.
Amends 122270d6bea164e6df4357f4d4d77aacfa430470.
Done-with: Marc Mutz <marc.mutz@qt.io>
Pick-to: 6.5
Change-Id: I70d4dc00e3e0db6cad964579662bcf6d185a4c34
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 39bbfce9b675c9085ef49c9b9c52c146eca55e4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The color editor factory example is removed and part of the codes are
used as snippets.
Fixes: QTBUG-119985
Pick-to: 6.6
Change-Id: I421e473e7db09a5af7543b80b87a338d8ff2ab7e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4e1a1f3697563124588d7d00089b15084220ca42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a date string contains day of the week, day of the month, month
and two-digit year, it was still possible to get a conflicting result
in the default century instead of a consistent result in the next (in
fact present) century.
The actual logic needed to get the right year has to take into account
all date fields. This is all worked out already in actualDate(), so
delegate to it instead of trying to make do with just the year info.
Pick-to: 6.6 6.5
Fixes: QTBUG-123579
Change-Id: Id057128d8a0af9f3a7708d0ee173f854bb1a2a8e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 3e426182e2e8122d96b208702faaf3177f3a3081)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the Windows 11 style, it's better to include the headers for specific
widget types at the expense of compile time, than to pay a regular
runtime cost from using expensive inherits().
Add const, fix style, and break excessively long lines related to this
change.
Change-Id: I2c8c6d98267d9ff3542decda71e08e462cf9807c
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
(cherry picked from commit 96fcb4ef84bb7486221f04e53be8ee7218385178)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Subscribe to SettingChanged signal from xdg-desktop-portal to get info
when color scheme changes and update it on runtime.
Fixes: QTBUG-116197
Pick-to: 6.6
Change-Id: I7803ea76bc1ac0749d60ee55c1c0d9051dad210a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit a833d5682ac44571e13568336f2bd3ec7deb1d6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When CSS has been used to customize the text color, render the bullet
with the same color. This is consistent with web browsers, and with
Qt Quick rendering.
In QTextDocumentLayoutPrivate::drawListItem(), the pen color is the
text color, so use it instead of brush color.
Add a baseline test for lancelot: the background and general text
are customized, then some list items are customized further, and
some of them have colored text spans. Repeat with different styles
of numbered and bullet lists and checklists.
Fixes: QTBUG-2188
Task-number: QTBUG-213
Task-number: QTBUG-57833
Pick-to: 6.5
Change-Id: I71e84d00172e4b37aef57c8badd2ec43c10113d9
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 7f48c79627663f0777df9c10d06202aea5bedac3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the 20x20 margins will produce different layouts depending
on the DPR, which is not what we want.
Change-Id: I4153d0843ef51c8e0f60d7d5166b153d45201c95
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit a78938e0f686263540e06d923f2949169f3219e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The classic linker (triggered via -ld_classic) doesn't support this flag,
and we can't construct a genex that takes this into account, so add an
opt-out for Qt WebEngine.
Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b74369c03325e49132dc77f2a83af8fd25c81a8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Making it be carried more consistently.
Change-Id: I8d2da1264a59febbd44bbcff798b647ec2813bb0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 2d2fae48637d0aaa77cdd7dd413c40efec27a8a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QStyleSheetStyle::loadPixmap() might be called with an empty filename
but then it should not try to load a file with an empty filename.
Pick-to: 6.5
Fixes: QTBUG-123839
Change-Id: Ie01e9f75f025650b0802736bb589ebdc48e93696
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b773a4f5836b39e363899ad48a9f469e7f18db1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the Group Box Example from the repository, eliminating the
associated example codes, screenshot, and documentation file. The
only relevant portion used in the QGroupBox class has been relocated
to the existing snippet file. Additionally, all references to this
example across other files have been removed.
Fixes: QTBUG-119980
Pick-to: 6.6
Change-Id: I66f9dd9dab1fe64f2d20424af3acd135201827d2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f371f8a64dc76ec9ff07b666577b7ab47b69751d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Virtually all callers of this function (will) pass rvalues, so take
the std::function by value (reaping C++17 guaranteed copy elision) and
std::move() into the member variable ("perfect sink").
Like for many owning types, moves are much cheaper than copies for
std::function, because the external state is merely tranferred between
objects, and not copied.
Amends e560adef213301318dcc13d4db155624846e0420.
Change-Id: I269b54e51ba09ac595ac4e4f255209778819adad
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a56461883830cecf281b1d6db5e7d6103154d3d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
HttpTestServer::Handler is declared to take the first argument by
reference to const, not by value, so use the same parameter passing
for the lambdas passed to setHandler().
Avoids copying the (rather large) argument when invoked through the
std::function wrapper, and silences clazy-function-args-by-ref.
Change-Id: I726d0b98a7fcb3b1b33c5bde203035f593c39bdd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5b6c6dab632a32a09963453b08731e9e33334e9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move some deleteLater() calls to before the first QCOMPARE/QVERIFY
macros, so they get executed even if the macros return on failure.
This isn't an all-encompassing solution, but I lack the time to port
all this to smart pointers, and this is some improvement.
As a drive-by, port QVERIFY(opt.has_value()) to QCOMPARE(opt, nullopt).
Task-number: QTBUG-120307
Change-Id: Ia5a2cabd273a779938b22badc91b109fcc545203
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d4aaf61b3333b48b4e79ad60b63bb50dbea72617)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The accessibility implementations require the type to be fully
defined anyway in order to call type-specific APIs, so there's no
need to use inherits(). Use qobject_cast instead.
Change-Id: I5c013be57f48272a748451f4888911fe6aa6574e
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 3973d6c529605fbce8457d7663d244ebadbe7160)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QStringDecoder within std::optional needs QStringDecoder to be fully
defined ("in-size" (Lakos)).
QByteArray, used as a function parameter, can be forward-declard,
though ("in-name-only" (Lakos)).
This also makes the header comply with Qt's private symbol versioning,
which requires every private header to include some other private
header, or, eventually, qglobal_p.h.
Amends 4da14a67a6157c415f8228a8bae7d6b0f895df7c.
Change-Id: I35fed05955f1194299162b576834c1045672bcac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 96f78cbdd9412e6043bb4eb0d0dd818c5d800151)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We supported CSS 'border-width', 'border-style' and 'border-color'
for HTML tables since 8a9bec35fb0c60a0e5990c1a12ffe6f39fdbf2d.
Now we also support the 'border' property, which is shorthand to
set all four borders' width, style and color.
Fixes: QTBUG-123167
Pick-to: 6.6
Change-Id: I5f29b94ab9facf412a9c230d554efb5c69368b6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 26e75d452eeb2762fa3ece1c63e94d01587c6260)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid the optimized fixed-point function for vertical gradients if the
parameters are out of range for that. Fall back to the general
gradient function in that case.
Fixes: QTBUG-120331
Pick-to: 6.5 6.2
Change-Id: Idf116f0077403531d9ea414e3043fdc92b6fe4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ade33a91442f8085a7ddeb8e6fdf33463103b119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>