It's not _wrong_ to time out when connecting to something unreachable
(it's just a different way of handling it) so we shouldn't fail when
this happens either.
In local testing (windows) it times out after 8 seconds, so bump
the timer to 10 seconds. On systems where it's faster there'll be
no difference as long as things don't go wrong.
Pick-to: 6.0
Fixes: QTBUG-89089
Change-Id: I8437cf8e4fbecedea2391ed87fdce1213085b964
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Use number-based naming of object libraries produced for generated
resources. This reduces path length of subdirectories for object
library targets.
Amends 08eb485a006dc2baca42eb280ae60e9f0fc00dff
Pick-to: 6.0
Change-Id: I1a449290e8a9b969601a1cc1abc6fdcfc0cd9454
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Documentation of QStringTokenizer was broken, mainly because most
parts of the interface were defined in base classes. This patch
gets those members into QStringTokenizer itself in order to document
them.
Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Id00a79db4b293958a9c5ed53a518a97721d228c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The method QApplication::desktop() was removed. This patch removes
a line mentioning it in the documentation.
Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: I123e41c342d64da347b9bd59378e52a8e0301c1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The documentation of ignorePunctuation in QCollator did not strictly
follow conventions, leading to warnings in building the documentation.
This patch fixes this.
Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ia1273ec8e440099afe729b54423760ad5ac26290
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMake libraries that contain dashes are referenced by QMAKE_USE as is,
but the corresponding QMAKE_LIB_<NAME> variable must be normalized to
contain underscores.
Example from the qmake build:
./mkspecs/modules/qt_lib_waylandclient.pri
11:QT.waylandclient.uses = wayland-client xkbcommon wayland-cursor
./mkspecs/modules/qt_lib_waylandclient_private.pri
12:QMAKE_DEPENDS_WAYLAND_CURSOR_CC = WAYLAND_CLIENT
13:QMAKE_DEPENDS_WAYLAND_CURSOR_LD = WAYLAND_CLIENT
15:QMAKE_LIBS_WAYLAND_CURSOR = -lwayland-cursor
Pick-to: 6.0
Change-Id: If31bd45764d52f97d80d6388503008dc1ffb16ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The enumeration value was deprecated by
qtbase/f15aa1fd84e46dfc4d9a78b3a7ba482e42abd9c1 and removed in Qt 6.
Pick-to: 6.0
Task-number: QTBUG-89093
Change-Id: Iaf46adc1e1bd79e4aaab066c9fa4bf84a8ee34d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
moc's preprocessor needs to implement certain math operation to
correctly handle #if conditions. Unfortunately, its implementation is
not overflow safe. However, those are rare enough in practice that we
in general do not need to care about them.
This patch adds a workaround for one case where UBSAN run into an
overflow related issue.
A complete fix would require to make moc spec compliant (do math with
std::max_(u)int_t operands; always wrap on overflow) in all operations.
Pick-to: 6.0 5.15
Fixes: QTBUG-88825
Change-Id: Ic4d2cb097db2fa2f9d4681bbaab3068eaa2745aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We should return the result of the call of the base implementation for
all events that we did not handle. Also, QObject::event() does not
actually activate any filters, so the comment was inaccurate as well.
Change-Id: I9eb2f9a93a6b53a1afd035433615bcc0ee8cbf2c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Merge the exact and and fuzzy search loop. This way we prioritize
translations which match a more preferred language loosely over ones
which match a less preferred language exactly. This is likely what
most users want.
Pick-to: 5.15 6.0
Fixes: QTBUG-86179
Change-Id: Id1610c82a2e77edf9a5d4417968dcc4c307810d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Just to be consistent with everything else.
Change-Id: I48ceb4bbc1cbf65b03caee77b7405cb585793248
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The codepath using unordered_set forced the usage of std::hash,
which isn't provided by many Qt types. Instead, use the
brand new helpers in QHash that dispatch to qHash with a fallback
on std::hash.
Change-Id: I9185fe9c52de05c470afe7466007591977e65bb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When matching over a QString we store a (shallow) copy of it.
That has always been an implementation detail and people should've
never relied on it, but Hyrum's law, we don't want to actually
exploit this by NOT taking the copy.
Converesely, matching over QStringView already requires that
the string data is kept alive as long as QRE(Match) objects
are alive.
Add a doc note to give us the freedom to do the change in Qt 7.
[ChangeLog][QtCore][QRegularExpression] QRegularExpression takes
a shallow copy of a QString subject when matching over it. This
means that users can destroy or modify the string data while
still having match results over it. This behavior is deprecated;
in a future version of Qt, QRegularExpression will no longer
take a copy. Note that behavior has always been undocumented and
users were never supposed to modify a subject string while
match objects were alive on it. In practice, it's very unlikely
that your code is relying on the existing behavior.
Change-Id: Ibc5f900c09a007139fb12fc4d7f11e4a8f31bf38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The situation was quite inconsistent. Use the attribute more.
Change-Id: If21817b4c2ea1148ad4ad80e7a50fab721a58b65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unlike QWidget-based application, a dialog displayed in QML app doesn't
have QWidget parent, so it would be centered in the current screen.
Let's fall back to transient parent window if widgetParent() is missing.
It's tempting to rewrite adjustPosition() to not depend on QWidget at all,
but that seems not easy. Lookup path of window() and transientParentWindow()
is slightly different for example, and QWidget::pos() is used instead of
mapToGlobal({0, 0}) if the widget is embedded into a native window.
Fixes: QTBUG-63406
Change-Id: If72d90aee8d972240243184de4d3c09d77f704ff
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Add test for qRound that covers some edge cases for rounding. Note that
as of right now, this test fails and the docs have been updated to warn
that it should not be depended on for strict correctness.
Change-Id: I1a61bca47abd77855fe7c13ded44e913cc7e8722
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Documentation for QSet::insert was wrong, leading the warning
qset.qdoc:510: (qdoc) warning: clang couldn't find function when parsing
\fn iterator QSet::insert(const_iterator it, const T &value)
This patch fixes it.
Task-number: QTBUG-88533
Change-Id: I587cbae5674b9f38e37753a20c3c3f0d770980d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When QMultiHash derived from QHash, it inherited the clear function
and no separate documentation was necessary. Now, QMultiHash::clear
needs its own documentation. This patch adds it.
Task-number: 88533
Pick-to: 6.0
Change-Id: I93c59b66aa3d8ccf1888b6e24a4cc47004318e37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Which contains a lot of 'macos'/'osx' black-listed auto-tests. They
mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate()
does not like our old certificate. Instead, since SecureTransport
is deprecated anyway and we are not planning to develop it in future,
skip the related auto-test depending on QT_CONFIG(securetransport).
Task-number: QTBUG-88943
Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was blacklisted due to the issue there. The issue is resolved, but
the blacklist stayed.
Task-number: QTBUG-88943
Change-Id: I7d9a660a17c1463dd8b654752ed5787fe5f5af24
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Which is probably the direct port of -nomake XXX, as qmake
always offered the way to build tests/examples/etc. after
configuring without, while cmake doesn't.
Pick-to: 6.0
Change-Id: I85b039e56cde3ddfaf661385100d3c3a8cc2ac16
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If the first font in the families list happens to have been
disambiguated because of duplicates, two things went wrong:
1. hasFamily() would return false for the font family, because
it does not disambiguate when checking for the family name and
only checks if the families list contains the exact string.
2. Adding aliases to the full disambiguated string is not supported,
only the family name.
The first issue has been reported separately as QTBUG-89068.
The test failure is fixed by just avoiding the fonts that
are ambiguous in the test, as it really doesn't matter which
font we pick.
Fixes: QTBUG-89008
Pick-to: 5.15 6.0
Change-Id: I829778c2e7bb6090475c34dcf9cdce58862729d6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Use a trick similar to the one we use for their ranged
constructors: support predicates that either take a
container's iterator, or that take a std::pair (for STL
compatibility).
[ChangeLog][QtCore][QMap] Added removeIf() and erase_if().
[ChangeLog][QtCore][QMultiMap] Added removeIf() and erase_if().
[ChangeLog][QtCore][QHash] Added removeIf() and erase_if().
[ChangeLog][QtCore][QMultiHash] Added removeIf() and erase_if().
Change-Id: Ie40aadf6217d7a4126a626c390d530812ebcf020
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The scope of the variable 'frm' can be reduced if the variable
'd->formatExplicitlySet' is true. So declare the variable when
the variable 'd->formatExplicitlySet' is false.
Change-Id: I27cea412af827d30ad9188106b7f14025e5ddb68
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We must not pass null pointers to memcpy.
Pick-to: 6.0
Fixes: QTBUG-88780
Change-Id: Ic1d77b4672310a3f6d0d4fbee5f2889e3e4d219d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
As a requirement for unordered_set (and QSet) both "iterator" and
"const_iterator" are const, so we cannot reassign or move the key.
That means this overload is no different to the const & overload, so
we can just remove it.
Pick-to: 6.0
Change-Id: Ia14dccf7f610967649bab38161ce6d963509316b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Previously we only checked if there was something in the h2 queue or
if we had not yet switched to http2. These means in some cases that
following an error it would enter this branch and, because it had not
yet switched to http2, it would call 'ensureConnection' which would try
start a reconnection. This could make the proxy socket engines try to
emit 'auth required' with no replies, meaning nothing happens.
Fixes: QTBUG-88417
Pick-to: 5.15 6.0
Change-Id: If37b8c71ac36597adc305fb1b1ea4fa7b48b0d28
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The requests will remove themselves once they get deleted
but since the deletion is done through a _queued_ invokeMethod
to 'deleteLater' we will call
QHttpNetworkConnection::_q_startNextRequest first which may
end up starting a reconnect of the TCP socket which we had the error on.
In this specific instance it manifested as a race condition where we
either don't get a proxyAuthorizationRequired signal at all (it was
emitted while we didn't have any valid replies), or we get the signal
emitted too late and it gets emitted on whatever the next reply was.
Task-number: QTBUG-88417
Pick-to: 5.15 6.0
Change-Id: If3f8ececc5550f1868c90124559cb8e3029646d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We already have all we need in QHash to support this, so the addition
is simple enough.
Add test checking how many copies and/or moves are needed for a single
insert.
As a drive-by: remove some unneeded static_cast
Change-Id: Iaf768657644afa45f78f5c81ffcf89ba9607be96
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Current description was confronting the general description of the
class, which states that prepend() is fast.
The updated description gives more information about the method's
behavior in different conditions.
Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I7b6dfb536d143d78c441214f83320c1bf1263e0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QXmlSimpleReader was moved to qt5compat. In the qt6 migration guide, we
would like to point to it. This patch adds qt5compat to the dependencies
of QtXml documentation in order to be able to do this.
Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ifaad595862b80d31310ed594e21168cec56133a0
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
The example was renamed in 6cb36d825d.
Pick-to: 6.0
Change-Id: Ic9daac60002c9988dfeb5c7dcde74edb69388f37
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
In preparation for the next changes.
Change-Id: Ibe0635dfa040842073749aa3e2ae140f27dc983a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QEventPoint instead of TouchPoint: we have source compatibility for that,
but we can use the new type to avoid the deprecation warnings.
Some position accessors have been renamed too.
Change-Id: I5bfe5bc853931127a883d2bd61fab122495fd427
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][QtCore][QSet] Added erase_if() for consistent
container erasure. Added removeIf() as a method.
Change-Id: I4af57b654036aa08bee3f769ab2f60be37115094
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is refactor/revisit for Qt 6 of the original commit [1]
by Marc, limited to QList and QVLA.
[1] see 11aa9a2276ba5367adbbd96d0ba13111d58145f8
[ChangeLog][QtCore][QList] Added erase() and erase_if(),
for consistent container erasure. Added removeIf() as a
method, complementing removeOne() / removeAll().
[ChangeLog][QtCore][QVarLengthArray] Added erase() and erase_if(),
for consistent container erasure. Added removeIf() as a
method, complementing removeOne() / removeAll().
Change-Id: I2499504e221431ead754dd64cc8a4d4e9f116183
Done-by: Marc Mutz
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QProcessPrivate::tryReadFromChannel() returns 'true' only if we emitted
readyRead() signal on the current read channel. Thus, these additional
checks are unnecessary.
Change-Id: Id98620cd08ee8808f60539c009986b869e517ef0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>