Commit Graph

59597 Commits

Author SHA1 Message Date
Marc Mutz
a478d730f8 Add minimal QPermission auto-test
To be extended as neeeded.

Pick-to: 6.5
Change-Id: I57d2f55f67de073fe3e4916b7ba655342cf661dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-12 08:48:46 +01:00
Thiago Macieira
c66adaa1f1 tst_Selftests: rewrite this with templates instead of macro
Otherwise it's undebuggable.

Change-Id: I3c79b7e08fa346988dfefffd171ee81fefde63b0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-01-12 00:00:20 -07:00
Thiago Macieira
e9a9257828 Use the real qconfig.h in the bootstrapped config
We merely replace the QtCore bits now.

Change-Id: I76216ced393445a4ae2dfffd17297e31e23cca10
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-11 23:00:20 -08:00
Thiago Macieira
61935786c3 Move duplicated code between two headers to include qconfig.h
Change-Id: I76216ced393445a4ae2dfffd17297e2b059350d3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-11 23:00:19 -08:00
Ville Voutilainen
18def77d27 Fix dangling references
These were found with the help of -Wdangling-reference, which is
new in GCC 13.

The one in qtpaths.cpp is a false positive: parseLocationOrError()
returns a reference, so there's nothing for the full expression to
destroy. Moreover, it returns a reference to a static object, so
there's no destruction inside the function either.

The other two aren't, but are also harmless. QDBusMessage::arguments()
and QVariant::toList() return a stored QVariantList by value, so
QList's COW mechanism means at() returns a reference that will not be
destroyed. However, the compiler has no way of knowing that. And
since it depends on the implementation details, change the code to
not depend on that.


Pick-to: 6.5
Change-Id: If53aa16fcc24586d752ffc76c193c81e43dc9d95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 06:23:58 +00:00
Thiago Macieira
313720fef0 qglobal.h: centralize the __ASSEMBLER__ check
We can declare that headers like qtnoop.h and qtypes.h are C or C++
headers, not assembler ones so we don't need to have them individually
check that whether they're being compiled in assembler mode.

This removes the accidental leak of the qt_noop() declaration into
assembler and makes it clean:

 $ cpp -P -D__ASSEMBLER__ -Iinclude include/QtCore/qglobal.h | grep -c .
 0
(using grep because it prints four empty lines)

Change-Id: I69ecc04064514f939896fffd172e3fd6b6adc892
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-11 22:23:20 -08:00
Mikolaj Boc
1558153360 Kill the browser that CI on wasm opens for testing
Otherwise CI hangs if no existing browser can be reused (typical
case)

Fixes: QTBUG-109876
Change-Id: I63436a23c23c4b74c27c18effafde53bb6a4a34e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-12 04:34:34 +01:00
Ahmad Samir
f090a4785b QStringConverter: use qt_to_latin1() helper from qstring.cpp
This changes the newly-added QLatin1::convertFromUnicode() overload.

Change-Id: Ie465f052e711d72e51217b74b5b51a89c5d8b9e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 05:05:02 +02:00
Thiago Macieira
92a7c36020 QCryptographicHashPrivate: repack, by moving the enum to the end
QCryptographicHashPrivate::SmallByteArray is a 65-byte type, so there
were 7 bytes of padding at the end of QCryptographicHashPrivate anyway.

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd17394e1d5431e052
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 17:38:07 -08:00
Thiago Macieira
ccad719d2e QCryptographicHash: add a mutex to writing to the results
QCryptographicHash::result() and resultView() are const, therefore two
threads can call them on the same object. Given that the finalization of
the hash is not a trivial operation but doesn't modify the state, let's
do it without a locked mutex, onto a temporary stack buffer. Then we lock
the mutex to copy said result to our cached value.

