The deprecations aren't urgent, and allowing more time for users to
adapt is appropriate. In addition, also suppress the deprecation
warnings when compiling the related autotest.
Resulted from API-review.
Amends: 577946c1f05aaaa2a3f9682001aeb4144386b26b
Task-number: QTBUG-132090
Change-Id: Ia0c07ab510a9a9c8722892fcd94f58f6ec287059
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 0aa07ce77237dacc58de5939d5a239fb8997da7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The y position for the MDI subwindow icon was not calculated correctly
so the icon was not painted vertically centered.
Pick-to: 6.8
Task-number: QTBUG-130673
Change-Id: I5f9023820a4e4b4288017869ac4088fe2669ce50
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6e29a94b547fbafa69e97ac02aeb33edad63f2ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... instead of QScopedArrayPointer.
Less Qt code (which we're supposed to test with this library) and more
consistent with the tuple implementation.
Also makes the header clean w.r.t. upcoming QT_NO_SCOPED_POINTER.
Pick-to: 6.8
Task-number: QTBUG-132213
Change-Id: I3705b8db89e909e3f1e37ad6a31aaba6f9af899a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f405925829ca37af47ecbb291bdb8a95a606e024)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The adjustment for the textrect was wrong - the bottomRight point must
be moved by -1/-1, not 1/1.
Pick-to: 6.8
Task-number: QTBUG-130673
Change-Id: I6c099fdd9a03188e7a5c7852b1912ed9b2801f7a
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2c85e5d22215f24bd46d07a1183393e52702493f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix the style and use PainterStateGuard instead own save/restore
functionality because PainterStateGuard is already available and used in
those functions.
Pick-to: 6.8
Task-number: QTBUG-132187
Change-Id: Ie454b6cffe03444d88f13d15adb19a7e7783a493
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1fb86f1f84bb56dab60bc15604c09a14157d6f10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The lcQtGuiTest category is only used in qtestsupport_gui.cpp, so
declare it there as a static logging category.
Addresses header-review comment, amends
5ac4f04325a56d47812f528fe31ceb0d4932f664.
Task-number: QTBUG-132090
Change-Id: I5b2a93822a698f55c52c1be87ebf8a689f49e2a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit b957dfc6e06deed64e20e8eee5d2164250b28b95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So they be SFINAE-ruled out when either the key or (for associative
containers) value types don't provide their debug-streaming operators
either.
Amends 850d4895be565931d18c92e5e2f9a33b7f26de6d,
0c96528e8d43ad4309bdca14b179a5045984655a,
a9fe57fefaac0cb047e4c02e0b8c8f8327e0a58c.
Fixes: QTBUG-132104
Task-number: QTBUG-130290
Change-Id: I1d6703b1fdf6cfd03799fffd33191d8028ecc123
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 8f958a6e2dcff5bb9b01442a19f5605f357c6e7e)
This function re-executes the query used by QSqlQueryModel and refreshes
the data from the database. The query must not use bound values as these
values are not preserved.
[ChangeLog][QtSql][QSqlQueryModel] Added refresh() to refresh the model
data from the database.
Task-number: QTBUG-123603
Change-Id: I3f1d779e07b88565abe825c31cfc4d7d1b2312c4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1bd883dbc15c4016f78d421afac2ac9f31ec4874)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QSqlDriver instance is directly bound to a QSqlDatabase object. But
there was no way to get the QSqlDatabase out of a QSqlQuery/QSqlDriver.
Fix it by storing the connection name also in the driver during
creation and add a getter for it.
[ChangeLog][QtSql][QSqlDriver] Added connectionName() which returns the
connection name of the associated QSqlDatabase instance.
Task-number: QTBUG-123603
Change-Id: If78b85413cf6ca965ff6bf9f3600cb54169b5569
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5b07e3de3fe5335d9338c65ca40cfe656a389167)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we're calculating the width of the layout, we include the
right bearing of the last character in the text line if it is
negative (i.e. it exceeds the advance width). We do this by
storing the last glyph that has been verified to fit in the
line, so that we can retrieve its right bearing when we find
a break.
However, when we were wrapping on spaces this previous glyph
would always be a space, and the right bearing would
subsequently be 0. But then the trailing spaces would be
trimmed and the right bearing of the actual last glyph
would not be recorded and never added to the text width.
This caused a failure in tst_qquicktext on Windows with both
DirectWrite and Freetype: This was purely unlucky, because
the metrics of the Tahoma font happened to be such that the
right bearing on the 'k' was enough to cause a line to
overflow. Since we didn't account for it when setting the
width, we ended up with unexpected line breaks, causing the
test to fail.
This did not happen with GDI, since it rounded the right
bearing of the character down to 0 (which was actually
visible in the layout, in that the k was painted a fraction
of a pixel outside the text layout's width).
In addition, QTBUG-130313 was causing us to pick a different
font when resolving the non-existent font requested by the test,
so therefore the bug was not found immediately when moving to
DirectWrite as the default but only when QTBUG-130313 was fixed.
We fix this by
1. When adding a chunk of whitespace, we record the previous
non-whitespace glyph that has been verified to fit.
2. When adding a chunk of non-whitespace, we only record the
previous glyph verified to fit *if* it is not whitespace.
Otherwise we keep whatever we recorded before adding the
spaces.
Pick-to: 6.8
Fixes: QTBUG-132075
Change-Id: I8d9a2f3197068f5f93520d217a6bb89633644e95
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 250117086ff15bba79df8f0e15ee66192edc9ea9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A common source of issues is that people do not consider that
fonts can have fractional metrics and use QFontMetrics for UI
purposes, causing bounds and eliding to be inaccurate.
This is not very surprising, since the class name sounds very
much like what you should prefer by default and the docs
didn't even contain links to the QFontMetricsF class.
It might make sense to deprecate the class, since it really
does not serve any useful purpose, but for now we at least
document the issue up-front so that users can easily find
the alternative.
Pick-to: 6.8 6.5
Task-number: QTBUG-132102
Change-Id: I69756c561e5dee448a9d0a7d85af1a9b15ff1ae3
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9a6036dea2cfe0cec555a503445aed93fed3d985)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Refreshing the global theme may be expensive for large scale applications, and even if Windows sent corresponding message,
it may be triggered by many reasons, not just the system theme,
so no matter what we'd better add an extra check.
Change-Id: I70847aa54fb4af37c81855a62330a4bce31ff104
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 9b924a4907a4a2b27ee52e807fd419caf219f655)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use structs derived from std::false_type and std::true_type instead
of boolean constants. This allows us to make use of std::conjunction_v
and std::disjunciton_v in the conditions, thus making use of
short-circuit evaluation and saving unnecessary template
instantiations.
Still keep the constexpr bool *_v constant for the cases when we need
a signle check only.
Amends 678e9f614bc5a05d2ff16cf916397998e7cdfca1.
Pick-to: 6.8
Change-Id: If2ab48ef910e97f241f5922d4108a271bc532f3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8784ea16a6bc66ac481d5cbf2dd1ece2d57a836b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QCocoaScreen uses removed APIs, which cause the code no fail compilation
with CMAKE_OSX_DEPLOYMENT_TARGET=15.0.
Adding a compile-time check to detect this early.
Task-number: QTBUG-128900
Pick-to: 6.8 6.5
Change-Id: I7eeb60f5769af6b1622efd1e0637e85a038b7930
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b6f3695a80f5abfbcfb0ebb5b03358b8e7bbbaf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The new \tm command appends a trademark symbol and links to the
trademark documentation page if `navigation.trademarkspage` variable
is set. As we have such a page in qtdoc repository, set the variable
in the global configuration. This works as all Qt module docs have a
dependency to the `qtdoc` documentation set.
Pick-to: 6.8
Task-number: QTBUG-124393
Change-Id: Iabc6e7e5afe5114eac79947f0feb512458f1c4da
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 429f565017f7213a91eb0cf43966b2148e0bb651)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no real reason not to be able to move a state guard.
Since a moved-from QPainterStateGuard must not have a restore-
level count, we have to implement the move-constructor explicily.
Add a test case, which verifies that we don't end up with an
un-balanced save/restore count, and that verifies that we would
trigger the Q_ASSERT if we do.
Address comment from header review,
amends 9ecf47a8a8d11227ecf192246d7df7c2c4dc9105.
Task-number: QTBUG-132090
Change-Id: I1db135bf48c0fa0a7bac4fdae7b7263c356b5eb6
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit ec3a5f4994a2bafc65fa8e01fb0861219580f622)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were mostly ignoring them because it looks like most people's options
were longer than their positional arguments. The rest must have just
accepted the enforced wrapping.
But if you have very short options like single-letter only ones or none
at all, the positional argument wrapping is unnecessarily short.
[ChangeLog][QtCore][QCommandLineParser] Made it so the positional
argument descriptions are taken into account in the aligning of text for
helpText().
Pick-to: 6.8
Fixes: QTBUG-131716
Change-Id: Ib1eee62c7cf4462f6a26fffdec233ba849ebf158
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 8928b0fbb9ca4caf9b63a32b3d2a73a6da096755)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It only contains qdoc blocks and wasn't even listed in SOURCES.
Also changed the license to be in line with QUIP-18.
Pick-to: 6.8 6.5
Change-Id: I2c90300ddfd47c3f693dc84cb86f326fa185dd84
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 1cdf813e221b5aa133bc85cb928e329ef1dea896)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][CMake] Private Qt modules have been split off into separate
Qt6FooPrivate CMake config packages. A call to find_package(Qt6Foo) will
now implicitly find_package(Qt6FooPrivate). It's not an error if
Qt6FooPrivate isn't available as it may be the case on certain Linux
distros that split their Qt module packages into private and public
parts.
For every public module Qt6Foo that has an associated Qt6FooPrivate
module, create a separate Qt6FooPrivate CMake config package.
Let Qt6FooPrivate find Qt6Foo. This is a required dependency.
Let Qt6Foo find Qt6FooPrivate if it's available. A message of log level
VERBOSE is issued if Qt6FooPrivate is not found.
Implementation notes: In QtModuleConfig.cmake.in, we pull in the private
module. This is not part of the *Dependencies.cmake file, because
1. The Qt6FooPrivate package references the Qt6::Foo target, therefore
it must be available. And Qt6FooDependencies.cmake is loaded before
creating targets.
2. The dependency needs to be optional, and we don't have facilities for
optional dependencies in Qt6FooDependencies yet.
3. We'd have to avoid recursion, because of the Qt6FooPrivate -> Qt6Foo
dependency.
Fixes: QTBUG-87776
Change-Id: I8f23f07da7ca76486f87b759e197174c11e13534
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit fbbf4ace0188b9718b6d7808021c0b887fd52d9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This auto-computes the string's length without a NUL-byte scan, and
also fixes a GCC 14 unity-build C++23 warning:
In function ‘constexpr qsizetype QtPrivate::lengthHelperPointer(const Char*) [with Char = char]’,
inlined from ‘constexpr qsizetype QtPrivate::lengthHelperPointer(const Char*) [with Char = char]’ at qbytearrayview.h:69:28,
inlined from ‘constexpr QLatin1String::QLatin1String(const char*)’ at qlatin1stringview.h:52:62,
inlined from ‘constexpr QLatin1StringView contextString(QXmlStreamReaderPrivate::XmlContext)’ at qxmlstream.cpp:814:90,
inlined from ‘void QXmlStreamReaderPrivate::checkToken()’ at qxmlstream.cpp:4018:85:
qbytearrayview.h:77:16: warning: ‘strlen’ argument missing terminating nul [-Wstringop-overread]
77 | while (data[i] != Char(0))
| ~~~~^
In file included from unity_0_cxx.cxx:412:
qxmlstream.cpp: In member function ‘void QXmlStreamReaderPrivate::checkToken()’:
qxmlstream.cpp:769:23: note: referenced argument declared here
769 | static constexpr auto QXmlStreamReader_XmlContextString = qOffsetStringArray(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends c4301be7d5f94852e1b17f2c2989d5ca807855d4, which was picked to
5.15, but didn't use QOffsetStringArray there (and unity-builds exist
only since 6.5), so only picking to 6.5.
Pick-to: 6.8 6.5
Change-Id: Ib50369aed6e8248fb88f43c7569c8a435c2b152e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 44366d07dca047f096d1366c43ba549c97150074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since some of the Qt opt-outs are defined project-wide by the
buildsystem these days (e.g. QT_NO_QSNPRINF, ...), a module that
attempts to use QT_ENABLE_STRICT_MODE_UP_TO will hit warnings
regarding re-definition of these macros (definition on the compiler
command line, redefinition by qtconfigmacros.h).
To fix, guard the #define QT_NO_FOO's with #ifndef QT_NO_FOO.
Amends bd7d54249e3f2b6a9dd6b759c892d7c97d26c0aa (which was also picked
to 6.8).
Pick-to: 6.8
Change-Id: I88276c9ed01edde1495105cf5bd1e07b1fd244f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 752de4a0aabc305af16251a55edf247e043b1b18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since some of the Qt opt-outs are defined project-wide by the
buildsystem these days (e.g. QT_NO_FOREACH, QT_NO_JAVA_STYLE_ITERATOR,
...), a module that attempts to use QT_ENABLE_STRICT_MODE_UP_TO will
hit warnings regarding re-definition of these macros (definition on
the compiler command line, redefinition by qtconfigmacros.h).
To fix, guard the #define QT_NO_FOO's with #ifndef QT_NO_FOO.
Amends 3a6c8e02b6d1b0574da52b0087092d0c74aa92c1.
Pick-to: 6.8
Change-Id: I457457d1e60dbd9362b987157ba089adc67d1d6b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0f416cbaaba46ddb039bbf33e1d70dbe80821d57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In preparation of adding QT_NO_SCOPED_PONTER, which would be rather
pointless for users if public headers continued to mention the type.
Pick-to: 6.8
Task-number: QTBUG-132213
Change-Id: I6539e83158ab34e4fa4bd22b6d0ac5629a3b6db9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b815c6f7fd71086c97fe6e9aa9472154be5fcc57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Passing an invalid index gives an assertion in debug mode and crashes in
release mode due to an out-of-bounds access. Fix it by appending the
given widget (same as passing a negative index which is documented).
Pick-to: 6.8 6.5 6.2
Fixes: QTBUG-130275
Change-Id: Id0c245e185acc36e5d07cea1d22619bb0e9eee07
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 0f9062ec71021c256dba7ee8498f036d7aac0821)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The arrows for horizontal scrollbars must be swapped in rtl mode.
Pick-to: 6.8
Change-Id: I517fcea19837a6438edc261e066930218b71ce28
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 02920ef05a980d9bb670e1f8a4b84e0b6cef13c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because they would break communication (or loop infinitely) otherwise
since we use the presence of bytes in the returned buffer to know if
there is still something we need to transmit.
Amends 4e60a6b556d91ab797aebb7422666a685a726755
Change-Id: If72c1a142d4567f69d78177250b0218c5ca999fd
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 1efcc0df6adab11e7239f5f12a13766a58e2c1ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The example configuration included a space character that caused a
syntax error parsing the .qdocconf.
Replace the hardcoded qhp `QtDoc` project name with a placeholder.
Pick-to: 6.8
Change-Id: Iadf3a50e030f02182016ed9832f4f59d29f82c57
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 4051ec3356bded10cd7ac66dc1149259bc48d36b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both widgets and Qt Quick Controls are unable to avoid accepting the
right-click events (press and/or release) in at least some cases.
In the Windows UI pattern of allowing the user to select something by
pressing (and maybe dragging) with the right button and then getting
a QContextMenuEvent afterwards, it's sensible for the code that does
the selection to accept the mouse events, because that code is only
concerned with selection, not the context menu. And in Controls,
Pane is accepting all mouse events just to prevent propagation to
other controls underneath. (That might not be so great, but we don't
have a better way yet.) In legacy Qt Quick, accepting the event results
in an exclusive grab; so in fact, Pane gets the grab, so we can't use
that either, as a way to distinguish "stop propagation" from "this item
is handling it completely, nothing more needs to be done". So it
doesn't make sense for QWindowPrivate::maybeSynthesizeContextMenuEvent
to check the grabber either.
Amends 357c64a99607456133bfabf86d6b67162717cb29 and
84a5f50c7766c99f62b22bb4388137e0aa8dd13d
Task-number: QTBUG-67331
Task-number: QTBUG-93486
Task-number: QTBUG-132066
Fixes: QTBUG-132073
Change-Id: I822cada05cfef27afe6a44faf170585f027061f7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 70c61b12efe9d1faf24063b63cf5a69414d45cea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a Qt dependency that the user cannot influence.
We did this in cfefce57a4ff446305cd1f839e7c5203bac7a6c5
with "GradleDependency" before. It is a Qt dependency
that the user cannot influence.
Pick-to: 6.8 6.5
Change-Id: I01ef84eab7ab743d5ea9eb15208ef9c567dd2a43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ab2a0438ef8b6cc2c73ab0f33d353d00c6599cd9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clean up the dead code according to TODO statement.
Pick-to: 6.8
Change-Id: I9bdf10067d3a1324d584cebc51cf4555f00f717a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 64435289027d53c9dace16eaa38087369fee6c4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QThreadPool's functions already links to the QThread ones, but they didn't
link back.
From the API review.
Change-Id: I02853d8110806f735b748d022a1cfaea5a72d603
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bbcf47a07d3ec138016d4f997c9b4849598c2f10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some http servers like to send RST frames whenever they send their response.
The stream is already closed at that point so it's a little weird, but the
RFC doesn't disallow it, so we'll just ignore the frames.
Fixes: QTBUG-132124
Change-Id: Ic26e249437b739830935e2f3feec572687579b21
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2c71fdf043ca94d1c567f169d51245e2702bec19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Piggy-back on the recently-added, type-erased, std::tuple stream
operator to handle std::optional the same way.
While std::optional doesn't support the Tuple Protocol, and we
therefore can't use putTuple() directly, we can still use
putTupleImplImpl() if we set up its arguments manually.
[ChangeLog][Potentially Source-Incompatible Changes][QDebug] The
std::optional streaming operator is now a member of QDebug, not a free
function. This breaks users that rely on the exact definition of the
operator (e.g. `operator<<(d, opt)`). A backwards-compatible fix is to
call the operator with infix notation (d << opt) only, and to avoid
const QDebug objects.
Change-Id: Ib040d65953ca9d3892aee5bdb597d6d30a9694b1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 08320bfe2b7387d6f488d405dddf9d3aba6434ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This appears to not have worked, ever, so add it as a new feature, for
view API symmetry, not as a bug-fix.
The new constructor is available for all compatible byte types,
because it is more like the (ptr) constructor (which is available for
all compatible byte types) than the known-size-array constructor
(which is only available for char).
This does not affect QB/QBV overload sets, since they could exist
ambiguity-free only if one of them is a Q_WEAK_OVERLOAD.
The GHS compiler doesn't like the CanConvert static_asserts, so
comment them out for it. The functionality itself is tested by
the fromArrayWithUnknownSize test.
[ChangeLog][QtCore][QByteArrayView] Made construction from arrays of
unknown size compile. Such arrays will use the const Byte*
constructor, determining the size of the array at runtime.
Task-number: QTBUG-112746
Change-Id: I201033656f123b09644e5de447cd5d7b038e5154
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 54d47f8390cb85c5b0f0ac050b5aa5a934d798b0)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When a compound widget is styled with a font through a property and the
default styling has no font settings, the font was not reset to the
parent font but left it the styled state.
Fix it by not resolving the current font when the style rule has no font
settings - use the parent font directly instead.
Fixes: QTBUG-131685
Pick-to: 6.8
Change-Id: I8e79423cfeff24143cd051b282503c4565125b4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5731fe051e48e7a256ef31ae93cfb89ce8d871cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Draw custom titlebars that are requested by setting the
Qt::ExpandedClientAreaHint with QPainter instead of GdiPlus.
- Draw the application icon, in case it was set, for the custom titlebar
- Add DPI awareness to the custom titlebar
Change-Id: I276e7d8948e5a436f1835d96b59756b7237f63d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 438aa1524ee99fd636dc02a7181857ade71bb101)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 4332cb313469de1525afe3cddd792d7bc7e08a14.
The original idea of distinguishing between context (outside/within application)
is not working anymore - it's always outside (except the moment when
a mouse pressed inside the window, which is immediately followed by
'outside application' context). So in fact we never ignore key
modifiers.
Fixes: QTBUG-132091
Pick-to: 6.8
Change-Id: I560a48ccf8f8ee1a55f812be6af18b1dd7e25c78
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7740ac36d27740ff9204cc2626f58620b7e214cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Looking at other similar Qt APIs, the type argument usually comes first.
The typical related examples can be QMessageBox() constructor taking
QIcon as a first parameter, and qFormatLogMessage() function, taking
message type as a first parameter.
This patch changes the order of arguments, so that MessageType enum
comes as a first argument.
Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480.
Found in Qt 6.9 API review.
Change-Id: Ibbdef755a8676a2c556fe7f1c95009ad51320b98
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 56114f4d1ed6ec26ff59a596caf09f5b4e0f5d68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As a drive-by: move the \since command in the showMessageAndExit() docs
to the right place.
Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480.
Change-Id: I4e6e6d63929029879867624e4007941edfca9cd9
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 6692beace9bb5f461d71935e500e1c6ccfa97fd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
7499fd0229d63f969bf6ca58d3b764b96395bed2 commit cleans up the localLibs
to not add dependencies to the libs.xml file as they will not be
satisfied.
Mentioned change created a regression with multi-ABI build. It happens
because in qtDependencies[ARCH] container, some libs just have different
atchitecture prefix.
This commit remove architecture prefix when checking libs in
qtDependencies container.
Fixes: QTBUG-131707
Pick-to: 6.8
Change-Id: Iae54779bfa4bd143ec35353604724d8ec4e35ef2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e59308c5119caac5d4f1024c7d8147e9887cb246)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And also add a trailing comma to the last element of the enum to
minimize future diffs.
Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480.
Found in Qt 6.9 API review.
Change-Id: I1a30c344967005c9abc73e59980e56626e09cd7c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 14cc2591ac06dbcee01c2b110e014db2993d7a1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The underlying QObjCWeakPointer used to track the view requires
a bit of bookkeeping, so avoid updating its value unless the
view actually changes.
Pick-to: 6.8
Change-Id: I6a1aeaf0e6e0eb221d55de00c8f30259832e58fa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2e80e74f37980f62bb915983e61d6734fb416bcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>