| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The result is generally more readable.
Change-Id: I507f67954ecd38516de1b7a6f8244c233ee45ddf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all
checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in
some places in the process, particularly #include order.
Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
Causes warnings with clang-cl
Change-Id: I57395819debe07aecd045c5a8c747632e6c04fc1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
| |
Change-Id: I82b0a7ec28400dac64ea785ba6766ca488e615aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
While the data subobject is at the same position in memory as the
QVariant::Private, using d.data actually activates the union member.
Change-Id: Ie6879b588c8e830ae8b34cfcd8e9ddff8b60b3a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somehow it's not expanding properly in constexpr time.
qproperty_p.h:554:30: error: \u2018(QItemSelectionModelPrivate::modelChanged != 0)\u2019 is not a constant expression
if constexpr (Signal != nullptr) {
~~~~~~~^~~~~~~~~~
Fixes: QTBUG-96659
Change-Id: I3eb1bd30e0124f89a052fffd16a69d2eb4b45784
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1
Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Passing nullptr as receiver and/or as an event parameter to sendEvent,
postEvent, etc. is meaningless. It's also something that users can check
for. Therefore, it should not be allowed. Note that the current code
already relies on the arguments not to be null, albeit "indirectly"
(e.g. they get dereferenced without any null checks).
Hence: add asserts that check for non-null in all the relevant
codepaths, except for the ones in which there's currently just a
warning; for those, add a Qt 7 note.
Change-Id: Ia4c58551de88a5d1003f09efa448c1330b6cb122
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
| |
Call emscripten_set_main_loop like the old GUI event
dispatcher did, with one difference that requestAnimationFrame
updates are now no longer handled by the event dispatcher.
Change-Id: If02d90ae9c45d7b38999567d733a237af842cded
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
That way, we can add the NOLINTNEXTLINE comment to suppress clang-tidy,
which otherwise flags all usage of const_cast in C++ code.
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a247b96d223772
Reviewed-by: Rui Oliveira
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: Ia957cedb4c80cbab956d93c5f1af4d3dd5209089
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation links on `msdn.microsoft.com` and
`msdn2.microsoft.com` now redirect to `docs.microsoft.com`.
Some of the links in the documentation were to those domains.
In particular:
- An `\externalpage` link to the `Mitigating Cross-site Scripting With
HTTP-only Cookies` article.
- An `\externalpage` link to `Microsoft Actibe Accessibility Event
Constants`
- A link to the `RtlGetVersion` function in
`qoperatingsystemversion.cpp`
- A link to the `GetCommandLine` function in `qcoreapplication.cpp`
- A link to the `KNOWNFOLDERID` constant in `qfiledialog.cpp`
While the redirection works, our script to catch broken links on
dev-snapshots builds of the documentation doesn't handle redirection
correctly, reporting it as broken.
Both to appease the broken-links script and to avoid an unneccesary
redirection, the above links were modified to
point to the equivalent address in the new domain.
Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: I0e9a132f06af7fc43bca6c8ad2054feb6e3e27cd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid use-after-free issue in QProcess.
Fixes: QTBUG-96285
Fixes: QTBUG-96359
Pick-to: 6.2 6.1
Change-Id: I953d7a8ecaf301ec3a27db37e13748f905c3d097
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The comment for keepAlive means that it should be destroyed after the
updateGuard goes out of scope and restores its value. In this case
keepAlive should be actually created *before* updateGuard, not after it.
Pick-to: 6.2 6.2.0
Task-number: QTBUG-96303
Change-Id: I4f8e67b49c1d6579228e22111105fb936f1f94db
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang 13 now outputs "unnamed struct" just like GCC, while it earlier
used to output "anonymous struct" (since
https://reviews.llvm.org/D96807).
Therefore, for Q_CC_CLANG check for both "anonymous" and "unnamed".
This fixes the QMetaType testcase when built with Clang 13.
Change-Id: I34de8c2ca05c0e691fbb990b001f011b0f336dc3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
Show the warning (and call emscripten_sleep) for the standard
build, but not for the asyncify build.
Change-Id: I695a580ea60897872beee6fa2b6ae70acb9e7dcf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
| |
Instead of making it return a non-useful nullptr.
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a245cce5ea65f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Potantially Source-Incompatible Changes] The macro
Q_DECLARE_INTERFACE used to cast away the constness of the QObject
parameter. That is now fixed in this release, but may cause failure to
build source code that depended on this incorrect behavior. If fixing
the const correctness in your code is not an option, insert an explicit
const_cast<IFace *> of the object prior to the qobject_cast call.
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a246a36f0c088f
Reviewed-by: Rui Oliveira
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Pointed out by the INTEGRITY compiler.
Change-Id: Id5f9b994c348308c56c3a25200419be525b9c933
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The connect() documentation makes it clear that UniqueConnection does
not work with free functions / function objects and the like; only with
actual PMFs. Rather than silently *ignoring* the flag, be vocal about its
presence by warning, and make the connection fail (as the user has
passed an illegal argument).
[ChangeLog][QtCore][QObject] QObject::connect() now will refuse to
connect a signal to a free function / function object if UniqueConnection
is passed. Note that UniqueConnection has never worked for such
connections -- the flag was simply ignored, and they were established
multiple times. Now, the flag is not ignored and results in a connection
failure (as well as a runtime warning by Qt).
Change-Id: I6509667018c74f9bd24910cde0a1b16c5f84f064
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add QEventDispatcherWasm to QtCore. The event dispatcher
supports managing event queue wakeups and timers, both
for the main thread or for secondary threads.
Blocking in processEvents() (using QEventLoop::WaitForMoreEvents)
is supported when running on a secondary thread, or
on the main thread when Qt is built with Emscripten’s
asyncify support.
Code is shared for all both modes as far as possible,
with breakout functions which handle main and secondary
thread as well as asyncify specifics,. Some functions
like wakeUp() can be called from any thread, and needs
to take the calling thread into consideration as well.
The current asyncify implementation in Emscripten is
restricted to one level of suspend, and this restriction
carries over to Qt as well. In practice this means we
support one level of exec()-like API.
Note that this commit does not _enable_ use of the
new event dispatcher. This will be done in separate
commits.
Task-number: QTBUG-76007
Task-number: QTBUG-64020
Change-Id: I77dc9ba34bcff59ef05dd23a46dbf1873cbe6780
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
| |
Change-Id: I2a8b75294ee3bde008bcff37519da087f603ca51
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Tag deprecated Q(Multi)Map operators in the header to correctly
match them with documentation \fn commands.
* Add documentation for QByteArrayView comparison operators.
* Add a dummy typedef 'jfieldID' for generating docs correctly
on non-Android platforms
* Fix other minor issues
Pick-to: 6.2
Task-number: QTBUG-95860
Change-Id: I141d2f75d6aa10557aa374201f09ad74b4cd6e81
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As QPropertyAlias was public by accident in 6.0, we have to ensure that
it still works in 6.2.
This re-adds some tests for it, and reimplements the unlinking
functionality. To avoid performance regressions in hot-paths,
a new unlink_fast function is added, which behaves like the old unlink:
It ignores the special handling for QPropertyAlias, so that we can skip
the tag check. It is only used in QPropertyObserverNodeProtector and
clearDependencyObservers, where we already know the type of the
observer.
Fixes: QTBUG-95846
Pick-to: 6.2
Change-Id: Ifb405b8327c4d61c673b1a912ed6e169d27c2d8f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite keysToValue() as suggested by a comment:
- Don't use the moral equivalent of
QString::fromLatin1(keys).split().front().toLatin1(),
use QStringTokenizer over QLatin1Strings, removing lots of
allocations.
- Use QL1S instead of raw char* and strcmp(), because that made the
old code rely on NUL-terminated tokens after splitting, which is no
longer the case when using QStringTokenizer.
- Use the new stringDataView() instead of stringData() to avoid
QByteArray dtors littering the code.
- Extract Method parse_scope(), using high-level API operating on QL1S
to see what it's actually doing, instead of previous low-level
bit-pushing with char* and ints that did a good job of obfuscating
the purpose of all the scanning.
- Extract Method lookup() as a lambda to make the main loop of the
algorithm more readable.
- Extract Method className() to delay looking up the class name until
it is required (and help with readability). This could be further
optimized by memoizing the result, but I'm convinced that's not
worth the effort.
The code now no longer allocates, but we still can't mark the function
as noexcept, because stringDataView() contains a Q_ASSERT, so the
function has preconditions.
Results show that the new code is up to 2x faster than the old, and
never slower (within measurement uncertainty):
PASS : tst_QMetaEnum::keysToValue(0 bits set)
- 0.00042 msecs per iteration (total: 56, iterations: 131072)
+ 0.00012 msecs per iteration (total: 68, iterations: 524288)
PASS : tst_QMetaEnum::keysToValue(1 bits set)
- 0.00079 msecs per iteration (total: 52, iterations: 65536)
+ 0.00024 msecs per iteration (total: 63, iterations: 262144)
PASS : tst_QMetaEnum::keysToValue(2 bits set)
- 0.0010 msecs per iteration (total: 71, iterations: 65536)
+ 0.00040 msecs per iteration (total: 53, iterations: 131072)
PASS : tst_QMetaEnum::keysToValue(3 bits set)
- 0.0014 msecs per iteration (total: 98, iterations: 65536)
+ 0.00054 msecs per iteration (total: 72, iterations: 131072)
PASS : tst_QMetaEnum::keysToValue(4 bits set)
- 0.0017 msecs per iteration (total: 57, iterations: 32768)
+ 0.00074 msecs per iteration (total: 98, iterations: 131072)
PASS : tst_QMetaEnum::keysToValue(5 bits set)
- 0.0019 msecs per iteration (total: 65, iterations: 32768)
+ 0.00088 msecs per iteration (total: 58, iterations: 65536)
PASS : tst_QMetaEnum::keysToValue(6 bits set)
- 0.0022 msecs per iteration (total: 74, iterations: 32768)
+ 0.0010 msecs per iteration (total: 72, iterations: 65536)
PASS : tst_QMetaEnum::keysToValue(7 bits set)
- 0.0025 msecs per iteration (total: 85, iterations: 32768)
+ 0.0012 msecs per iteration (total: 79, iterations: 65536)
PASS : tst_QMetaEnum::keysToValue(8 bits set)
- 0.0027 msecs per iteration (total: 91, iterations: 32768)
+ 0.0012 msecs per iteration (total: 85, iterations: 65536)
PASS : tst_QMetaEnum::keysToValue(9 bits set)
- 0.0029 msecs per iteration (total: 98, iterations: 32768)
+ 0.0014 msecs per iteration (total: 97, iterations: 65536)
PASS : tst_QMetaEnum::keysToValue(10 bits set)
- 0.0033 msecs per iteration (total: 55, iterations: 16384)
+ 0.0018 msecs per iteration (total: 62, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(11 bits set)
- 0.0036 msecs per iteration (total: 60, iterations: 16384)
+ 0.0022 msecs per iteration (total: 73, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(12 bits set)
- 0.0036 msecs per iteration (total: 60, iterations: 16384)
+ 0.0018 msecs per iteration (total: 62, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(13 bits set)
- 0.0039 msecs per iteration (total: 64, iterations: 16384)
+ 0.0021 msecs per iteration (total: 70, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(14 bits set)
- 0.0040 msecs per iteration (total: 67, iterations: 16384)
+ 0.0023 msecs per iteration (total: 77, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(15 bits set)
- 0.0042 msecs per iteration (total: 70, iterations: 16384)
+ 0.0025 msecs per iteration (total: 82, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(16 bits set)
- 0.0053 msecs per iteration (total: 88, iterations: 16384)
+ 0.0028 msecs per iteration (total: 92, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(17 bits set)
- 0.0048 msecs per iteration (total: 80, iterations: 16384)
+ 0.0029 msecs per iteration (total: 97, iterations: 32768)
PASS : tst_QMetaEnum::keysToValue(18 bits set)
- 0.0050 msecs per iteration (total: 83, iterations: 16384)
+ 0.0031 msecs per iteration (total: 51, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(19 bits set)
- 0.0051 msecs per iteration (total: 85, iterations: 16384)
+ 0.0037 msecs per iteration (total: 62, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(20 bits set)
- 0.0053 msecs per iteration (total: 88, iterations: 16384)
+ 0.0041 msecs per iteration (total: 68, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(21 bits set)
- 0.0056 msecs per iteration (total: 92, iterations: 16384)
+ 0.0042 msecs per iteration (total: 69, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(22 bits set)
- 0.0056 msecs per iteration (total: 93, iterations: 16384)
+ 0.0044 msecs per iteration (total: 73, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(23 bits set)
- 0.0057 msecs per iteration (total: 95, iterations: 16384)
+ 0.0044 msecs per iteration (total: 73, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(24 bits set)
- 0.0060 msecs per iteration (total: 99, iterations: 16384)
+ 0.0062 msecs per iteration (total: 51, iterations: 8192)
PASS : tst_QMetaEnum::keysToValue(25 bits set)
- 0.0063 msecs per iteration (total: 52, iterations: 8192)
+ 0.0048 msecs per iteration (total: 80, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(26 bits set)
- 0.000381 msecs per iteration (total: 100, iterations: 262144)
+ 0.00014 msecs per iteration (total: 75, iterations: 524288)
PASS : tst_QMetaEnum::keysToValue(27 bits set)
- 0.00616 msecs per iteration (total: 101, iterations: 16384)
+ 0.0050 msecs per iteration (total: 82, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(28 bits set)
- 0.0062 msecs per iteration (total: 51, iterations: 8192)
+ 0.0051 msecs per iteration (total: 85, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(29 bits set)
- 0.0064 msecs per iteration (total: 53, iterations: 8192)
+ 0.0050 msecs per iteration (total: 82, iterations: 16384)
PASS : tst_QMetaEnum::keysToValue(30 bits set)
- 0.0062 msecs per iteration (total: 51, iterations: 8192)
+ 0.0050 msecs per iteration (total: 83, iterations: 16384)
Change-Id: Idff1ef7633862beb318901352516ebb0dde3c058
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QByteArray (thankfully) doesn't have the prepend "optimization", so
prepend() is a linear operation, calling it in a loop thus makes the
algorithm quadratic.
To fix, simply remember the parts in a QVLA (an upper bound on the
size of which is easily calculated) and then build the result by
reverse-iterating over the QVLA.
This join_reversed() function is possibly useful elsewhere, but I left
it locally in the unnamed namespace to ease cherry-picking.
The new stringDataView() function is more universally useful, too, and
will be used in a subsequent other change. It return QL1S instead of
QByteArrayView because the latter is scheduled to become a non-string
type, and already lacks certain features (e.g. qTokenize() doesn't
work on QBA, due to lack of a Qt::CaseSensitivity argument in
QBA::indexOf()). It's also a Qt 6 addition, so not available in
5.15. We can revisit this decision later, when QBAV (or, possibly,
QU8SV) has caught up.
Amends 05e0dfa0060aab80afc696161226b2ab0cddfbf9.
Results indicate a ~2x speedup:
PASS : tst_QMetaEnum::valueToKeys(1 bits set)
- 0.00026 msecs per iteration (total: 70, iterations: 262144)
+ 0.00017 msecs per iteration (total: 90, iterations: 524288)
PASS : tst_QMetaEnum::valueToKeys(2 bits set)
- 0.00037 msecs per iteration (total: 98, iterations: 262144)
+ 0.00019 msecs per iteration (total: 52, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(3 bits set)
- 0.00040 msecs per iteration (total: 53, iterations: 131072)
+ 0.00021 msecs per iteration (total: 56, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(4 bits set)
- 0.00047 msecs per iteration (total: 62, iterations: 131072)
+ 0.00022 msecs per iteration (total: 60, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(5 bits set)
- 0.00048 msecs per iteration (total: 63, iterations: 131072)
+ 0.00024 msecs per iteration (total: 64, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(6 bits set)
- 0.00061 msecs per iteration (total: 80, iterations: 131072)
+ 0.00027 msecs per iteration (total: 71, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(7 bits set)
- 0.00063 msecs per iteration (total: 83, iterations: 131072)
+ 0.00027 msecs per iteration (total: 73, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(8 bits set)
- 0.00069 msecs per iteration (total: 91, iterations: 131072)
+ 0.00030 msecs per iteration (total: 81, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(9 bits set)
- 0.00070 msecs per iteration (total: 92, iterations: 131072)
+ 0.00031 msecs per iteration (total: 83, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(10 bits set)
- 0.00074 msecs per iteration (total: 98, iterations: 131072)
+ 0.00034 msecs per iteration (total: 91, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(11 bits set)
- 0.000762 msecs per iteration (total: 100, iterations: 131072)
+ 0.00035 msecs per iteration (total: 92, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(12 bits set)
- 0.00088 msecs per iteration (total: 58, iterations: 65536)
+ 0.000381 msecs per iteration (total: 100, iterations: 262144)
PASS : tst_QMetaEnum::valueToKeys(13 bits set)
- 0.00094 msecs per iteration (total: 62, iterations: 65536)
+ 0.00038 msecs per iteration (total: 51, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(14 bits set)
- 0.00099 msecs per iteration (total: 65, iterations: 65536)
+ 0.00041 msecs per iteration (total: 55, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(15 bits set)
- 0.0010 msecs per iteration (total: 67, iterations: 65536)
+ 0.00042 msecs per iteration (total: 56, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(16 bits set)
- 0.0010 msecs per iteration (total: 70, iterations: 65536)
+ 0.00044 msecs per iteration (total: 58, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(17 bits set)
- 0.0011 msecs per iteration (total: 73, iterations: 65536)
+ 0.00046 msecs per iteration (total: 61, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(18 bits set)
- 0.0012 msecs per iteration (total: 79, iterations: 65536)
+ 0.00048 msecs per iteration (total: 63, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(19 bits set)
- 0.0012 msecs per iteration (total: 79, iterations: 65536)
+ 0.00051 msecs per iteration (total: 67, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(20 bits set)
- 0.0012 msecs per iteration (total: 80, iterations: 65536)
+ 0.00054 msecs per iteration (total: 71, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(21 bits set)
- 0.0012 msecs per iteration (total: 83, iterations: 65536)
+ 0.00090 msecs per iteration (total: 59, iterations: 65536)
PASS : tst_QMetaEnum::valueToKeys(22 bits set)
- 0.0012 msecs per iteration (total: 85, iterations: 65536)
+ 0.00057 msecs per iteration (total: 76, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(23 bits set)
- 0.0013 msecs per iteration (total: 87, iterations: 65536)
+ 0.00059 msecs per iteration (total: 78, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(24 bits set)
- 0.0014 msecs per iteration (total: 93, iterations: 65536)
+ 0.00065 msecs per iteration (total: 86, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(25 bits set)
- 0.0014 msecs per iteration (total: 94, iterations: 65536)
+ 0.00063 msecs per iteration (total: 83, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(26 bits set)
- 0.00028 msecs per iteration (total: 74, iterations: 262144)
+ 0.00017 msecs per iteration (total: 94, iterations: 524288)
PASS : tst_QMetaEnum::valueToKeys(27 bits set)
- 0.0014 msecs per iteration (total: 98, iterations: 65536)
+ 0.00063 msecs per iteration (total: 83, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(28 bits set)
- 0.0014 msecs per iteration (total: 96, iterations: 65536)
+ 0.00065 msecs per iteration (total: 86, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(29 bits set)
- 0.0014 msecs per iteration (total: 98, iterations: 65536)
+ 0.00064 msecs per iteration (total: 84, iterations: 131072)
PASS : tst_QMetaEnum::valueToKeys(30 bits set)
- 0.0014 msecs per iteration (total: 97, iterations: 65536)
+ 0.00064 msecs per iteration (total: 84, iterations: 131072)
Pick-to: 6.2 5.15
Change-Id: Ie456b71b39c118001987716e30642f08f5e8dcdb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
By dropping the clause pointlessly guarding the ranged for loop against
an empty collection, we can reduce the ping-pong being played with the
*ok boolean: Just set it to false at the beginning, and only set it to
true when we reach the success-return.
Pick-to: 6.2
Change-Id: I87365146086aba427b7414e83f077096824ff56f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code obfuscated the algorithm by or'ing -1 into the return
value, which is equivalent to setting it to -1 on two's complement
architectures (which C++ these days requires), and happily continuing
to accumulate potential keys. But nothing that can be or'ed into -1
will ever change the value, so this is rather pointless, as we're not
emitting diagnostics apart from setting a bool to false.
Fix by simply returning -1. That makes it obvious what we're
returning, and we return early on error.
Pick-to: 6.2
Change-Id: I8957f44e03609ad58d6c25d5fa78c57190b14bdd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QMetaType does. QVariant should do the same.
Pick-to: 6.2
Change-Id: I3419276b78b3b5ce8bd144dee92685195797d568
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Daniel Nicoletti <daniel.nicoletti@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
This class is an algorithm, and shouldn't be copied or moved.
Change-Id: I6f517f53a242dbfd61975ef885c358eef139a272
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
No user of the variable iterates over the container, they only
manipulate or inspect individual entries, so order doesn't matter. If
order doesn't matter, use the more efficient QHash over QMap.
Change-Id: Id28913a57bb14eb328e668624f236f76cad86def
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because there's no insertIfNotContains()-like functionality in QHash
(unlike std::unordered_map, where insert() doesn't overwrite an
existing entry), the code first called contains(k) and then insert(k,
~~~), causing two lookups in the case where the insertion actually
happens.
Fix by using the pattern QDuplicateTracker's QSet fall-back uses, too:
recording the size before and after the call to the indexing operator
and using a size increase as the criterion that an insertion should
happen. This reduces the number of lookups to one, at the cost of a
mapped_type default construction (which, given mapped_type is
std::function, should be cheap).
Change-Id: I24b31107b3e26f2eea2edce7b46f8cb5e7cb35bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We will not gain anything if we have to do multiple function calls to
obtain the thread id. Therefore we introduce a macro to signal that we
have a fast implementation of currentThreadId, and only use the function
if it is defined.
Pick-to: 6.2
Change-Id: I3347489ea91992896bb753b796ae26e391c2c99c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
If we already have the bindingStatus, we can just pass it along.
Pick-to: 6.2
Change-Id: Iaaea4f4c34e6a786899561293016ece163c26d25
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Provide an inline version of evaluateRecursive which does not fetch the
status.
- Provide an unsafe variant of setBindingToNotify which does not set the
tag. This can be used in allocateDependencyObserver, as newly
allocated observers already have the correct tag (this is checked via
an assert).
Pick-to: 6.2
Change-Id: I31aec6af4aef244efc6d0777e5bfaaa8f82f2046
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The method is only called in two places: observerProperty (which only
takes care of calling unlink, too, if necessary) and in
registerWithCurrentlyEvaluatingBinding_helper. In the first case, the
method most likely gets inlined anyway. In the latter case, we really
want to avoid the overhead of an additional function call to speed up
registration of the property with the binding. Considering that it is an
internal method, there is no need to worry about code explosion.
Pick-to: 6.2
Change-Id: I3f0f0e37108f3859321d3b432e37fc8da3c15dc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
This avoids another round of TLS lookups in evaluateRecursive when we
construct the BindingEvaluationState.
Pick-to: 6.2
Change-Id: Icfa9fd81fc6f54623d384c4d3fce33f4d4d549b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Ensure that the allocateDependencyObserver fast path is inlined.
- Use addObserver instead of observerProperty; we know that a freshly
allocated observer does not have its prev pointer set. If prev weren't
a private member, we could simply use Q_ASSUME(ptr->prev == nullptr),
but making it public or befriending the class seems like a bad idea,
as it grants too much access to the internals.
Pick-to: 6.2
Change-Id: Ia845f2807c70512563f7b9e1ecb85fe82b66208c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
If we have no currentBinding, then registerWithCurrentlyEvaluatingBinding
will not do anything. Thus we can completely avoid fetching the storage.
Pick-to: 6.2
Change-Id: Ic20142e4c4e09752b5c41b959f66080e6885e6c3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
By putting the groupUpdateData pointer into the same thread local as the
binding status, we avoid having to fetch two thread_local variables.
Moreover, we can reuse the caching mechanism which we have in place for
QBindingStatus to avoid costly TLS lookups.
Pick-to: 6.2
Change-Id: Iaea515763510daab83f89b8e74f35a80965d6965
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the QBindingStatus we receive from the QObject is from the thread
which is currently running, we do not need to refetch the thread local;
the reason we refetched the thread_local was after all only to guard
against the case where a QObject's property gets read in a different
thread.
To determine whether we are in the same thread, we can store the thread
id in the thread_local structure. Currently, it only gets initialized
for the main thread in QCoreApplication (as bindings are mostly used
there).
At a later point, we could either expose initBindingStatusThreadId, or
call the function when a QThread gets started.
Pick-to: 6.2
Change-Id: Id8eb803973bb083abfab83a62bfccc9e88a4e542
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The port from hand-rolled function storage to std::function
inadvertently removed the helper variable of static storage duration
whose dtor would unregister the conversion function. This caused
QTBUG-94831, where the cleanup of conversion functions attempts to
call code (via std::function) from a library that has already been
unloaded.
Restore the 5.15 behavior by adding a static-storage-duration scope
guard to unregister the conversion and view functions from Qt upon
library unload (when static objects are destroyed). Unlike 5.15, only
install the scope guard upon successful registration, ensuring that
only the DLL which successfully registered its conversion function
unregisters it again.
Amends 0e4ae4fbf8e320d18c29a55b5db2bba25b3d9d50.
Add some strategic std::move()s as a drive-by.
Pick-to: 6.2
Task-number: QTBUG-94831
Change-Id: I391ca667420cf0d98a166676b9bb363d6e190306
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
Also change the timer default value to use QDeadlineTimer::Forever.
Pick-to: 6.2
Change-Id: Ia6d0101872a5d01b04e146cd9b2f90315cb8eb2e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the API review session, a potential deadlock behavior might
occur when using QFuture's synchronous APIs on the UI thread. Also
the fact that this api currently have an implementation only for
Android. For those reasons we thought this API could be postponed
until Qt 6.3, when the QFuture concern is addressed and other
platforms other than Android are implemented as well.
Pick-to: 6.2
Change-Id: I1aef025488c24791da85d15fb57367d3e5e681be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are few slots whose lambdas are empty; most will at least
capture [this]. But there are a few in Qt examples that do, e.g. []{
qApp->quit(); }. Logging is also an example. So go the extra mile and
optimize for empty functors by inheriting from them as opposed to
storing them in a member variable.
Change-Id: I3904f10db5ebe904ba889d29c08569edd804df3b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
| |
Change-Id: I02bfe1857a9c2b781f7ad891e813fd6818fab671
Reviewed-by: Ivan Tkachenko <me@ratijas.tk>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
Remove the QByteArray overload from the API, but not the ABI.
Adapt callers.
Change-Id: I88aa09cbca3b89d0b249ce336ebe49c4b352c9e1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
| |
It's not supported.
Change-Id: I650a48f214bc4965b5e28f04e4f095273d7f9e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not even an optimization (unless your compiler sucks). Just improves
readability, since offset is already calculated few lines above.
Offset formula used to be somewhat more complicated, but since commit
e58b44d557b859b7b55869f1e137aa1bc8968307 it became reusable here.
Change-Id: I4128b2643daf2cb112c9b861342fd0e27c9a1a95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
As described in https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment?language=objc#Determine-Whether-Your-App-Is-Running-as-a-Translated-Binary
Pick-to: 6.2
Change-Id: I16fa4be20e4a55c87c2eb760d671d27ee4de1703
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|