Pick-to: 6.5 6.4 6.2 5.15
Fixes: QTBUG-110058
Change-Id: Ide4dbd0777a44ed0870efffd17394bf72785eabb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 17:38:07 -08:00
Thiago Macieira
2d7a27b918 QCryptographicHashPrivate: standardize on quint8
So we don't have to do these reinterpret_cast everywhere, as most of the
APIs we're calling take unsigned chars themselves. The reinterpret_casts
will be removed in the next commit, which needs to modify those lines
anyway.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Ide4dbd0777a44ed0870efffd17394f9f25062122
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 17:38:06 -08:00
Thiago Macieira
272d078926 QRgbaFloat: add support for multiplying & comparing as FP16
AVX512FP16 expanded FP16 support on x86 to all operations (addition,
multiplication, comparison, etc.), so make use of them. Each operation
takes just as many cycles as an FP32 operation, but we avoid converting
between FP16 and PF32 for those operations.

Change-Id: Ide4dbd0777a44ed0870efffd17391370e1638c7a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-01-11 17:38:06 -08:00
Amir Masoud Abdol
59d5a52c22 Clean up an outdated TODO
This doesn't seem to be relevant anymore, and the
`from_lib_location_to_prefix` seems to be set correctly.

Change-Id: I368da226ed33a303662856b0bc3ccbf6c328250a
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-11 22:58:59 +00:00
Amir Masoud Abdol
dc00369c56 Replace the impl of qt_configure_file with qt_configure_file_v2
The new version uses PARSE_ARGV which deals with semicolons better.

Task-number: QTBUG-99238
Change-Id: Ie9276219400326a67ffa9cf5fc456ae7de0bbcd2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-11 22:24:47 +01:00
Mikolaj Boc
21bd782a69 Provide the proper QSysInfo::productType on WASM
Task-number: QTBUG-110057
Change-Id: I73b78e56faa3af858f60b884d0ea36acbd7f78cf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-11 21:17:45 +01:00
Thiago Macieira
03b72188f4 QtGui: fix build with GCC 13's support for FP16
Conversion must be explicit from float, but doesn't need to be from int.

qimage.cpp:1915:33: error: converting to ‘qfloat16::NativeType’ {aka ‘_Float16’} from ‘float’ with greater conversion rank [-Werror]

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd17390a0e86f1fd7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-11 11:16:21 -08:00
Ahmad Samir
299f2a7a3f QStringConverter: add QLatin1::convertFromUnicode() overload
Basically a convenience function for callers that don't need to specif a
state. Will be used in QDateTime in a later commit.

Change-Id: Ie4c516767195f681c89ed72e26653e75a262698c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-11 21:16:21 +02:00
Thiago Macieira
d0408b5f13 tst_QAlgorithms: don't use random numbers in the test row names
Just describe the row instead. We'd lose the original input in case of
failure, so I added a class to print that value on destruction. Example:

FAIL!  : tst_QAlgorithms::countLeading64(0) Compared values are not the
same
   Actual   (qCountLeadingZeroBits(value)): 63
   Expected (expected)                    : 64
   Loc: [tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp(374)]
QWARN  : tst_QAlgorithms::countLeading64(0) Original value was 0x1

Pick-to: 6.4 6.5
Fixes: QTBUG-109958
Change-Id: I69ecc04064514f939896fffd1738b1119cd80cf8
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 11:16:20 -08:00
Marc Mutz
fae85282ba Q{Calendar,Contact}Permission: invert default state of isReadOnly
The QLocationPermission properties default to the least-intrusive
capabilities: Availability::WhenInUse (not: Always) and
Accuracy::Approximate (not: Precise).

Logically, QCalendar- and ContactPermission's readOnly property should
then default to read-only access, not read-write.

Orthogonally to this change of default value, it might make sense to
invert the name of the property, too: isReadWrite() or
hasWriteAccess().

Pick-to: 6.5
Change-Id: I9359c82051b1a6735feca8b2f06b9891acef650f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-11 19:36:27 +01:00
Marc Mutz
afb4e244b0 QPermission: unexport, make fully inline
Non-polymorphic classes should not be exported wholesale, because MSVC
exports inline API in such classes, too, which has caused numerous
problems over the years.

Inline the last two remaining out-of-line functions, as they're
trivial.

Pick-to: 6.5
Change-Id: Ibc415b840b93a7350683e02433108270e1bd6bfd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-11 19:36:27 +01:00
Marc Mutz
c63f9e81dd Rename manual tst_qpermissions to tst_manual_qpermissions
To make space for a tst_qpermissions auto-test.

