Commit Graph

59550 Commits

Author SHA1 Message Date
Marc Mutz
26ea6157e6 Don't create a QRunnable in QAndroidApplication::runOnAndroidMainThread() w/o timeout
Creating a QRunnable is expensive business, incl. setting up
QThreadPool::globalInstance() if it wasn't set up already, so don't do
it for a no-op task.

Somewhat mitigates, but doesn't fix, QTBUG-109586.

Task-number: QTBUG-109586
Pick-to: 6.5 6.4 6.2
Change-Id: If2043134414d68adc9188e5bb7650ca08046b4aa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-23 23:22:57 +01:00
Ahmad Samir
ad32854409 Add QUtf8::convertToUnicode(char16_t *, ....) overloads
Mark private API docs as \internal.

Change-Id: Ia2fae84832d5f253ea730c1993ce1810f43dff78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 19:22:30 +02:00
Ahmad Samir
c25e8851e3 qfloat16: fix a compiler warning about shadowed variables
"f" is used a lot as the name of the argument to methods in this class,
so rename the member to something else.

Change-Id: Iddb0e1ba1f6a3e0adf5d1b8ff00a8f82a68f6738
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 19:21:56 +02:00
Ahmad Samir
2fc50a914d QDir: when sorting by time, get last modification times as UTC directly
PASS   : tst_QDir_10000::sorted_byTime()
RESULT : tst_QDir_10000::sorted_byTime():
     345 msecs per iteration (total: 345, iterations: 1)

PASS   : tst_QDir_10000::sorted_byTime()
RESULT : tst_QDir_10000::sorted_byTime():
     0.000015 msecs per iteration (total: 54, iterations: 262144)

Change-Id: I7976c8668aa821d2b7ed3f774f29bdf1ba4a99d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 15:13:14 +02:00
Ahmad Samir
605829546f QSettings: use QFileInfo::refresh()
Not so much about performance as it is better readability, it's the same
file, we're just rereading its metadata from the filesystem.

Change-Id: Ia7ae35aea5fec67ead1fc8ead99586b3b0a14727
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2022-12-23 15:13:00 +02:00
Ahmad Samir
39de5717de QSettings: get file timestamps in UTC directly
These are timestamps, so UTC is all we need. This is faster than getting
the times in the Local Time Zone just to compare them.

Change-Id: I5ceebafea12a7015dce9e3c00d1b35f8da2afb1d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 15:12:55 +02:00
Oliver Wolff
c3f8198d07 QWindowsContext::setProcessDpi[V2]Awareness check current value before setting it
Our previous assumption was that the right value was used if we ran into
an "access denied" error. That error only states that the function has
been called before though. The warning should be omitted if the right
value has been set before.

Pick-to: 6.5
Change-Id: I1379242f68e2f09bc6a25dd322fe3634622d8e8e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-23 20:34:19 +08:00
Lu YaNing
585614ec22 QFileInfoGatherer: Add missing emit keywords
Add emit keyword to avoid misunderstanding

Change-Id: Ib57edc7f195d2eaa101f03335f5cb90708fc42fd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-12-23 19:10:45 +08:00
Kai Köhne
9f3395b4d3 QFileInfo: Restructure overview
Use less \notes, more sections.

Change-Id: I4c94d67a66c906e0d3b6f55127fce85e974b9138
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-23 08:28:23 +01:00
Ahmad Samir
b82c9d08f8 QFileInfo: overload file time related methods to take a QTimeZone arg
The fileTime() method and co. get the specified file time but always
converted it to LocalTime; in some cases, e.g. when sorting dir entries by
last modification time in QDir, or when comparing a timestamp of a file
against its last modification time, basically all that's needed is the last
modification time returned by the underlying stat call (in QFileSystemEngine),
which is msecs since the Epoch.

API docs changes coauthored with Kai Köhne.

QDir benchmark results follow in the next commit.

[ChangeLog][QtCore][QFileInfo] Overload file time related methods to
take QTimeZone argument; mainly useful if all you need is UTC time,
e.g. to compare file timestamps, this is inherently faster as no
conversions need to be performed.

Change-Id: If73a54e935fe272e34acbf083973c30b61510be8
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 08:27:42 +01:00
Wang Fei
936cae6b53 Add QFileInfo::readSymLink() to read the raw link path
The existing symLinkTarget() always resolves the symlink target to an
absolute path; readSymLink() provides access to the relative path when
that is how the symlink references its target.

