diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-09 10:07:34 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-12 16:14:18 +0100 |
commit | 6891e10f9717a51b72583bf18e5a1a8d5f5fd527 (patch) | |
tree | 7f6b2f6c896b8d70d0bc58b894539dda40f2f1fe /src/plugins/platforms | |
parent | 9f32fc97aa42da098ab08fc0371a78004080a00a (diff) |
QFlatMap: add insert_or_assign
This does exactly what insert() on Qt associative containers does, but
allows to express the intent of using the STL-incompatible Qt insert()
semantics, in an STL-compatible way, instead of leaving the reader of
the code wondering what semantics are expected.
This is part of a very-long-term goal of fixing Qt associative
container's insert() behavior, in which QFlatMap, being an affected,
but private-API type, is used for proof-of-concept purposes.
Task-number: QTBUG-99651
Pick-to: 6.3 6.2
Change-Id: I69010285438259918aef659d3235180c1b5be696
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_tablet.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_tablet.mm b/src/plugins/platforms/cocoa/qnsview_tablet.mm index 318a32f7cf..81d90a6fbe 100644 --- a/src/plugins/platforms/cocoa/qnsview_tablet.mm +++ b/src/plugins/platforms/cocoa/qnsview_tablet.mm @@ -224,7 +224,7 @@ static const QPointingDevice *tabletToolInstance(NSEvent *theEvent) QWindowSystemInterface::handleTabletEnterLeaveProximityEvent(nullptr, timestamp, device, theEvent.isEnteringProximity); // The windowSystemId starts at 0, but is "unique" while in proximity if (theEvent.isEnteringProximity) - devicesInProximity->insert(windowSystemId, device); + devicesInProximity->insert_or_assign(windowSystemId, device); else devicesInProximity->remove(windowSystemId); } |