Pick-to: 6.5
Change-Id: Ic9ead8afa7ecd035fd5ed56c756f0156828c6705
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-11 19:36:26 +01:00
Mikolaj Boc
cf839fe89d Disable CMake test project build tests on WASM
The focus is now to run autotests. The _qt_internal_test_expect_pass
tests will be handled at a later stage.

Fixes: QTBUG-109788
Change-Id: I8a5b5d8b793e5e22faf1876f3d05bc967dbcf777
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-11 19:36:26 +01:00
Eirik Aavitsland
5633cb69f6 Fix deletion order also for QImageReader/Writer::setDevice()
Avoid dangling or incorrect device pointer during handler
destruction. This was recently fixed in the destructors, fixed here
also for the setDevice() functions.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I85b64726cd88d2c8e63eee59d5b4f2ae488df61b
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2023-01-11 19:36:26 +01:00
Liang Qi
ec787ce143 qxcbwindow.cpp: Fix sign-compare and another warnings
qsizetype(int32 on 32bit, int64 on 64bit) vs uint32.

qxcbwindow.cpp: In member function 'virtual void QXcbWindow::setWindowIcon(const QIcon&)':
qxcbwindow.cpp:1300:30: warning: comparison of integer expressions of different signedness: 'qsizetype' {aka 'int'} and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare]
 1300 |         if (icon_data.size() > xcb_get_maximum_request_length(xcb_connection())) {
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qxcbwindow.cpp:1301:53: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'qsizetype' {aka 'int'} [-Wformat=]
 1301 |             qWarning("Ignoring window icon: Size %llu exceeds maximum xcb request length %u.",
      |                                                  ~~~^
      |                                                     |
      |                                                     long long unsigned int
      |                                                  %u
 1302 |                      icon_data.size(), xcb_get_maximum_request_length(xcb_connection()));
      |                      ~~~~~~~~~~~~~~~~
      |                                    |
      |                                    qsizetype {aka int}

This amends ebdaf8ef9c.

Fixes: QTBUG-109610
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I2c9b5ad27881658463dd0870639c42d3ea8e7aba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-01-11 16:26:50 +01:00
Timothée Keller
a67607480d Windeployqt: Multiple directory use warning
Added a warning for when windeployqt is used with multiple binaries
which are in different directories.

Pick-to: 6.5
Change-Id: Ic43aa9847eb2bf6927cebf5d457595eed6b16b5a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-01-11 16:07:46 +01:00
Ben Fletcher
0d7401d51b RHI: Metal tessellation fixes
This patch fixes four issues with Metal tessellation.

a) Shader resource binding
The Metal tessellation implementation assumes identical SPIRV-Cross
native Metal resource binding mapping for vertex, tessellation control,
and tessellation evaluation shaders.  These mappings are independently
generated by SPIRV-Cross for each shader stage, and may not always be
identical.  This patch allows for different resource bindings for each
of the vert/tesc/tese stages.

b) Tessellation evaluation vertex descriptors
The Metal tessellation evaluation render pipeline vertex descriptor
generation code contains a bug where attribute offsets and built in
variable locations could be calculated incorrectly if the tessellation
control shader output variables are not provided in ascending location
order.  This patch fixes this by sorting the variables by location
before processing.

c) Render pass descriptor
Metal tessellation draw ends the current render pass encoder to perform
tessellation compute tasks on a compute pass encoder.  When the compute
pass is completed, a new render pass encoder is created to continue
rendering.  A bug exists where the new render pass encoder uses a render
pass descriptor that clears the color, depth and stencil attachements.
This patch fixes this bug by changing the render pass descriptor color,
depth and stencil attachment load actions to MTLLoadActionLoad when
appropriate.

d) drawIndexed
A bug exists where when drawIndexed is called, the Metal tessellation
vertex as compute stage input descriptor buffer layout step function
gets set to MTLStepFunctionThreadPositionInGridX rather than the indexed
version MTLStepFunctionThreadPositionInGridXIndexed.  This patch fixes
this by selecting the appropriate step function.