[ChangeLog][QtCore][QFileInfo] Added readSymLink() to read the symlink's
raw target, without resolving to an absolute path.

Fixes: QTBUG-96761
Change-Id: I360e55f1a3bdb00e2966229ea8de78cf29a29417
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-23 06:26:44 +01:00
Topi Reinio
8844c6ef37 Doc: Remove incorrect CMake instructions for QtCore-private
Drop the use of \qtcmakepackage for the module page that results in
incorrect instructions, and replace it with a snippet with the correct
commands to use.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109214
Change-Id: I936910ddb9e4118f931d85e4b096ad52006dcc32
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2022-12-22 23:41:41 +00:00
Øystein Heskestad
f46bcad993 Remove superfluous Latin-1 case folding table
Use new case folding functions in the implementation of
QLatin1StringMatcher instead.

Task-number: QTBUG-100236
Change-Id: I853091d11070483ad2128b9de3c776f5ca8e7f45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 20:02:29 +01:00
Mikolaj Boc
c15a8750bc Handle the mouse events in the window itself
It is now not the screen that handles all of the events and relays
them to individual windows, but the window elements themselves.

This allows us to get rid of manual window targeting logic and let
the browser do its job.

Fixes: QTBUG-107217
Pick-to: 6.5
Change-Id: I4dc5a74b1343f027f72c1da4623b99cd28bfbb38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-22 19:39:00 +01:00
Johannes Oikarinen
cf2651ae80 Support connecting Oracle DB as system user
Adding support to different authentication modes to Oracle DB.
Adjust the connection string parsing a little bit as a drive-by.

Change-Id: I24ed70ed5085f22ba58eff70caa685579d31c96f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-22 19:26:51 +01:00
Christian Ehrlicher
ebd94489a3 SQL: remove unneeded test functions
testWhiteSpaceNames() returns true for all current database drivers so
it's useless and can be removed. safeDropView() and getPSQLVersion()
is not called anywhere, getMySqlVersion() is only used for a check for a
MySql version we no longer support.

Change-Id: I8d02f17f475821e81d309ee96897e772cdfb895d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-22 19:26:51 +01:00
Christian Ehrlicher
35f9f2bb00 SQL: rework the connection options documentation
Move the documentation of the connection options to the SQL Drivers page
and try to add a small but useful documention to each option.

Fixes: QTBUG-109507
Change-Id: Id1d51d7a666ac0f15cde8d73bff153dad271d34b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-22 19:26:51 +01:00
Christian Ehrlicher
5419faebde SQL: misc cleanup in QSqlRecord/QSqlField
Cleanup an unused function in QSqlRecordPrivate and use member
initializers for the ctors in QSqlRecord/QSqlField

Change-Id: I7d585e70c83373b3092e9f1425233af42b8c379d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-22 19:26:50 +01:00
Kai Köhne
8b0818235d Doc: Reorder QFile overview
Move the paragraphs dealing with encodeName()/decodeName() and Unix
special files to 'Platform Specific Issues'.

Pick-to: 6.5
Change-Id: I076191e041ef238556aab28b5ad5d51974f8f7ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 19:23:53 +01:00
Kai Köhne
ac6e61d867 Improve QFile::encodeName(), QFile::decodeName() documentation
Make it explicit that the local 8 bit encoding is UTF-8 on all
platforms but Windows.

Pick-to: 6.5
Change-Id: Icaabfd28689a71ee5cc2957f058f9388405496d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 19:23:53 +01:00
Kai Köhne
c9d9b43b10 Doc: Replace QTemporaryFile with QSaveFile for QFileDevice motivation
QTemporaryFile is derived from QFile, so it's not a reason why
QFileDevice should exist. Instead, mention QSaveFile.

Pick-to: 6.5
Change-Id: I1de3a32746a313ec57323f3f8ae42e326f11d147
Reviewed-by: David Faure <david.faure@kdab.com>
2022-12-22 19:23:18 +01:00
Volker Hilsheimer
7c84a0cd29 QTextImageHandler: reduce code duplication
Refactor the getImage/Pixmap and getImageSize/PixmapSize functions into
templates. The functions were practically identical, and the
inconsistencies between them seem to be rather bugs or omissions than
intentional. E.g. maintaining the aspect ratio if width/height are not
specified was only implemented for the pixmap case.

