From 0c3def85c61cea1f51d712c43c2c25fd788e6573 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 30 Oct 2020 16:45:41 +0100 Subject: [PATCH] Get rid of QInputDevicePrivate::extra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 abb5f0d3768a817b7e30639107210e64b8dbc138); 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 Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint --- src/gui/kernel/qinputdevice_p.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/kernel/qinputdevice_p.h b/src/gui/kernel/qinputdevice_p.h index 7f834adb9f..b2c13351f7 100644 --- a/src/gui/kernel/qinputdevice_p.h +++ b/src/gui/kernel/qinputdevice_p.h @@ -78,7 +78,6 @@ public: QString seatName; QString busId; 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 qint64 systemId = 0; qint32 capabilities = static_cast(QInputDevice::Capability::None);