Pick-to: 6.5
Change-Id: I122c67394719ad6b4801cd7643043839fd186bf2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-11 10:07:46 -05:00
Jan Grulich
a647d18df2 QCryptographicHash[OpenSSL]: do not resize result when adding data
This is unnecessary and basically doesn't have any effect.

Pick-to: 6.5
Change-Id: I6b63e989c43bdcd55bf83d2c0756da2de1ab49df
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 16:07:46 +01:00
Friedemann Kleint
8fccba0e63 Documentation: Port code snippets to new connection syntax
Pick-to: 6.5 6.4 6.2
Task-number: PYSIDE-2182
Change-Id: I5f800cf3a4a7afefbc36a79372fc35449fa953f0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-11 15:20:06 +01:00
Amir Masoud Abdol
e6693163e5 Disable PkgConfig for Android
We decided that it's better to disable PkgConfig for Android, as it is
unlikely that someone uses them.

Task-number: QTBUG-110007
Pick-to: 6.5 6.4 6.3 6.2
Change-Id: I6ae1059ddd05feeec047fbb906c7dba1586e816b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-11 13:48:48 +01:00
Joerg Bornemann
85d235877d CMake: Store whether a module is internal in module json files
Pick-to: 6.5
Change-Id: Ic7e5e3b69a41a7723643332bebbde76854966b89
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-01-11 13:02:58 +01:00
Timothée Keller
2a732020ff Windeployqt: change qml import handling
Made it so that qml dependencies will be imported for all invoked
binaries, rather than just the first one.

Task-number: QTBUG-99125
Pick-to: 6.4
Change-Id: I0d97905c59281a03ef2126ae1c436f1034e1575d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-01-11 13:02:58 +01:00
Mikolaj Boc
22e96ca50d Use consistent collation testability criteria in corelib/text
tst_qstringapisymmetry needs to use the same collation testability
criteria as tst_qcollator, that is, the locales that may be tested
without ICU and not on Mac nor Windows are only the system locale and
C locale.

Task-number: QTBUG-109954
Change-Id: I69f19ae28b3a16b3827c1eee62ae59fcfdf45209
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-11 08:47:59 +00:00
Giuseppe D'Angelo
4411406d97 QTimeZonePrivate: fix a QL1S/QBAV mixed comparison
Mixed operations with QByteArrays trigger deprecation warnings.  We
don't have a Latin1/UTF-8 mixed comparison, so simply unroll what
operator== did: convert the byte array to QString and then do the
conversion there. But do it better -- only once and not at every
operator== call.

Task-number: QTBUG-100234
Change-Id: I4c6a4b92e175c536f69debf822b10688588e6c6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-11 04:01:08 +01:00
David Faure
56b904938d QAbstractProxyModel: normalize signals/slots signatures
This is better for performance.

Switching to PMF connects would break some subclasses outside Qt
(like KExtraColumnsProxyModel) which need to disconnect some
internal connections,so it would require adding API to toggle
those things; too complicated for this small performance fix.

Change-Id: If89dbadc9cc84c94ca70b71cbc5afc267aebffd1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-11 00:24:00 +01:00
Axel Spoerl
cccdd89ac8 Revert "Fix tst_QWidgetRepaintManager on XCB"
This reverts commit 4096667d66.

Reason for revert: <Screen shot workaround is flaky.>

Change-Id: I6e01cc584c094d0d0b8c1544b9daf72d648dd002
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-10 23:03:30 +00:00
Mikolaj Boc
a071bd674a Correctly determine if posix collator is used in tst_qcollator
qcollator_posix.cpp is included if ICU is not used and the OS is not
Win nor macOS. Reflect that fact in tst_qcollator instead of using
alternative means which breaks with new platforms that use the
posix collator.

Task-number: QTBUG-109954
Change-Id: I592500ce9626efbcc9377cecf6641967f978c6da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-10 23:25:42 +01:00
Giuseppe D'Angelo
7f1d3c09c9 QTimerInfo: re-pack the members
0148c6925e added support for qint64
intervals in the abstract dispatcher. Changing the `int` interval
to `qint64` causes padding in the QTimerInfo struct.