Task-number: QTBUG-109212
Change-Id: Ic0de0a2d7f883c4efac97111e2c1e438f278d70d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2022-12-22 19:19:33 +01:00
Volker Hilsheimer
2d87c4d881 QTextImageHandler: Resolve Nx images correctly for file or qrc URLs
The qt_findAtNxFile helper in qicon.cpp expects a local file name that
can be probed with QFile::exists. If the src attribute of an <img>
element specifies the location of the image as a file:/ or qrc:/ url
rather than as a local file name, then we need to strip the scheme
off the file path, and in the case of a qrc URL leave the :/ prefix
before calling the qt_findAtNxFile helper.

Amends, and partially reverts, 760df72565.
We can't avoid testing whether the source in the HTML is provided as a
URL before interpreting it as a file name.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109212
Change-Id: I7ea7a5bfde79bab90a8025c42e754129813dd0fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-22 19:19:33 +01:00
Samuel Mira
99893a914a Android: Fix UI is scaled smaller than before
The 413593183b patch changed the way
how the display metrics are retrieved. By doing so, it was found that
the previous way retrieved the scaledDensity always equal to density.
It is intentional for scaledDensity to be dependent on the font scale
chosen by the user. However, this change altered not only the font scale
but also the layout. This patch will make the layout dependent on the
density instead of the scaledDensity and normalize the way the display
metrics are retrieved among Android versions.
Currently, the fontScale is ignored, QTBUG-109566 will track future
developments.

Fixes: QTBUG-109026
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I6adacd17583cbe9bee368af35c50b780872ab222
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-22 17:45:52 +02:00
Lu YaNing
e62a3383fb Clean up unused variables
Amends commit 5bb178c479 and
c8b07f7da3

Change-Id: I709390e52263bf0fadb083d6f2c29562b1877a8b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-22 19:16:03 +08:00
Tang Haixiang
1f4a085df5 Add Q_UNUSED to avoid compilation errors
Variable unused causes compile error or warning, use Q_UNUSED to eliminate it.

Change-Id: I6efbc3150cef962fa45ccbbed0dc04794db3cbbe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-22 19:16:03 +08:00
Mikolaj Boc
cc60d70699 Avoid mutual ownership in qstdweb's File::stream
The mutual ownership of chunkCompleted<->fileReader caused both not
to be freed, which resulted in a memory leak. Resolve this by
introducing the ChunkedFileReader class which owns itself until file
read is finished.

Also, resolve a similar issue in qwasmlocalfileaccess.

Fixes: QTBUG-109436
Pick-to: 6.5
Change-Id: Ieec4cde15a893fa6a2e21a62d3bb6637374c5364
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-22 12:16:02 +01:00
Marc Mutz
8420d3e0b2 tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, too
QtBase didn't contain any checks for QT_RESTRICTED_CAST_FROM_ASCII, so
a recent addition to the QString::append/insert/prepend overload set
made calls with C string literal arguments ambiguous without the CI
noticing. We had a similar problem with QString::multiArg.

To increase test coverage, we now run tst_qstring two times:

- without any define
- with QT_RESTRICTED_CAST_FROM_ASCII (lots of changes necessary)

Most removals are expected, because they disable tests that check the
implicit conversions from QByteArray and const char*, but the
relational operators with QLatin1String objects might warrant fixing.

In some places, when the conversion wasn't the functionality under
test, replaced C string literals or QByteArrays with QLatin1String.

We should also test with QT_NO_CAST_FROM_ASCII, but that's even larger
surgery.

QString doesn't have a ctor from std::nullptr_t, so QString s =
nullptr; doesn't compile in C++17 mode, but does in C++20 mode, due to
the const char8_t* ctor.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I0c5a31719a4b8dd585dd748e0ca0d99964866064
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-22 11:16:02 +00:00
Marc Mutz
115b1eab86 QXBMHandler: use QtMiscUtils, not <ctype.h>
The latter are locale-dependent, and while that doesn't produce wrong
results here¹, it means they need to be out-of-line, whereas
QtMiscUtils functions are inline constexpr.

¹ isdigit could give a false positive on non-US-ASCII-digits, I
suppose.

