Commit Graph

61079 Commits

Author SHA1 Message Date
Amir Masoud Abdol
ed85df8008 Improvement to NO_UNITY_BUILD_SOURCES, and fix related bugs
The source of the problem was in `qt_set_target_info_properties` which
was not able to process the NO_UNITY_BUILD_SOURCES, and therefore
leaking it into the `TARGET_COPYRIGHT`, ie., the last argument. So, I
decided to pass Unity Build arguments before them, and closer to
SOURCES, which is nicer to read, and avoid similar situation. And
I reverted the work around in the amend commit, and passing the
arguments normally.

This happens because we pass an unfiltered ${ARGN} from
qt_internal_add_executable to qt_set_target_info_properties and that the
current change is merely a workaround that ensures they get
circumstantially filtered out, because the NO_UNITY_BUILD_SOURCES option
appears before any of the first TARGET_ props.

Amend cd12c1f332

Task-number: QTBUG-99238
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Idb37937cf53e708425402c90f55bda8816e27f29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-03 10:41:13 +00:00
Alexey Edelev
4105ff809c Avoid syncing and installation of non-module headers
Add CMake rules to skip syncing and installation of header files
that are recognized as non-module. Previously these rules were in
syncqt.cpp only and CMake ignored them when creating the installation
rules. Now we skip any post processing for the header files that:
- are public and located in the '3rdparty' directory unless the module
  is the 3rdparty one
- are not a part of the module source tree unless they are generated
- have the _qt_non_module_header property set to TRUE

Pick-to: 6.5
Change-Id: I045cfc2b8074f0c086c975aae95f14845e3edfef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-03 12:41:13 +02:00
Ivan Solovev
7477dec2d4 QBluetoothPermission: support new Android permissions
Teach QBluetoothPermission to understand new fine-grained Bluetooth
permissions, which were introduced for Android 12.

Also request the ACCESS_FINE_LOCATION permission together with
Bluetooth permissions, because it is required for Bluetooth to work
properly.

At this point QBluetoothPermission simply requests all Bluetooth
permissions, because we do not (yet) have a public API to
distinguish between them.

Task-number: QTBUG-109964
Change-Id: I98d304eb59c238656d6a92917f611c3b3ba9e760
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-04-03 09:53:00 +02:00
Mikolaj Boc
d748bdadc7 Fix a copy-paste error in QWasmWindow
minimumSize.width() was used instead of minimumSize.height() for the
lower bound of height

Change-Id: I330ea79de8ba39a6c55f5ed9b3210f1ff7d10fb6
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-04-02 21:53:42 +02:00
Hamish Moffatt
eb8782cb2e QtConcurrent: fix warning due to assignment to narrower integer type
MSVC warns due to assignment of std::distance's return value (__int64)
to int when warning C4244 is enabled.