On X86-64:

    struct TimerInfo {
	    int                        id;                   /*     0     4 */

	    /* XXX 4 bytes hole, try to pack */

	    qint64                     interval;             /*     8     8 */
	    enum TimerType             timerType;            /*    16     4 */

	    /* XXX 4 bytes hole, try to pack */

	    struct timespec            timeout;              /*    24    16 */
	    class QObject *            obj;                  /*    40     8 */
	    class QTimerInfo * *       activateRef;          /*    48     8 */

	    /* size: 56, cachelines: 1, members: 6 */
	    /* sum members: 48, holes: 2, sum holes: 8 */
	    /* last cacheline: 56 bytes */
    };

On ARM32:

    struct TimerInfo {
	    int                        id;                   /*     0     4 */

	    /* XXX 4 bytes hole, try to pack */

	    qint64                     interval;             /*     8     8 */
	    enum TimerType             timerType;            /*    16     4 */
	    struct timespec            timeout;              /*    20     8 */
	    class QObject *            obj;                  /*    28     4 */
	    class QTimerInfo * *       activateRef;          /*    32     4 */

	    /* size: 40, cachelines: 1, members: 6 */
	    /* sum members: 32, holes: 1, sum holes: 4 */
	    /* padding: 4 */
	    /* last cacheline: 40 bytes */
    };

Change the order of the members, so we remove the padding:

    struct TimerInfo {
	    int                        id;                   /*     0     4 */
	    enum TimerType             timerType;            /*     4     4 */
	    qint64                     interval;             /*     8     8 */
	    struct timespec            timeout;              /*    16    16 */
	    class QObject *            obj;                  /*    32     8 */
	    class QTimerInfo * *       activateRef;          /*    40     8 */

	    /* size: 48, cachelines: 1, members: 6 */
	    /* last cacheline: 48 bytes */
    };

Pick-to: 6.5
Change-Id: Ia1cc56e497f87611fa411a19361f8ebb13ff1f67
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-10 20:55:17 +00:00
Mikolaj Boc
df030e06a8 Adapt the qstringbuilder test for batching
There are numerous conflicting symbols in the tst_qstringbuilder\d
variants when batching those together. Remove the linkage from symbols
by putting the common include stringbuilder.cpp in an unnamed
namespace.

Task-number: QTBUG-109954
Change-Id: Ic2a745795b57482c90c9def7667a1145cdb19854
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-10 20:09:35 +01:00
Kai Köhne
042c7e58e2 Doc: Fix snippet in Applications Permissions page
Pick-to: 6.5
Change-Id: I05b7145053f040852765f533f396e25d484f9ac0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-10 20:09:35 +01:00
Marc Mutz
4ec8a6e2cb QPermissions: remove extra ';'
Pick-to: 6.5
Change-Id: I68f5e1cfc780061365c6d3d75e51eda2b39c8ace
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-10 20:09:34 +01:00
Tor Arne Vestbø
419cf9245a Clarify that QKeyEvent::text() may return non-printable characters
This is the case for keys such as Qt::Key_Delete ("\u007F"),
and Qt::ControlModifier + Qt::Key_C ("\u0003") on Windows and XCB,
as well as potentially any key event on macOS when IM is not enabled,
as of 705665957b.

We can not filter QKeyEvent text() based on QChar::isPrint() or
similar, as there might e.g. be valid printable text in the private
use area, depending on the script and available fonts.

See QInputControl::isAcceptableInput() for some of this complexity.

Task-number: QTBUG-106393
Change-Id: I84d7ed86f57c1b605ac512d0f7ab66f6a11ed7bb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-01-10 20:09:34 +01:00
Kai Köhne
2c78c5d456 Doc: Fix qt_attribution.json files using Path for files
Since qttools commit 39fdcb8e7a, qtattributionsscanner fails
if 'Path' is not a directory. Use the 'Files' attribute instead.

Pick-to: 6.4 6.5
Fixes: QTBUG-110002
Change-Id: I65fecdcb852ce9abea55f168cd939804bae9ae80
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-10 19:09:34 +00:00
Edward Welbourne
377a9f7768 QLocaleData::numberToCLocale(): clarify some conditionals and comments
Some of the complex conditionals were done in two stages, with an
outer condition on a block with a comment explaining an inner
condition.  Rework those to simpler statements in the conditions and
move the preconditions of what each comment explains to the outer
conditional.