As a drive-by, rely on the QtMiscUtils::fromHex() returning a negative
value when a non-hex character was encountered, to avoid the extra
isxdigit() checks. This property is preserved through the bit
manipulations: ORing together negative values yields a negative number
iff either or both operands were negative (in two's complement, which
Qt requires). The caller also checks the array bounds before calling,
so the isxdigit() calls didn't act as an implicit bounds check
(returning false if they encounter '\0'), either.

Task-number: QTBUG-109235
Pick-to: 6.5
Change-Id: I4cd734468e223f1047a53afd264d077b28cb5f1d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 11:16:02 +00:00
Marc Mutz
85b15b101c QFuture: port from QSharedPointer to std::shared_ptr
Compared to std::shared_ptr, QSharedPointer requires 2x the atomic
operations per copy, and this code uses _a lot_ of copies.

Port to std::shared_ptr. The uses are all in inline, non-exported
code, so there's no BC or SC issue here. Old code will happily
continue to use its QSharedPointer-based code, while recompiled code
will enjoy the transparent efficiency gain.

This also helps prepare QtCore for an eventual QT_NO_SHARED_POINTER
(which QtCore will not be able to set on itself, because QPointer is
still not ported away from QWeakPointer, but which should affect as
few headers as possible).

Pick-to: 6.5
Change-Id: I8159c38d93f3bcfc22a236c8c26541ab5ee4e6d0
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-22 08:41:21 +01:00
Marc Mutz
5dc0f52e70 [doc] QSharedPointer: add some missing docs
Added docs for
- move-ctor, -assignment operator
- move-construction and -assignment from QSP<X>
- qHash()

There's more stuff missing, but I declare 'twas enough qdoc wrangling
for this round.

The texts are taken from other smart pointer docs, esp. QESDP, so
they're consistent.

Fixes: QTBUG-83134
Fixes: QTBUG-63700
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iff980d043e1635ed6cfdd3113c68bc23f3a0bad7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 08:40:23 +01:00
Ahmad Samir
b91e87a8db QUrl: remove unused qt_from_latin1() forward declaration
It's not currently used in qurl.cpp.

Change-Id: Ic654e28fc64d90897be3a38d477e38de0414a02a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-22 05:55:41 +02:00
Thiago Macieira
6e68b4d838 tst_qlogging: Skip backtrace tests under ASan
ASan inserts a lot of function calls in between our calls, so they end
up in the backtrace and cause unexpected results.

Similar to c672f148db.

Fixes: QTBUG-109559
Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd1732dd2bc0317ae4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-21 23:22:59 -03:00
Thiago Macieira
b242457d34 tst_qlogging: don't skip all tests under static builds
We only need to skip the backtrace ones, because there's no library
called "Qt6Core".

Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd1732dd680058ba6e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-21 23:22:59 -03:00
Thiago Macieira
5aa66034c2 tst_qlogging: fix preprocessor directives
Reorganize them and fix the comment.

Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd1732dd57203cb21f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-21 23:22:59 -03:00
Volker Hilsheimer
c9cf4037ca QTextImageHandler: Add test coverage for resources and URLs
If an image source in HTML is specified via local file name or resource
path (i.e. without qrc prefix), then the correct image is loaded.

With file:/ or qrc:/ schema however, the image is either not loaded at
all, or the 2x image is not loaded. The qt_findAtNxFile helper in
qicon.cpp gets a URL path, but expects a file path (that can be tested
with QFile::exists).

Task-number: QTBUG-109212
Pick-to: 6.5 6.4 6.2
Change-Id: Ibcf687c69b3e53a10f21d718d28c8177a02d6be6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-22 00:48:08 +01:00
Volker Hilsheimer
d8e213a9e6 Enable and fix the test for QTextImageHandler
Amends 52ce0c177e, which added the test
without adding it to the parent directory.

Refactor the test code to be data driven, add the image files as
external test data files, and adjust the test code to find the files.

Use the QTextImageFormat from the document rather than a manually
crafted one, as otherwise we don't test a real usecase.

This also makes the test more flexible for adding qrc, resources, and
file URLs.

Task-number: QTBUG-109212
Pick-to: 6.5 6.4 6.2
Change-Id: Id0771037b961d95ec3cadd0cd6467d2448f22884
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2022-12-22 00:48:08 +01:00
Tor Arne Vestbø
0f16c76e83 Export the lcQpaFonts logging category
It's used by the WASM and iOS platform plugins.

