Get rid of QInputDevicePrivate::extra

Since QPA plugins own the input device objects that they create, they
can also subclass to add arbitrary extra data (as was done with
QWinTabPointingDevice in abb5f0d376);
so this pointer seems unnecessary.  It's unused so far AFAIK.
Retaining it also brings up the possibility of a memory leak:
~QInputDevice() doesn't delete it, and whatever code stores something
there would need to make sure it gets deleted.

Change-Id: I7ec264c23c74b83db1f37f64f31857caf551fdae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Shawn Rutledge 2020-10-30 16:45:41 +01:00
parent b379e880a9
commit 0c3def85c6

View File

@ -78,7 +78,6 @@ public:
QString seatName; QString seatName;
QString busId; QString busId;
QRect availableVirtualGeometry; QRect availableVirtualGeometry;
void *extra = nullptr; // The QPA plugin can store arbitrary device-specific data here
void *qqExtra = nullptr; // Qt Quick can store arbitrary device-specific data here void *qqExtra = nullptr; // Qt Quick can store arbitrary device-specific data here
qint64 systemId = 0; qint64 systemId = 0;
qint32 capabilities = static_cast<qint32>(QInputDevice::Capability::None); qint32 capabilities = static_cast<qint32>(QInputDevice::Capability::None);