Pick-to: 6.5
Change-Id: I78360ec1bbe861b96d6875af3a29b77f419a3843
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-04-03 00:02:46 +11:00
Timur Pocheptsov
9ddd71a6c2 QIOSFileEngineAssetsLibrary: bail out early on non-existing dirs
QFileSelector::selectionHelper walks through the list of selectors
(on iOS, on my phone it's ("ios", "iOS", "en_NO", "unix", "darwin")),
creating paths and testing QDir::exists. This ends up in asset
file engine trying to load asset for something like:
"assets-library://assets/+iOS" etc. ALAssetsLibrary -assetForUrl:
returns nil for such url and we start iterating through the assets
library. On my phone (e.g.) this takes about ~6 seconds (to iterate
through pictures/videos I have), so the image picker is dismissed
~30 seconds after an image was actually selected in a picker view,
making an impression it's completely broken. Bail out early
on such url, we know we'll fail (with AssetsLibrary giving a warning
about invalid asset with UUID(null).

Pick-to: 6.5
Fixes: QTBUG-109120
Change-Id: Ia302f4151e3aade830e647a8a260479df2b29d4b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-02 11:24:39 +02:00
Thiago Macieira
15d6244ec3 QElapsedTimer: remove the runtime check for the monotonic clock
There is no supported OS with a "maybe" monotonic clock. All of the OSes
we currently support either always have a monotonic clock in the first
place or never have one. There's only one OS in the latter category and
that's INTEGRITY, lacking even the CLOCK_MONOTONIC constant.

Change-Id: Ieec322d73c1e40ad95c8fffd17463531dae2c5bc
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-04-01 07:49:40 -10:00
Christian Ehrlicher
b5fe88a6e5 QSqlError: misc cleanup
- fix formatting for qsqlerror.cpp/.h
- replace a size() == 1 "x"_L1 with u'x'

Pick-to: 6.5
Change-Id: I74c92f27be4345737fcfc73368f834a2f7920808
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-04-01 11:31:43 +00:00
Marc Mutz
e848dd14f5 tst_qxmlstream: add non-US-ASCII hasAttribute() checks
One each of L1 and non-L1.

Will help porting that API to QAnyStringView.

Pick-to: 6.5
Change-Id: I51afc07c5b2384409c2627164e95265265fbb544
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-01 06:26:42 +02:00
Mårten Nordheim
7822b89aef Http2: Don't skip checking flag for trailing HEADERS frame if PRIORITY
If the trailing frame just had PRIORITY we would early-return, though
this meant we didn't check if the frame had the END_STREAM flag set,
leading some requests to certain servers to hang.

Fixes: QTBUG-111417
Pick-to: 6.5 6.4 6.2
Change-Id: Iac174dc5aeca30d5d19fae35f303983de9841847
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-04-01 00:36:58 +02:00
Marc Mutz
a81ea3d114 tst_Q(Any)StringView: check conversion from winrt::hstring
Instead of adding more QString::fromMyFavoriteStringImpl(), just check
that

   QStringView{myFavoriteStringImpl}.toString()

works.

It does.

Pick-to: 6.5
Task-number: QTBUG-111886
Change-Id: I337282611360b4a56a10c8acfd2d7d53ea196d5b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 21:41:35 +00:00
Tor Arne Vestbø
e81aa64280 macOS: Move application sandbox checking to secondary thread
We use the macOS Security framework to check whether the application is
sandboxed or not, in which case we might have to limit or change some of
the functionality of Qt, such as which shared memory backend to use.

Calls to SecStaticCodeCheckValidityWithErrors should ideally not be done
on the main thread, as the function may not return immediately, and we
get runtime analysis warnings about this in Xcode:

 This method should not be called on the main thread as it may lead to
 UI unresponsiveness.

To improve the situation we spin up a short lived thread at library
load that resolves the sandboxing state, ready to be queried when
needed from Qt.

Pick-to: 6.5
Change-Id: I52cdc1bf6aef05c3b93b43f67b3fb46035996b3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 23:01:51 +02:00
Christian Ehrlicher
3236b64db8 QtBase/doc: fix examples for QHash/QMap/QMultiMap::erase()
QHash/MultiHash & QMap/MultiMap::erase() do no longer take an iterator
in Qt6. Clean up the examples by only providing one example, the rest is
common c++ which should not be handled in the Qt documentation. Also
mention erase_if() and remove references to the (soon to be deprecated)
Java-style iterators.

Pick-to: 6.5 6.2
Fixes: QTBUG-105109
Change-Id: I47b11f3b5dcc173494e5c6f9ad0167c613b12209
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-31 22:27:55 +02:00
Marc Mutz
d25337a631 QFutureInterface: Extract Method reportAndEmplaceResult() from reportAndMoveResult()
This will be the building block for emplacement support in QPromise.

Task-number: QTBUG-112270
Change-Id: Ie267e76fe078a8f7b3ef8c7e0d2abfcd22062ff2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 20:27:55 +00:00
Marc Mutz
3087aa55dc QResultStore: add emplaceResult<T>()
... use it in moveResult().

Task-number: QTBUG-112270
Change-Id: I1233a710801d73c9153439b74a7a3900d2d9e39d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 22:27:54 +02:00
Marc Mutz
02e2682ee8 QFutureInterface::reportAndMoveResult(): don't spell a move as forward<T>()
The T&& result argument is not deduced (T is the template class'
template argument, so it's an rvalue reference, not a Universal
Reference, assuming that we don't support QFutureInterface<U> where U
is a reference type).

So std::forward<T> will always be a std::move(), so use that directly
instead of raising eyebrows in the reader of the code by using
forward<> to feed a function called _move_Result().

Pick-to: 6.5
Change-Id: I805df4686b5b74da57f8212b052b4056943a15fa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 20:27:54 +00:00
Marc Mutz
10e106ae47 QResultStore::moveResult(): refuse to move from lvalues
The T&& result argument is deduced, therefore result is a Universal
Reference and as such can bind to lvalues, not just rvalues. If passed
an lvalue, the function would happily move away from it, which is not
what the doctor prescribed.

Catch the attempt with a static assertion.

Pick-to: 6.5
Change-Id: Iff8c1abd5dcb1043ed94ba76570be5ba3d6f92da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 22:27:54 +02:00
Marc Mutz
b2bcf3b68a QResultStore: use unconditional move() in moveResult()
If the move can fail, so can most likely the copy. Use of
move_if_noexcept() therefore trades a faster potentially-throwing
operation for a slower potentially-throwing operation.

It is true that a throwing move ctor may leave the source object in a
partially-formed state while the copy ctor may not (exceptions prove
the rule, hello auto_ptr), but we shouldn't pessimize lazy coders
(missing noexcept) to cater for borderline-buggy code (throwing move
ctor that doesn't provide the strong exception guarantee). Yes, you
can construct such situations (and something as simple as
std::array<std::pmr::string, 10> is already affected), but we don't
cater for these anywhere else in Qt, so why do it here?

Change-Id: I728af8e87ed86f24326530f704a48df1f728ac98
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 22:27:54 +02:00
Christian Ehrlicher
46e909a37a QSqlIndex: add move ctor & move operator
Add the move ctor and move operator for QSqlIndex, also add an explicit
testcase for QSqlIndex

Task-number: QTBUG-109938
Change-Id: I46cc6a24c2e7d5b23d2ac3427cafd01b9ba257ed
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-31 18:36:29 +02:00
Sebastian Beckmann
9f44553b3d QComboBox: Disable items marked as disabled in native popups
Fixes: QTBUG-56064
Pick-to: 6.5 6.2 5.15
Change-Id: I00a17a19b4c14c874e16ec863e794218f0570346
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-31 18:35:40 +02:00
Ivan Solovev
a1ff7f518d Fix QPermission documentation for accessing typed permissions
The documentation suggested to use a non-existing data() function.
Fix it to mention the actual QPermission::value() method.

Pick-to: 6.5
Change-Id: I870021ef5a04edc26553d8b0376da007687b2f05
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-31 17:42:58 +02:00
Ulf Hermann
b83de5f9a4 moc: Record types of enumerations
This will be helpful in a number of places, in particular in order to
support enums of different sizes in QML. We record the type as string in
the JSON output and as QMetaTypeInterface in the generated C++.

Task-number: QTBUG-112180
Change-Id: I943fac67f8b25b013d3860301416cdd293c0c69e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 17:42:58 +02:00
Mikolaj Boc
ecd7ddcc3e Correctly update the texture in qwasmbackingstore
Both the full-width and partial-width paths in
QWasmBackingStore::updateTexture now correctly compute source and
target rects.

Task-number: QTBUG-112414
Change-Id: I30b0952609960f521119d3d628d2a8036f8b1fe5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-03-31 17:42:58 +02:00
Tor Arne Vestbø
b8f40af176 macOS: Send Qt::NonClientAreaMouseMove for NSEventTypeMouseMoved in title bar
We were missing the NSEventTypeMouseMoved in resolving the event type for
handleFrameStrutMouseEvent, resulting in passing on QEvent::None as the
event type to QWSI.

Pick-to: 6.5 6.2
Change-Id: I144b6459c5d4fda2839d25cd52ddb441dc7c3a47
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-31 14:43:09 +02:00
Mikolaj Boc
00f4e5c937 Remove unused code in qwasmcompositor
Some dead code was left after transferring event support to QWasmWindow.
Remove it now.

Change-Id: I40e15bc62bcbb6fff071f53c45223c8a2d12e348
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-03-31 13:33:47 +01:00
Marc Mutz
e2b2bb7ff1 Short live q20::to_address!
An implementation of C++20 std::to_address, a prerequesite for
QSpan<>.

The test cases are inspired by libstdc++'s test suite, just to avoid
missing some cases, but the to_address implementation is white-room.

Fixes: QTBUG-108430
Change-Id: I4c092fdd7a56c0b279068e341bbf91a725ca3b1f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-31 13:10:12 +01:00
Christian Ehrlicher
a1dd9a9f77 CommonStyle/QSpinBox: fix rendering up/down symbols in high-dpi mode
Render the Up/Down and Plus/Minus images for QSpinBox in high-dpi mode.
Found during investigation of QTBUG-112019.

Pick-to: 6.5
Task-number: QTBUG-112019
Change-Id: Ie531311b657180790b0e12a36663012a5f4da6be
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-03-31 12:10:04 +00:00
Christian Ehrlicher
b46a914bd7 SQLite: Update SQLite to v3.41.2
[ChangeLog][Third-Party Code] Updated SQLite to v3.41.2

Pick-to: 5.15 6.2 6.5
Change-Id: I9e36e54e0d85368f505565b51f45eed8c30d140e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-03-31 13:10:04 +01:00
Tor Arne Vestbø
f037977152 QWSI: Remove handleFrameStrutMouseEvent in favor of handleMouseEvent+type
The handleMouseEvent function already takes a QEvent::Type, where clients
pass in the corresponding mouse press/release/move type. The same applies
to the handleFrameStrutMouseEvent.

To avoid the chance that clients call these functions with a conflicting
event type (handleFrameStrutMouseEvent with MouseButtonPress instead of
NonClientAreaMouseButtonPress e.g.), we remove handleFrameStrutMouseEvent
altogether and just let clients use the handleMouseEvent function directly
with the correct event type.

Change-Id: I4a0241c39aedac0d2d8d5163ba05cde72605959c
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2023-03-31 14:10:04 +02:00
Alexey Edelev
f9594cefef Add the missing list of the generatedHeaders to syncqt_all_args
We need to pass the list of generated files to make the correct
filtering when generating the module master header. Otherwise
generated headers will endup in the module master header.

Pick-to: 6.5
Fixes: QTBUG-112458
Change-Id: Icd20fe5999db379d0eafbff7dad20765e1a96350
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-31 14:10:03 +02:00
Mårten Nordheim
c5c3a7e0db qlalr: add option to error out on warning
By erroring out we can ensure that new warnings are not
accidentally introduced and merged.

As a drive-by: fix indentation of the --qt option. "--dot" needs three
tabs, so "--qt" definitely needs it too.

Fixes: QTBUG-108119
Change-Id: I56107c0744957293338080cf37350f1e1c743093
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-03-31 14:10:03 +02:00
Andrey Butirsky
59fa008275 Revert "Revert "qxkbcommon: Treat XKB_KEY_{Super,Hyper}_{L,R} as Qt::Key_Meta by default""
This reverts commit 101e57d37c.

We have a separate change to fix Qt Wayland Compositor.

Change-Id: Ia00f73c9864921523fed205a813496ab417810a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-03-31 11:26:42 +00:00
Øystein Heskestad
29317b426b Move streambookmarks example into corelibe/serialization
The stream-based XML serialization API resides in corelib/serialization.
Move the steambookmarks example there. The Qt XML documentation is
updated to no longer refer to this example code directly and refer to
the direct location in the example documentation instead.

Task-number: QTBUG-110647
Pick-to: 6.5
Change-Id: Id36fb04a6acb7b8d1eb008f61568fe0abc221e3d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-31 13:26:42 +02:00
Axel Spoerl
a815c40e73 QListView: No-op, when a list item is dropped directly behind itself
QListView generates a move, when an item is dropped directly behind
itself. This causes unexpected behavior, e.g. item widgets getting
discarded.

This patch prevents a move from being generated in that case.

It adds an autotest to tst_QWidget, to verify item widgets and item
data do not get discarded in case of a no-op drag&drop.

Fixes: QTBUG-100128
Pick-to: 6.5 6.2
Change-Id: I02a755320a7b71dad218293c9c94c88da6507423
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-31 13:09:39 +02:00
Mitch Curtis
a94ba94695 Doc: link to QWindow::requestActivate() in more places
Make it easier to find the function that actually gives focus to
windows that need it.

Pick-to: 6.5
Change-Id: I0586b89b42a1be260e36e166c81b686e394d8b5e
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-03-31 18:10:17 +08:00
Marc Mutz
b1b0f42c97 tst_qtconcurrentrun: fix UB (uninit'ed values)
While doubleFunction's body is empty, it takes its argument by value,
which means copying. Copying an uninitialized double is a gray zone
(if you follow the partially-formed paradigma, it's UB; though the std
may allow it some types, most notably std::byte and uchar; probably
not double, though). Converting an uninitialized int into double is
most certainly UB.

Fix by initializing both d and i.

Found by GCC 11's -Wmaybe-uninitialized.

Pick-to: 6.5 6.2 5.15
Change-Id: I103fb72bf4b8792a292346007f498dc6349e9c68
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 11:32:46 +02:00
Marc Mutz
1cc1d39f3e tst_QThreadPool: reduce the number of infinite timeouts
... by supplying a TestThreadPool that waitsForDone() with a defined
timeout in the dtor.

When tests hang, this will now print an intelligible message instead
of just the generic watchdog-killed-process one.

Also replace all QVERIFY(waitForDone()) with the same code used in
TestThreadPool's dtor and add a comment in a place we'd rather not use
these tools.

Pick-to: 6.5 6.2
Change-Id: Ifd2b3372eb7c7337a3ba77d003e45dcd77e23545
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 11:32:45 +02:00
Marc Mutz
eb260c132a tst_bench_QCryptographicHash: use resultView()
Don't benchmark the creation of the QByteArray from the internal
buffer, that's not interesting.

Call resultView() instead of result().

On the one hand, this skews comparisons with older benchmark data.

OTOH, result() used to be the fastest way to get the result out of
QCryptographicHash or QMessageAuthenticationCode, and now it's
resultView(), so in a way, it still is a fair comparison.

Pick-to: 6.5
Change-Id: I864b2f88f01e426c5d0967f57199e13dd7cb29f8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 10:32:45 +01:00
Marc Mutz
0eccfe5e39 tst_bench_QCryptographicHash: port from std::function to qxp::function_ref
Because we can, and because function_ref is never null.

Pick-to: 6.5
Change-Id: If71f98860d72eaa8cf8a93bb3c59a0260d3c7660
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 10:32:45 +01:00
Marc Mutz
f1b264f9ac tst_bench_QCryptographicHash: QSKIP unsupported algorithms
With the OpenSSL 3 backend, some algorithms may not be available. Skip
benchmarking them.

Pick-to: 6.5
Change-Id: I1275332993fe15c007410e25acf59f5e3ec27894
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 10:32:45 +01:00
Marc Mutz
3aaae083f7 tst_bench_QCryptographicHash: add benchmarks for QMessageAuthenticationCode
We could add a tst_QMessageAuthenticationCode, but it would have to
duplicate a lot of the tst_QCryptographicHash machinery, so just add
it here.

Pick-to: 6.5 6.2 5.15
Change-Id: Icc60de865c72c5e423cb3be57f58297c522791f7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-31 10:32:45 +01:00
Oliver Wolff
3cf1a10e4f windeployqt: Make determineDebugAndDependentLibs more readable
Change-Id: Ib06fb5f2bce9afe1bd799c3ff96abff5ddb063a9
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-03-31 05:16:31 +01:00
Kai Köhne
1ba89e35bd Highlight third-party modules that are security critical
Mark any modules listed as 'processing untrusted content' in
https://wiki.qt.io/Third_Party_Code_in_Qt also in the
qt_attribution.json files.

For reasoning, see also

https://lists.qt-project.org/pipermail/development/2023-February/043667.html

Pick-to: 6.5
Change-Id: Id547d4f7e77dac8c7e8e382e65169e7bd0330fcf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-31 02:10:53 +01:00
Axel Spoerl
7350088ab7 tst_QSslSocket_onDemandCertificates_member: Blacklist Windows & debug
The test function occasionally can fail on CI/Windows, when a
certificate update on www.qt.io requires installing a new root
certificate on the test VM.

This patch blacklists the test class (which has only one test function)
on Windows. It adds diagnostic output, so future failure reasons can
be established from CI artifacts.

Pick-to: 6.5
Task-number: QTBUG-63481
Change-Id: If686d006f379fe6dbfb0d11d80b8455f72fdbb09
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-30 17:17:26 +00:00
Volker Hilsheimer
fc319a8f8b Fix QTimer::crossThreadSingleShotToFunctor test
Amends 4d90c4e74a, after which the test
became flaky. We need to wait for the functor to be called before
quitting the thread, otherwise we have no guarnatee that any of the
queued metacall events have been processed by the thread. Since
QThread::quit is thread-safe, we can just call it from within the
functor. This guarantees that at least one of the single-shot timers
is processed before we quit.

And since QTimer::singleShot has special code paths for 0-ms timers
(going through an explicitly queued QMetaObject::invokeMethod call
rather than through an actual QSingleShotTimer object), we need to run
the test logic with different timeouts to cover both code paths.

Task-number: QTBUG-112162
Pick-to: 6.5 6.2 5.15
Change-Id: Ide1e7b4b74dcbda72144a0d73ef5f64b0694ddbc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-30 19:17:25 +02:00
Topi Reinio
816ca43b88 Doc: Use \relates for functions in the global scope
This addresses the recent warnings introduced by a change to QDoc:

qkeysequence.h:32: (qdoc) warning: No documentation generated for
    function 'qHash' in global scope.
qmap.h:1557: (qdoc) warning: No documentation generated for function
    'operator+' in global scope.
qmap.h:1565: (qdoc) warning: No documentation generated for function
    'operator+=' in global scope.
qvariant.h:582: (qdoc) warning: No documentation generated for
    function 'operator>>' in global scope.
qvariant.h:590: (qdoc) warning: No documentation generated for
    function 'operator<<' in global scope.

Also, mark qt_win_hasPackageIdentity() declared in qfunctions_win_p.h
as \internal.

Pick-to: 6.5
Change-Id: Idc9c813370ff3133ac9dc3bf809976b0ece88811
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-28 21:13:07 +00:00
Volker Hilsheimer
f177a34836 Doc: Remove stray slash
Pick-to: 6.5 6.2
Change-Id: Ic5e08437e8a5a937ae4f3ea1aa6ca73fd7780c98
Reviewed-by: <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-03-28 21:15:59 +01:00
Edward Welbourne
496ebd8677 tst_QDateTimeEdit::stepModifierPressAndHold(): tweak start date
The test can collide with a 1960-01-01 transition in some zones, so
move it to Jan 2nd to avoid that.

Pick-to: 6.5
Change-Id: I5286cadc0de0b66283253b0ac736f23a2add0c8f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-28 21:40:53 +02:00
Ievgenii Meshcheriakov
7b9e7f8002 complexpingpong example: Modernize the code
Use C++ IO streams and qWarning() instead of (f)printf() for console IO.
Make user-visible strings translatable. Use invokeMethod() instead
of QTimer.

Fixes: QTBUG-111366
Pick-to: 6.5
Change-Id: I6990b964c2097267e04cd361b9cd8fc0a22a0135
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-28 19:42:01 +02:00
Timur Pocheptsov
21a6c86979 iOS: request authorization before presenting image-picker
Right now, image picker view is shown first (it does
not require access to photos, since it's essentially
Photos app getting access to photos ...). Then, we use
AssetsLibrary to get asset for an url (using ALAssetsLibrarie's
-assetForURL method). This may trigger a permission-related alert, asking to:
   a. Select more photos or ...
   b. Allow access to all photos or ...
   c. Deny access.

Showing this alert _after_ picker has selected an image  makes little sense
(and probably was never intended this way anyway). Instead, we now use
Photos.framework to check the authorization and, if needed, we request
an authorization (when the current status is 'Nondetermined'). If authorization
is 'Granted' as a result, we show picker view and proceed as normal/before.

Pick-to: 6.5
Task-number: QTBUG-109120
Change-Id: I0acfd7b0476346360d75a5e37f5845aaf2d6e3e0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-28 18:37:36 +02:00