Change-Id: Ia0c833e11a8db8d68782c84937fb444e5430cefe
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-21 23:45:06 +01:00
Samuel Gaist
253a4a146b examples: port xml examples to new connection style
Task-number: QTBUG-106893
Change-Id: I1cab8949700d7449f0615731c85a77bb9136b0d3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-21 22:33:02 +01:00
Samuel Gaist
e686a13b7b examples: port network examples to new connection style
Task-number: QTBUG-106893
Change-Id: Id0f558362108fedececb9eede36becc04ff4e307
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-21 21:52:17 +01:00
Samuel Gaist
cf6522e5d7 examples: port qpa examples to new connection style
Task-number: QTBUG-106893
Change-Id: Icf9a40403029c6973167f468f51b2dbdc365a848
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-21 21:52:17 +01:00
Samuel Gaist
d9dd875301 examples: port qmake examples to new connection style
Task-number: QTBUG-106893
Change-Id: Ie4a4874359ac7750de344f4e3702ea7be09e7b53
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-21 22:52:17 +02:00
Samuel Gaist
c47e2aebb6 examples: port embedded examples to new connection style
Task-number: QTBUG-106893
Change-Id: I6d00c53b7747b36c5f0094e566713f13fe74f3de
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-21 21:52:17 +01:00
Bartlomiej Moskal
abe3bc1c43 Android: Do not close the keyboard for NO_ENTER_ACTION
After commit cc9144b4f3, virtual keyboard
is hiding after clicking the done button. This is expected behavior,
but not in case when imOption is set to IME_FLAG_NO_ENTER_ACTION[0]

This commit removes hiding keyboard in mentioned case.

[0]https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NO_ENTER_ACTION

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-107662
Change-Id: Id280c4a67e3940fce5045724f77284a77c886f06
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-21 18:56:28 +00:00
Jaishree Vyas
46d2b45d2c Doc: Increase Test Function Timeout
Documentation on QTEST_FUNCTION_TIMEOUT environment variable

Pick-to: 5.15 6.2 6.4 6.5
Fixes: QTBUG-88652
Change-Id: Ib851eb2312088cf6b9ab277faa571757f4076ad4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-21 16:48:50 +00:00
Joerg Bornemann
1f142d9038 CMake: Avoid repeating DESTDIR when deploying Qt libs and plugins
Let CMAKE_INSTALL_PREFIX be "/usr/local", and consider a project with a
call to qt_generate_deploy_app_script.

Installing the project with DESTDIR set to "/tmp/bla" would install the
project targets to "/tmp/bla/usr/local" but the Qt libraries to
"/tmp/bla/tmp/bla/usr/local".

That happened, because we used QT_DEPLOY_PREFIX as DESTINATION in
file(INSTALL). QT_DEPLOY_PREFIX starts with $ENV{DESTDIR} and
file(INSTALL) also prepends DESTDIR.

The value of QT_DEPLOY_PREFIX is controlled by CMAKE_INSTALL_PREFIX. Use
the latter as DESTINATION in file(INSTALL) calls.

Pick-to: 6.5
Task-number: QTBUG-109553
Change-Id: I8f06d81968fa0de4f17c4f8bc9b17cc052da4c12
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-21 15:46:53 +01:00
Assam Boudjelthia
c203ec2720 Android: handle move operation with content uris
Allow moving content uris if the destination is provided
a full content uri with a parent that's different from the
source content uri (i.e. different folders).

Note: since the underlaying Android APIs don't always know about
the parent of a uri, we do some step to deduce that, but that's
not always guaranteed to work.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-98974
Change-Id: If21954e5963f4eb0b96c7ccd983943ea2cab5b24
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-21 11:09:13 +02:00
Mikolaj Boc
0f18dadd5d Run clang-format on qwasmdrag.h/.cpp
Change-Id: Id67238566b6e25d8bf1645b5b83d898622eb5f89
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-12-21 09:58:09 +01:00
Mikolaj Boc
3e78331dac Use a smart pointer for QWasmDrag::m_mimeData
Change-Id: I10e27a92d37e5bf131c7c0f22860a957d1f1592d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-12-21 09:53:54 +01:00
Lu YaNing
ada9c2f8f8 QGraphicsProxyWidget: Don't unnecessarily check focusWidget twice
Amends commit bf5011815d

Change-Id: I18a8d26b08b4035d7a76fc51873696590292b181
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-21 13:03:14 +08:00