Commit Graph

59765 Commits

Author SHA1 Message Date
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
Marc Mutz
f6b026eed1 Move QTypeInfo<std::pair> from qpair.h to qtypeinfo.h to avoid ODR violation
First off, this doesn't cost us anything, because std::pair is defined
in <utility>, which qglobal.h unconditionally includes in C++ TUs.

More importantly, it prevents ODR violations: when a TU includes only
qtypeinfo.h, it will find std::pair<int, int> to be of Q_COMPLEX_TYPE,
in constrast with a TU which includes qpair.h, which will find it to
be of Q_PRIMITIVE_TYPE instead.

[ChangeLog][QtCore][QTypeInfo] The QTypeInfo for std::pair/QPair will
now be correct even if qpair.h hasn't been included, fixing an
One-Definition-Rule (ODR) violation.

Pick-to: 6.5 6.4 6.2
Change-Id: I51f579c123183af25aac9f0ffcf077f752848fb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-10 01:32:49 +01:00
Morten Sørvig
d55d93629b wasm: move Q_AUTOTEST_EXPORT to correct location
Should be placed between "class" and the class name.

Change-Id: I418cdc2b200bf7b5147d4b4278f3d0b77786710d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-09 21:22:26 +00:00
Marc Mutz
70e070ecbd tst_QSqlRecord: replace manual memory management with unique_ptr
Also replace the C array with a std::array and (some) indexed loops
with ranged-for loops. Most loops need the index in one way of
another, so can't easily be converted to ranged.

Pick-to: 6.5 6.4 6.2
Change-Id: I7fa05f22de9df6c68ec5797c9583476a3881532c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2023-01-09 22:21:12 +01:00
Volker Hilsheimer
1c5e6615c7 QKeySequenceEdit: fix typo in parameter name
Amend 1ea0d399b3.

