| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Fixes: QTBUG-89130
Change-Id: Id8460fd00dcfdcca174d523f8d97baef1a764f6f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit efa5a699729c6ff9f9d7991d12ed70139e3be669)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Use Q_OBJECT_BINDABLE_PROPERTY instead of non-existing ones.
Follow-up to 50e1976437f645e9d6571d4498e9d44388e59c19.
Task-number: QTBUG-85520
Change-Id: I138f0775d9804029f2ecd6bd3594ab47b247392e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 618dd6b5a7ed3e9933b3f3a8bf3429caf2506319)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a check "if (cd && cd->signalVectorCount())" in the code
which was faulty because "signalVectorCount()" could return -1 to
indicate that no signalVector is available. This patch fixes
the problem.
Fixes: QTBUG-89846
Change-Id: I12c512ff8d889ba2bd298789ab6081930f739089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6a664d0660911173c7e85c60b9af195a0ef4f110)
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This would steal an existing binding from a property, which is most
likely not the intended action.
Alternatively, we could make it equivalent to
Qt::makePropertyBinding(foo), but that conflates properties with
bindings to it. On the other hand, this would avoid a potentially
source-breaking change.
[ChangeLog][Potentially Source Breaking Change] It was possible to
create a QPropertyBinding from a property; this would steal any set
binding from the property or create an invalid binding if none was set.
Use makePropertyBinding if you want to to create a binding which depends
on the property's value, or takeBinding if you want to repurpose the
property's binding.
Fixes: QTBUG-89507
Change-Id: Icd2d3b9261b60f36948f2cea9c33ddbea36efbc1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit c88905f0a947d59c61d9f0f990354ca935d3d4ed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Use Q_OBJECT_BINDABLE_PROPERTY instead of non-existing ones
Task-number: QTBUG-85520
Change-Id: I47e3ff150f54176b42a478fd3ff639754d90e70a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 50e1976437f645e9d6571d4498e9d44388e59c19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The \Q_OBJECT macro has been removed but using Q_OBJECT in the file
would erroneously trigger automoc. Avoid the issue by moving
the snippet into its own file.
Task-number: QTBUG-89505
Change-Id: I6630ff4bfcbf33eae348ac3d92aae1878dc573ea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 2c8d7411ace96f268d0692b366364d606f2608be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an eager binding triggers a setBinding call, we end up with a
special kind of binding loop:
setBinding() -> evaluate -> notifyObserver
^ |
| /
----------------------------
We now catch set condition, and set the binding status to BindingLoop
(with a distinct description).
Task-number: QTBUG-87153
Task-number: QTBUG-87733
Change-Id: I9f9915797d82eab820fc279baceaf89d7e5a3f4a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ddc585b7c773786045f3658d7da5425ed2f2f786)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
KeyValueObserver and RunLoopModeTracker were causing
“Class is implemented in both...” messages when loading
multiple namespaced Qt versions into the same process.
Change-Id: Idbd2229c61cde6fba2c12b35d045390a371dee68
Fixes: QTBUG-89059
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c2c163a7d8cb95a4901b742a72184975e791635a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Calling QCoreApplication::tr() without #if QT_CONFIG(translation)
can cause the build to fail if configured without translation.
Changing the call to QCoreApplication::translate() fixes that.
Change-Id: I48f0e1be14fc81360b8268620afc2f6c8f255819
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 1051e23ce91a980c5e961b4dcb6d61997bc08050)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
The QPropertyAlias example did not compile and comments were out of
sync with code. This patch fixes both.
Change-Id: I5717f8df99f4936d0bcbae8df7d2d17e8086951d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 0e96e1fb752e0b7c99927e77e7ac3244b2e0c118)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
The comments in the QProperty examples slightly mismatched the
implementation. This patch fixes it.
Change-Id: I03cfb35c024fad8ea4eaa5d5db220e1907f06bc3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 3fbf922cc5925a13fbfadfe1f5fa8312209c097a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intention was always that you can define properties that do
not require a changed signal. But having to explicitly pass
a nullptr as signal parameter into the macro is ugly, so
use the cool QT_OVERLOADED_MACRO to make it optional.
Change-Id: I0ce366d043850f983c968d73c544d89933c48df9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cb39ea05810bc207100018589da658a0cce98edb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Specify that QElapsedTimer::restart returns milliseconds
Change-Id: I47d9ffde7b0f73c30b14d2ce8467ec0a553b58f8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 302254f90f41509b3d1111551296134cd76a3db5)
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a QBindable is created from a computed property, it is not possible
to actually set a value or a binding. If we try to do it anyway, we'd
get a crash. Thus we now check whether the function pointer is null
before invoking it.
Task-number: QTBUG-87153
Change-Id: I5bedb9080ccf79d9b8166b80d5733d095ed76f8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit e236faa75f446aa3378fb013cce6598c9e076ccb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with
move semantics, its name is misleading. Q_RELOCATABLE_TYPE was
introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE
is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE
by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this
patch should have no impact on users.
Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
(cherry picked from commit 0440614af0bb08e373d8e3e40f90b6412c043d14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge the exact and and fuzzy search loop. This way we prioritize
translations which match a more preferred language loosely over ones
which match a less preferred language exactly. This is likely what
most users want.
Fixes: QTBUG-86179
Change-Id: Id1610c82a2e77edf9a5d4417968dcc4c307810d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 8df2bf04917e742470bbd1ff69e003811c5975ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid spurious bindings by resetting the binding state before calling
the setter of eager properties.
Fixes: QTBUG-88999
Change-Id: I1e3b5662307d906598335a21d306be9c606529d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit b21dba98e3e557eece0497aeea0f0beb70cc62da)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Streaming operators for types used together with QMetaType should
get declared in the same namespace as the type itself because
of C++s ADL rules. Add a note about that to the documentation.
Fixes: QTBUG-88990
Change-Id: I5d687576c6d926823dd0f1fec0743e877ae271af
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 5494f0af323a42390f9375c75e9298290ecb7662)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QMetaType::TypeFlag::IsQmlListType was renamed to
QMetaType::TypeFlag::IsQmlList . This change was not reflected in
the documentation. This patch adapts the documentation to this change.
Task-number: QTBUG-88533
Change-Id: I70be218f5f72b42aacb15ecd46972d5c808d86de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit bb3a53d917a5bc5681df893c8af32db477f41f94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- QList iterators are now nested classes inside QList.
- Drop reference to Qt OpenGL Widgets landing page, there is no such
page.
- Fix typos and linking issues.
Fixes: QTBUG-86295
Change-Id: I964843deb81aa55ff8ddb9a1c2b004cb72e68de9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 99abdd180bd6f626f4ca94806fdaddbeb3774325)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic in notify() was doing quite a bit more work than
it needed to. By inserting a dummy node after the current one instead of
replacing it, we can avoid half of the data shuffling that has been
happening and also don't need a back pointer when executing the
notification.
Also avoid calling a semi expensive destructor of QPropertyObserver.
Reduces the overhead of notify() by ~30%.
Pick-to: dev 6.0.0
Change-Id: I7ce16bcf9cd9c4368c18bf875fc959223452fd4f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Save a function call in the common case where we don't have a binding
This makes a rather large performance difference for setters that do
not have a binding.
Pick-to: 6.0.0 dev
Change-Id: I140f29790f6fe868721a33b9fad37205e547b8e9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Unify code paths and avoid excessive code generation.
Pick-to: 6.0.0 dev
Change-Id: I4a54234dd322bba380cc45d4f9c97d97a0c93303
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
No need to do function calls for the case where we return immediately
after checking a boolean.
Pick-to: dev 6.0.0
Change-Id: I3e449850a10fcf82acb843cce6da6dfd98de32ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
They are not needed and removing it can simplify the code in some places
and avoid a couple of masking operations.
Pick-to: dev 6.0.0
Change-Id: I0e4241a2784026aa89deed35f408b094e89a11a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
In many cases, it only derefs and does nothing else. Inline the fast
code path.
Pick-to: dev 6.0.0
Change-Id: Ib605c385c1683f7833f7189c84d6cf4eb5b0e59e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't execute instructions that will never do anything.
Directly add the tag to the pointer in the constructor to avoid
additional masking operations, and avoid a masking op that is in
practice a no-op in setTag().
Do the same optimization in QTagPreservingPointerToPointer.
Pick-to: dev
Change-Id: Ia364f89cbe6ccc876ec9bda0c239fc4f57c10501
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And inline the fast checks inside the methods in QBindingStorage.
This allows QObjectBindableProperty and friends to inline all the
fast checks and almost completely eliminates the overhead for property
accesses when no bindings are being used.
Read and write times of QObject based properties when no bindings
are being used:
Read Write
Old style property: 3.8ns 7.3ns
QObjectBindableProperty (no notification): 4.5ns 4.3ns
QObjectBindableProperty (with signal): 4.5ns 7.6ns
QObjectBindableProperty (inline accessors): 3.2ns 3.4ns
Numbers without this patch:
Old style property: 3.8ns 7.9ns
QObjectBindableProperty (no notification): 7.2ns 7.7ns
QObjectBindableProperty (with signal): 7.2ns 16.0ns
QObjectBindableProperty (inline accessors): 6.3ns 6.7ns
Pick-to: dev 6.0.0
Change-Id: Ifd1fa3a489c3be8b1468c0b88af547aac397f412
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::optional<int> is the wrong datatype to use for compare.
First and foremost, it can't be used in the idiomatic form of
auto r = a.compare(b);
if (r < 0) ~~~ // a is less than b
if (r > 0) ~~~ // a is greater than b
which we *already* feature in Qt (QString, QByteArray).
Also, std::optional<int> (explicitly) converts to bool, which is
a trap, because the result of the comparison can be accidentally
tested as a bool:
if (a.compare(b)) ~~~ // oops! does NOT mean a<b
Not to mention extending this to algorithms:
auto lessThan = [](QVariant a, QVariant b) { return a.compare(b); }; // oops!
std::ranges::sort(vectorOfVariants, lessThan);
which thankfully doesn't compile as is -- std::optional has
an *explicit* operator bool, and the Compare concept requires an
implicit conversion. However, the error the user is going to face
will be "cannot convert to bool because the operator is explicit",
which is deceiving because the fix is NOT supposed to be:
auto lessThan = [](QVariant a, QVariant b) { return (bool)a.compare(b); }; // big oops!
Instead: backport to Qt the required subset of C++20's <compare>
API, and use that. This commits just adds the necessary parts
for compare() (i.e. partial ordering), the rest of <compare>
(classes, functions, conversions) can be added to 6.1.
Change-Id: I2b5522da47854da39f79993e1207fad033786f00
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3e59c97c3453926fc66479d9ceca03901df55f90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
C++ allows overrides to return a covariant type, so if calling code has
already cast the callee down to the right type, don't require it to cast
the returned clone down as well.
Change-Id: I802f00a3c78e03047046986d0ed0a479b47573b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 146b37cdf376fb2fde85fa27326acfbeb2a024e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
This information is required in the QML engine to handle list properties
(instances of QQmlListproperty<T> and list<T> types from QML).
Change-Id: I1e30572f1c91f58b290cb9b4b07433af99a1db6f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 5806ecf5cb24cf39ea2608d42246eafbaa817582)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
As of 19f9b0d5f54379151eb71e98555b203ad6756276 we define a protected copy
constructor and assignment operator. Static analyzers warn about missing
move variants, so delete those in addition.
Change-Id: I28c1a2afd4560ce35a258bde507dafd93245b75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 291e8e729ee7a28e579c3aea22fd4482cd271ed7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was so far problematic as it gave various link errors. The solution
to that seems to be to make the default constructor of QPairVariantInterfaceImpl
constexpr to get around one set of problems.
The other problem to solve where undefined references to metaobjects. The
reason for that is apparently that QMetaTypeInterface contains a direct
pointer to the meta object, something the linker doesn't like. Adding a
level of indirection by using a function that returns the pointer seems
to solve that problem.
Fixes: QTBUG-88468
Change-Id: I5612ae807ea3b7e49bc40349d8d1fca1be9bd7ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Polymorphic classes should not be copied.
However, we do rely on event copying in our propagation logic. So, make the
members protected, don't delete them, using a dedicated macro.
This way, QMutable*Event classes can be used to make copies.
Remove some last usage of copying of QInputMethod(Query)Events.
Change-Id: Ia0a8ae4ca9de97dcd7788ca3c6ed930b6460c43a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have use cases for cloning of events, e.g. in the state machine and
for event propagation.
Provide the means to do so through a virtual method.
Adapt QFutureCallOutEvent::clone, which is now an override. No code
seems to be using that method.
Change-Id: I6864d6597f6de800343c4dc458a7994e84dc6fb4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not been used ever since it was added in the Qt 2 days, other than
a hack in QGraphicsView that could be solved more elegantly.
With this change, QEvent is only 16 bytes large, which is nicely aligned
with C++'s default operator new alignment, and we still have
plenty of bits (plus an unused bool) left for extensions.
Change-Id: If9376d90b92983db7fc12575f3893064a1797adf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure all bits reported by sizeof for the most important public
event classes are used optimally.
QEvent is 24bytes large due to default alignment in C++, so we might
just as well use bool instead of bitfields for the most important
data members. This generates less (and thus smaller and faster) code,
and we still have plenty of bits available for future needs.
Default the copy constructor and assignment operator, the assert and
tracing seem to be relics from the Qt 3/4 days.
Note: QEvent's d-pointer is currently unused, with the exception of a
hack in QGraphicsView. Removing that would save another 8 bytes
through the entire event hierarchy.
For the new classes in the QInputEvent hierarchy, apply the same
principle. Allocate bits in QInputEvent and QSinglePointEvent to fill
the 8-byte aligned space. Using some of those bits for QMouseEvent
and QWheelEvent makes sure we don't increase the size for those in
spite of additionally reserved bits.
As a result of this, several QInputEvent and subclasses become 8 bytes
smaller on clang and gcc (with the exception of QNativeGestureEvent)
while at the same we have more space for future extensions.
The sizeof's for the various classes on different compilers produce
these before and after result:
clang +/- gcc +/- msvc +/-
QEvent 24 0 24 0 24 0
QInputEvent 56 -8 56 -8 48 0
QPointerEvent 80 -8 80 -8 72 0
QSinglePointEvent 96 -8 96 -8 88 0
QMouseEvent 96 -8 96 -8 88 0
QTabletEvent 112 -8 112 -8 96 -16
QKeyEvent 104 -8 104 -8 96 0
QNativeGestureEvent 120 0 120 0 120 0
QWheelEvent 112 -8 112 -8 112 -8
So, with this change we save 8 bytes on gcc and clang for many
event types, esp on Linux systems.
As a drive-by: replace ulong with quint64, make QTabletEvent data
floating point, and rename some variables for clarity.
Change-Id: I4cf81c8283262cbf59ee3fb7064a59837332ced7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Not used anywhere in Qt 6, and if whatever needs this ever comes back,
then we won't implement it like this.
Change-Id: I99655ba5825644cef3686bbe50ca688b68f5c2a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
... where applicable.
Fixes: QTBUG-88232
Change-Id: I835df434765caededd35d5114965b4a1663e7942
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsSceneEvent carries a widget pointer, and we can add a new
event
type. Assert that QGraphicsScene doesn't get Leave events from
elsewhere.
This was the only "usage" of QEvent's d-pointer in Qt, so with this gone
we can reduce the size of QEvent by 8 bytes.
Change-Id: I0513daf742de9084d0469d55b7a7f41b667e8081
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I08694657b7c9d2713d0cb33519698dbba3bfdffa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of multiplexing all notifications into a single Qt event for
the event dispatcher, we can send 'WinEventAct' event directly for each
notifier which activated. This trick improves the performance (esp.
on a large number of events) and allows us to remove notifiers handling
from the event dispatcher completely.
As an alternative to sending Qt events, use of Windows' APC queue in
conjunction with waking up the Qt event loop from within the Windows
thread pool has been considered. However, that would lead to signal
emission asynchronous to the Qt event loop's operation, which is not
acceptable.
Thanks to Oswald Buddenhagen for the proposed idea.
[ChangeLog][QtCore][QAbstractEventDispatcher] The
{un}registerEventNotifier() member functions have been removed.
QWinEventNotifier is no longer needed to be registered in the
event dispatcher.
Change-Id: I140892fb909eaae0eabf2e07ebabcab78c43841c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
|
|
|
|
|
|
|
|
| |
We used quint32 for 32-bit types and ushort for 16-bit ones,
but using explicit bit sizes looks more consistent.
Change-Id: I3106dd6ecb2367fef6f8012c28266e1b4b1abf4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-83387
Change-Id: I55c0a267e5490ba0226fd6858c18fd88cc3b8d59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation of processEvents states that it processes all
pending events. However, this is not true for the glib backend
and probably was not true for at least a decade.
QEventDispatcherGlib::processEvents(ProcessEventsFlags)
calls "g_main_context_iteration" which is documented
to only process events of highest priority:
https://developer.gnome.org/glib/2.66/glib-The-Main-Event-Loop.html#g-main-context-iteration
Fixes: QTBUG-87307
Task-number: QTBUG-84291
Pick-to: 5.15
Change-Id: I82c6f9dba865bb07f981ad648a128316749682ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
| |
The metaType is only used in the constexpr if branch where the callable
is not std::is_invocable_v. Therefore, we need to mark it as unused in
order to avoid compile errors in code that exercises the other branch.
Change-Id: I46e855b0f4b0a088f15ff41d4929fe010531b97e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes high-level event dispatching easier: for example we often
need to cast an event to access getters like button() and buttons().
We can so far assume that any QPointerEvent that is not a QTouchEvent
is a QSinglePointEvent; but more explicit type-checking looks safer.
Implemented in a similar way as c7f727996909338c3689396160f3060480521846.
Change-Id: I980d759e2a7538b6b30fd3bdc3be0c351ec6c246
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove forward declarations, we have those already from qcontainerfwd.h.
Change-Id: I1b8a91ece912e6cdf747f4e2a750f0e85bcb5b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing declaration of QVariantList and friends. Replace
class with typename for template parameters.
Remove some left-over forward declarations in other headers.
Change-Id: I31d443019d48b619e02834395dafa40182cac7b9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|