In the process, refine some of the conditionals. All group-size checks
should be conditioned on last_separator_idx != -1, since we only
constrain grouping by its rules, when present. The grouping separator
can be empty (in system locale, if configured by user) so grouping
can't be mandatory.

Change-Id: Id3af7aafa6f70ecaea020a9fe0d6031f1ed9f84e
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-01-10 19:42:27 +01:00
Tor Arne Vestbø
9a2198f9cd macdeployqt: Don't remove rpaths more than once
In a universal build the tool will find multiple duplicated rpaths,
but the install_name tool doesn't like it if we try to remove it
more than once.

Fixes: QTBUG-109738
Pick-to: 6.5 6.4 6.2
Change-Id: I4a8bea0ad3e47b28e6384ceead551edc83e30d26
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-10 16:21:12 +01:00
Juha Vuolle
40cb7434af Adjust the SDK/API version check for getInsetsController()
The function is introduced in API level 30, causing an error
on a 29 device

Amends: eda4049a01

Pick-to: 6.5 6.4 6.2
Change-Id: I5f4e2301d04a0a2e0e2f4037e4c371efd2fef352
Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-01-10 15:35:32 +02:00
Mikolaj Boc
d8d1049ff8 Add Qt::Gui to batches unconditionally
This is needed for static plugins to work correctly as currently
the only place where plugin logic is handled for non-standalone
builds is in qt_internal_add_executable - adding the library later
when encountered in one tests that get batched does not trigger
plugin handling logic.

Fixes: QTBUG-109812
Change-Id: Idcc2bc6b42b2b7ad6afb9796f554b0529de3de5f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-10 13:26:22 +01:00
Tor Arne Vestbø
adb91d6afb Enable shared library build of Qt for iOS
As of f68e2c92cc, and its follow up
changes, we can now link individual plugins statically, even if the
Qt build is generally a shared build.

This allows us to build Qt for iOS as shared libraries, while still
keeping the platform plugin as a static library, since this is
harder to port over to a shared library.

This gives the benefit of faster turnaround during development, as
well as binary compatibility promises for the main Qt libraries,
without having to go fully shared for all of Qt.

Static builds are still the default, due to the downsides of larger
application bundles and slower load times for shared builds.

For now the user has to manually tick the "Embed & Sign" check
box in Xcode for each Qt library, which is only available with
Xcode projects generated by the qmake Xcode generator.

Task-number: QTBUG-85974
Change-Id: Id2b7bd2823c8e7c79068dda95295b574ada8d7f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-10 13:16:04 +01:00
Tor Arne Vestbø
c0967bd288 permissions: Improve error when building example on non-supported platform
Pick-to: 6.5
Change-Id: I02f4fc087d49d21541b1e415db411c09db981278
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-01-10 13:16:03 +01:00
Joerg Bornemann
8aa15f060d windeployqt: Remove support for QtQuick1
This module is long gone.

Pick-to: 6.5
Task-number: QTBUG-105135
Change-Id: I58bb2dd04a278830a34747267c6c6058614b7342
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-01-10 11:30:02 +01:00
Axel Spoerl
4096667d66 Fix tst_QWidgetRepaintManager on XCB
Due to an XCB library change, QXcbBackingStore::toImage() cannot be
safely assumed to return an image identical to QWidget::grab().
The test functions fastMove(), moveAccross() and moveInOutOverlapped()
relied on QXcbBackingStore::toImage() and failed.
They were backlisted on Linux/XCB.

This patch obtains a screen shot instead of an image from the backing
store on XCB platforms. It processes events until the screen shot
matches QWidget::grab(). It makes the test fail only if the comparison
times out.
The patch also removes the BLACKLIST file, containing only the test
functions mentioned above.

Fixes: QTBUG-109036
Pick-to: 6.5 6.4
Change-Id: I26dd5b89dc62b313db066a285f6ad7d4d92baaf2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-10 05:45:02 +00:00