Pick-to: 6.5
Change-Id: I0762beb1da201006ddffc6c05ac204b710055d3f
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-01-09 21:05:26 +01:00
Liang Qi
cf145a34b4 QOffsetStringArray: fix -Werror=type-limits
GCC complains:

  qoffsetstringarray_p.h:85:27: error: comparison is always false due to limited range of data type [-Werror=type-limits]
     85 |     if constexpr (Highest <= (std::numeric_limits<quint8>::max)()) {
        |                   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix by casting the RHS (of limited-range type) to size_t, the type of
the LHS.

Fixes: QTBUG-109875
Pick-to: 6.5 6.4 6.2
Change-Id: I494ea544b8b3bfd877443119eebc160eb2f8e063
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-09 20:37:53 +01:00
Volker Hilsheimer
58afdea1b3 tst_Gestures: Don't accumulate global state
(Un)Register the custom recognize in init() and cleanup() instead of
initTestCase() and cleanupTestCase(), so that a new recognizer is used
for each test function.

In the test functions, use a scope guard to unregister the locally
registered recognizers to make sure that in the case of a failing test
and early return, the recognizer is removed.

Pick-to: 6.5 6.4 6.2
Change-Id: I4fe9509f35474514ef55191d799e6707199fe853
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-01-09 19:37:53 +00:00
Eskil Abrahamsen Blomfeldt
49a63d3759 Fix infinite layout loop with negative line width
Setting a negative line width does not make much sense, but in
earlier Qt versions, this work the same as if the line width was 0
(just give you the minimal layout given wrapping constraints).

But since 991c056438, we check if
current width > line width at an earlier point, and because 0 > -1,
we would exit immediately before adding any characters to the text
line.

To restore the behavior in earlier versions, we set the minimum
possible line width to 0.

Pick-to: 6.5
Fixes: QTBUG-109474
Change-Id: Iceadd5135681f61b30de8221853834983941c5a4
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: hjk <hjk@qt.io>
2023-01-09 14:48:39 +01:00
Amir Masoud Abdol
07a978c756 Use the Windows path separator in a Batch file
Patching inconsistent path separator in Batch file. This at some point
may lead to something similar to the mentioned task.

Pick-to: 6.4 6.5
Task-number: QTBUG-109857
Change-Id: I36c05dc7a0b7daf3dc5dced61f3c3f7d90eb59e3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-09 14:39:27 +01:00
Tor Arne Vestbø
e0bb9e81ab Don't override QDialog::setVisible() to implement native dialogs
Clients who called the base-class implementation in QDialog would
as a result start hitting the canBeNativeDialog code path at the
start of QDialog::setVisible(), which would show the native dialog,
but without updating the QWidget visibility state.

To keep things 100% compatible, we shuffle the implementation of
QDialog::setVisible() into QDialogPrivate, which allows us to
override it in QMessageBoxPrivate and QErrorMessagePrivate.

The existing subclasses of QDialog that override setVisible have
been left as is, to not cause any unintended behavior change.

Pick-to: 6.5
Change-Id: Icafe31a7b84a75049365e4e04b80492de08614d2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-09 14:14:53 +01:00
Tor Arne Vestbø
349fda471e Fix QErrorMessage test when using native dialogs
When the test is showing the error message over and over, it's not
waiting for the native dialog to actually become visible, and as
a result, hiding it has no effect and won't result in a call
to processResponse, where we got rid of the native dialog.

To fix this we explicitly release the native dialog when
encountering this corner case.

Add logic to QErrorMessage to test both native and non
native dialogs.

Pick-to: 6.5
Change-Id: I19ac3f463997aed1e66f646fdfcbb4d2459116d1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-09 14:14:49 +01:00
Laszlo Agocs
08b71d8619 Scale the default 5 ms requestUpdate interval based on the refreshRate
5 ms barely works for 144 Hz screens (when we have 6.94 ms altogether).
For 240 Hz (4.16 ms) it is definitely wrong.

Instead of picking another fixed value, scale based on the reported
refresh rate. (60 -> 5, 144 -> 2, 240 -> 1)

Fixes: QTBUG-109679
Change-Id: I75d91d8e351149987f4afd673d6dedbda2fb388a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-01-09 12:49:15 +01:00
Timothée Keller
b53701d3aa Windeployqt: Remove quint64 type for QtModule
Changed the type of the QtModule enum to no longer be quint64, since
the bitset change doesn't require it anymore.

Pick-to: 6.5 6.4
Change-Id: I000107d23da959c28c26086f0b704252f36619f8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-01-09 12:49:09 +01:00
Giuseppe D'Angelo
e816f91541 Moc: avoid double underscores in a generated identifier
In order to generate metadata for a class `NS::Class`, moc will
"mangle" its name by turning the colons into underscores. This
however makes the generated name have a double underscore, and
all names with double underscores are reserved.

Instead, replace double colons with another string ("SCOPE").

We are then going to use this mangled name to create other identifiers.
To do so, underscores may get appended and prepended to the mangled name
(e.g. "qt_metadata_" + mangled_name + "_t"). This means that a leading
or trailing underscore in the mangled name would also be problematic;
avoid that as well.

Pick-to: 6.5
Fixes: QTBUG-109851
Change-Id: I01391a57920545fc75f78ef4bfefaf6d3dd7b447
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-09 12:28:08 +01:00
Tatiana Borisova
676a2fe36f Fix RTA test build for INTEGRITY
In case of QT_FEATURE_timezone=OFF test should not be built

Change-Id: If667b9edb1d670b9ed8a62f301a7e5e21e7d2b4c
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-01-09 11:47:37 +01:00
Morten Sørvig
8611b9d8be wasm: make qtloader print stack trace on exception
We were displaying the exception type by on the error
page, however the exception contains a stack trace as
well which we can print to the console.

Pick-to: 6.4 6.5
Change-Id: Ia6c95c3f179eb68e57f9d6d2d8ad960591d0b365
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-01-09 09:41:26 +00:00
David Edmundson
8e218c11c0 Avoid qt keywords in installed headers
Pick-to: 6.5
Change-Id: I14f3e02d2b568ae16beb07c8920df37981f3d0da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-09 09:24:31 +00:00
Ivan Solovev
a8261e327d QPromise: improve documentation snippet
The multi-thread snippet in the documentation, when copied as is,
could actually crash because of the race condition between the main
thread and the thread that generate results for the promise.
This is fixed by explicitly calling QPromise::start().
Actually, the underlying snippet already has this call, it just was
not included in the documentation.

This patch modifies the documentation snippet to include calls to
both QPromise::start() and QPromise::finish().

Fixes: QTBUG-109230
Pick-to: 6.5 6.4 6.2
Change-Id: Ic25f31a6b3b16ba6bc06a0b199289c8c5d50bab6
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
2023-01-09 10:03:48 +01:00
Topi Reinio
8a30b22930 Doc: Fix linking to 'Drag and Drop' topic
Linking to 'Drag and Drop' target will link to a page local to Qt
Widgets with that section title. The intention is to link to the
topic page located in Qt GUI module.

Add a descriptive keyword to the correct target page and use that
for linking.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109289
Change-Id: Ib6a39b43f9080cf5bb72fb07ab163e75eefb4da9
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-01-09 09:44:40 +01:00
Janne Koskinen
88b484e588 Suppress warnings from Integrity builds
We are seeing ~200 000 compiler warnings coming from Integrity compiler
not seen on other compilers. Suppress these as a hotfix reduce the
load on CI.

Change-Id: I9636104f07e81f9f5cf39b7fac2ac34ec2456db5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-09 10:34:33 +02:00
Ahmad Samir
8e0e6f12c0 QLatin1StringView: fix include guard name
Change-Id: I089b5671c02e61310698a6938ef8e3ba189c633b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-08 18:01:08 +02:00
Kaj Grönholm
df00f9ea86 Support serializing the QShader for qsb version
Support serializing shaders with specific qsb version. The default
behavior remains the same, using the latest version.

Task-number: QTBUG-101062
Pick-to: 6.5
Change-Id: I090a88c1ccb3be4ac5eee1da4058afaa8bf3111c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-07 18:24:47 +01:00
Ahmad Samir
90751ff13d QLatin1StringView: remove redundant inline keyword
Member functions defined in-class are inline by default. New header
file, let's start with a clean slate.

Change-Id: I5f2192fdf32356ab20363cee56ccdcb989146c5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-01-07 17:43:57 +02:00
Ahmad Samir
1356ca05c2 RCCFileInfo: refactor
- Initialize members in-class, and in ctor init-list as needed. This
  simplifies the constructor and is generally safer as one can't forget
  to initialize a member, especially built-in types
- Add copy control members, this is actually a move only class because
  of the QMultiHash<QString, RCCFileInfo*> member and the destructor
  calling qDeleteAll
- Minor, save a couple of bytes by reordering the members so that they
  are in 8 byte chunks as much as possible, sizeof(*this) is now 104,
  was 120

Change-Id: Idcf7c5a99fdf02854e09e3c1cade6c8d238ed492
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-07 17:23:18 +02:00
Friedemann Kleint
fe4cc2793f Documentation: Clarify the meaning of the precision parameter for double formatting
Move it to the table for QLocale::toString() to make it more prominent.
Explain the meaning for QTextStream::realNumberPrecision().

Pick-to: 6.5 6.4 6.2
Change-Id: Ic2da22ff6bea09e79e17f19b4636cef35dc3a615
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-07 10:37:53 +00:00
Volker Hilsheimer
eac9e74d92 Dark windows: use background/foreground colors for tooltips
That follows what File Explorer on Windows 11, or the system UI does for
tooltips in modern UI elements (the tooltip for the "minimize" button in
a titlebar still shows the yellow-colored tooltip). Using the accent
color makes the tooltip pop a lot more, but doesn't look native.

Also make the toolTipPalette helper function do something useful in dark
mode.

Pick-to: 6.5
Change-Id: I2b07abd72eee50508f19f46aaec3408183c27100
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-07 04:57:32 +01:00
Ahmad Samir
c630b231ec Untangle QLatin1StringView from qstring.{h,cpp}
Searching in qstring.{h,cpp} is slightly easier (it's already too
long).

From the task:
Having similarly-structured header files for all the view classes would
help rebasing the different view classes onto a common template come Qt
7.

Diff best viewed in terminal with git's diff.colorMoved config set to
default.

Task-number: QTBUG-103509
Change-Id: Ie791760bb5bfa23def98d67c206ae8fd00c5f6e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-07 04:03:22 +02:00
Joerg Bornemann
0b92502de2 CMake: Store the plugin types in the module json files
This will be read by windeployqt.

Pick-to: 6.5
Change-Id: I8dfebae755ef61967e924db3c5631af5cc4e2440
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-06 22:05:57 +01:00
Ahmad Samir
26b5325767 QFileInfo: use currentDateTimeUtc()
Instead of the more verbose currentDateTime(QTZ::UTC).

Pick-to: 6.5
Change-Id: Ie759f4270b12fca39c458bf85c8296f5342033db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-06 17:57:52 +00:00
Ahmad Samir
905bc62933 QDir: when sorting by Type, cache the suffix in QDirSortItem's ctor
The predicate passed to e.g. a std::sort shouldn't modify the objects
it's called on, so move filling the cache to the QDirSortItem
constructor where possible. While that can't be done in all cases, e.g.
filename_cache is used as the tie-breaker when two items have the same
time or type ...etc, so it's only assigned to _if_ needed, we can at
least move some stuff out of the predicate to the QDirSortItem c'tor.

Drive-by change: replace comment with asserts

Change-Id: I0199797ab8e261fe3c0fcb791cfc69b23b6fdc48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-06 19:57:21 +02:00
Thiago Macieira
ce8fc1e88e QUrl/doc: explain that the scheme-less URL is probably not intended
It is a valid URL reference, which is not what people may want.

Fixes: QTBUG-109855
Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd173783ce2228c1d2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-01-06 14:31:38 -03:00
Thiago Macieira
a2fe332033 Fix improper ELF versions of two more classes
They got marked as Qt6_PRIVATE_API because of these ARE private classes,
however their pointers are used in user code. For QMutexPrivate, because
we manipulate the pointer in inline code; for QPostEventList, because
it's used in a virtual member function's parameter list.

Pick-to: 6.5
Fixes: QTBUG-109605
Change-Id: I69ecc04064514f939896fffd1736d1fa8d3f1768
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-06 14:31:38 -03:00
Thiago Macieira
dd7931d580 syncqt: add some debugging to the ELF version script parsing
Drive-by fix spelling-grammar.

Pick-to: 6.5
Task-number: QTBUG-109790
Change-Id: I69ecc04064514f939896fffd1736d3bb49e73ee1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-06 17:31:37 +00:00