androiddeployqt has extraPrefixDirs to provide extra prefix paths in
addition to the main Qt install path, however, for some reason, it was
not being used.
With this, apps for Android using Conan can pass the Conan build prefix
for androiddeployqt to use it as well.
Task-number: QTBUG-88519
Change-Id: Iad73055ac6c03e3ffe86fca271dbda67ac29a275
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 00e726ce12431e8c3db8bc9deb8952f930a5a672)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
__qt_propagate_generated_resource used resourceName variable from
parent scope instead of one passed to function.
Pick-to: 6.0.0 6.0
Change-Id: I18ce8a9f9c01bcfdbab532def55af4e2780d7753
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QPoint(F) are "naturally" destructurable in their x/y
counterparts (hello Mac/Carbon users, we don't live in 1999
any more, it's x and then y, and not vice versa...).
[ChangeLog][QtCore][QPoint] QPoint is usable in a structured
binding.
[ChangeLog][QtCore][QPointF] QPointF is usable in a structured
binding.
Change-Id: I8718a4e80be4ce03f37f012034f1fba009304b32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We do not unconditionally clear focus_child like the existing comment
said. We only do it if the focus_child was the widget that is clearing
focus. So in many cases we'll end up with the same focus object as
before. We can not report that as a focusObjectChanged to the window,
as that will potentially trigger a reset or cancel of the current
input method for the (unchanged) focus object.
Fixes: QTBUG-86976
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I54367e46eda7a94d967f58960bd926c195dc09cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As noted by LCOV, the part with q_BIO_free(bio) was never executed
since we were taking the result from QScopedPointer before returning.
While it's a what RAII idiom is for, there is quite a low probability
that SSL_set_bio() one day will start throwing exceptions.
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Id24e480dac34166c627b71bb2972de558c644339
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
By simply extending the basic test to trigger qHash, isEqual and
a bunch of getters.
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Ib1d88fc6d2ad623743cea77ac286ae6ac819dfd1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When preparing a system tray icon on a system with a retina screen,
we end up creating a full-height icon of height 44. If there's also
a 1x screen available, macOS will scale down this image for us when
presenting the icon on the 1 screen, but the downscale will fail to
preserve the aspect ratio of the original image on Big Sur.
Telling macOS which device-pixel-ratio the image has seems to fix
this, and is the right thing to do in any case.
Pick-to: 5.15
Pick-to: 5.12
Fixes: QTBUG-88600
Change-Id: Ic31def94d073da1b256bbfcaf5905f92c169f43d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Testing seems to indicate building against the 11.0 SDK works fine,
and doesn't opt in to any new behaviors on Big Sur that Qt isn't
ready for.
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I7da11cf25f2be7443c94ba7a4e9cd99dc1034455
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Coverage analysis showed that QCalendar::YearMonthDate was not
rigorously tested. This patch adds a unit test.
Pick-to: 6.0
Change-Id: I0af485d13c4883764b61ea1e35455905cc77b966
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
QString::insert(qsizetype, QChar) can insert at negative positions,
then counting from the end of the string. Coverage analysis revealed we
do not have a unit test for this. This patch adds a unit test.
Pick-to: 6.0
Change-Id: I8d41b38df964c07fe2d2e7be444f8236c9e19b5d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
tst_qsslcipher was quite useless - now we test that default constructed
QSslCipher reports expected values. Test the non-default from the
different auto-test, where we are sure we have really useful
ciphersuites (with different parameters obtained from a TLS backend,
where it's possible).
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Iff14a0580fed889cf9e0873bee01d968773626db
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
To make them compatible with unique_ptr. Drive-by,
* add missing noexcept
* turn a `if (p) free(p)` into just `free(p)`.
Change-Id: I234dad6f6b953202dbc537875b94f653a09910fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... instead of failing the test. On Ubuntu 20.04 when calling
'connect' with 0.0.0.1 we get EINPROGRESS and nothing else,
since our own internal timer has 30 s. timeout, the event loop
in the test stops before this and no socket error detected yet.
Handle such situation without failing a test.
Fixes: QTBUG-88042
Change-Id: Id6add27fcf9bbbe5fbf83a193652edf08fbad8d6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Make sure ulonglong variant converts to a double JSON value when the
value is greater than 2^63.
Change-Id: I4d4392b05de29c220624056d5d0d4664fb2c08b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For shared build, Qt6BundledHarfbuzz.lib and Qt6BundledPcre2.lib are not
installed. But their pri files(qt_ext_harfbuzz.pri, qt_ext_pcre2.pri)
and debug info files(Qt6BundledHarfbuzz.pdb, Qt6BundledPcre2.pdb) are
still installed. These files should not be installed too.
Pick-to: 6.0.0 6.0
Change-Id: I3e54bec01d94ee3897b485a982d01b24edc602aa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
By depending on setFamilies() then we can be sure that font names with
spaces, commas, quotes and so on are correctly handled without being
misinterpreted. For now it will split on the comma when a string
containing one is passed to setFamily. But from Qt 6.2 this will be
removed to preserve the family string as a convenience function.
[ChangeLog][QtGui][QFont] Indicated that setFamilies/families is
preferred over setFamily/family to ensure that font family names are
preserved when spaces, commas and so on are used in the name.
Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
We've decided that QScopedPointer shouldn't be movable,
because it would break the semantics of being "scoped"
(the pointer/pointee won't survive the scope).
Then, QScopedPointer shouldn't allow for take() either.
If you need those semantics, reach for unique_ptr.
[ChangeLog][QtCore][QScopedPointer] The take() function
has been deprecated. This was an API mistake, as it
allowed the pointer/pointee to escape from the scope,
defeating the point of the QScopedPointer class. If you
need such semantics, use std::unique_ptr (and call
release()).
Change-Id: I3236f085f763b04eb98e3242abc06f7c54fb3d8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Updates due to newer compiler version in QNX7.1
Task-number: QTBUG-88300
Change-Id: If9bbc08d49a077d80174a1807e069b5d4ef61c0d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit ee122077b0.
Reason for revert: This causes QProcess::readAll() to sometimes
return nothing after the process has ended.
Fixes: QTBUG-88624
Change-Id: I34fa27ae7fb38cc7c3a1e8eb2fdae2a5775584c2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 23100ee61e33680d20f934dcbc96b57e8da29bf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Ensure the values are reasonable regardless of screen DPI. Velocity
is supposed to be in logical pixels / second.
Task-number: QTBUG-88252
Task-number: QTBUG-88346
Change-Id: Ic209887f8ed0381c033a9ff04ae48b072c444df4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If the input is out of range for the respective input type,
then fire an assert. Remove a redudant bitwise-and.
The constructors from char have been left alone: we are
documenting that QChar(char) constructs from Latin1 (!), not
ASCII/UTF-8, so all values are valid.
Change-Id: I55e261015d5efa0699c78c25e454f09bb17a913f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QString::replace(pos, len, *unicode, size) can handle positions
which are outside of the this-string. In that case, it is a no-op.
Coverage analysis revealed we do not have a unit test for this.
This patch adds one.
Change-Id: Id4a407e860fff0d5c7c0a200c379e5e3961c86d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Coverage analysis showed that an if-branch marked "Q_LIKELY" was never
taken. It turns out the code was incorrect, but behaved correctly.
This patch fixes the logic and adds a unit test.
Pick-to: 5.15
Change-Id: I9b4ba76392b52f07b8e21188496e23f98dba95a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This will ensure that qmlimportscanner can use the extraPrefixDirs,
when an extra prefix is provided like the case with Conan builds.
Task-number: QTBUG-88519
Change-Id: Idec3916b043822da094973a7e246a6ee4af14c83
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This should've been caught a long time ago, but long story short: it wasn't.
This has been deprecated since 5.14 and is now asserting.
Pick-to: 5.15
Change-Id: Iddee22b1a68e5d1a03006831f795db8ec1c472be
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This patch adds a basic fuzzing test for
QDateTime::fromString.
Task-number: QTBUG-87104
Pick-to: 5.15
Change-Id: Icc51386f06f6d4d2a4495734f7fa45de80c6e065
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
There were two custom module headers for Qt GUI under different include
paths. Combine them into one.
Change-Id: I8b699d82820bee36a9ce8c384b94d1b99305e177
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
- Remove obsolete dependencies and references.
- Restore previously deleted snippet code referenced in
richtext.qdoc.
- Add widgets snippets path to exampledirs; some classes
were moved from QtWidgets to QtGUI and related \snippet
commands were broken.
- Mark internal functions under QNativeInterface::Private
as \internal.
Task-number: QTBUG-86295
Change-Id: I9c165c860c7191dac65972d702698a1745bff77f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QMatrix4x4(Qt::Uninitialized) does the same thing.
Change-Id: Ie226690f417505f082cb69fdb476e34db2b19c15
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In random order:
* Remove code marked for removal in Qt 6.
* Inline as much as possible. This should give us a massive
speed boost in some simple operations where the function call
overhead as much as the cost of body of the function itself
(lengthSquared, dotProduct, etc.).
* Plaster constexpr and noexcept, as much as possible; follow
Lakos' rule.
* Unexport the classes; selectively export only the symbols
still defined out of line.
* Add [[nodiscard]] to any non-trivial mathematical operation
(e.g. calculate the length).
* To avoid circular dependencies, centralize their implementation
in one file. Leave the existing headers for compatibility with
existing #include statements.
* Change all the signatures of the classes' members to take
QVectorND, QPointF, etc. objects by value, not by const ref.
Usage in other classes (e.g. QMatrix4x4) has not been adjusted.
Change-Id: Iaf5a4b5289fcdf704e77656793390b8e772e94a5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This was so far problematic as it gave various link errors. The solution
to that seems to be to make the default constructor of QPairVariantInterfaceImpl
constexpr to get around one set of problems.
The other problem to solve where undefined references to metaobjects. The
reason for that is apparently that QMetaTypeInterface contains a direct
pointer to the meta object, something the linker doesn't like. Adding a
level of indirection by using a function that returns the pointer seems
to solve that problem.
Fixes: QTBUG-88468
Change-Id: I5612ae807ea3b7e49bc40349d8d1fca1be9bd7ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
For bases other than 10, negative numbers have been converted
to QString by casting them to an unsigned number and
converting that. Thus QString::number(-17, 16) returned
"0xffffffffffffffef", for example.
This patch changes the behavior so that
negative numbers are converted like positive numbers.
Additinally, this patch adds unit tests for QString::number.
[ChangeLog][Important Behavior Changes]
Changed QString::number(integer, base) for negative numbers
and bases other than 10 to return the string corresponding
to the absolute value, prefixed by "-".
Fixes: QTBUG-53706
Change-Id: I0ad3ca3f035d553860b262f5bec17dc81714d8ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QTzTimeZoneCache created one cache entry for every time zone
which was looked up, even if the code was invalid. This uses some
memory for each time zone code queried and thus allows DOS attacks
if user supplied time zone codes are parsed. This patch changes
the cache to use QCache instead of QHash and thus only store up to
100 zones in the cache.
Change-Id: Ia87fe500b8b9cf23dced5448a33b047702515f19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In general the protocolHandler isn't deleted unless
the channel is being destructed. So instead of reset()ing
the pointer we keep it around.
Also update the http2protocolhandler to mimic the http1
handler a little closer: shutting down the channel in
receiveReply if there's no reply/activeStreams, and not
calling receiveReply at all if there's no activeStreams.
Pick-to: 5.15
Change-Id: I702547f594deb6b0c1384068f7e93e560527e8e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If more than one signal parameter required conversions (e.g. 2
QVariantMaps), then the auxParameter list would be reallocated on the
second append. This resulted in the reference to the first conversion
(stored in params) to be broken.
Found with valgrind after the QtApplicationManager started crashing
weirdly when built against Qt 6. The same code is in Qt 5, but it
just works fine there: I guess the reallocation strategy in QList is
different there, so we never have to reallocate the list.
Change-Id: I2e0c8906ebc9474c4ec9f53cafc1689003d5c4c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With TLS 1.3 the client goes through renegotiation
when using Schannel. The status returned is OK and
we can immediately continue, so do that.
Change-Id: I831eaae318df9d94b5fb7672db7e407d94f9da56
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>