diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-24 17:40:19 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-24 22:42:36 +0200 |
commit | bdc2493096d3eab932da0cdf50b4c7238bf333b3 (patch) | |
tree | 0fcc662dd69da0de5e3698aedacd59db17ad89ef /src | |
parent | 82743fb8a237c4b2aad9f3c029de4da73379f352 (diff) |
QPointingDevice: Parent the default mouse to QCoreApplication
Otherwise it will leak.
Change-Id: I1c522dace0139dac3e626399963f58c56f052aba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qpointingdevice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index 29423f9c0d..63d61cc804 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -332,7 +332,8 @@ const QPointingDevice *QPointingDevice::primaryPointingDevice(const QString& sea << "The platform plugin should have provided one via " "QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now."; mouse = new QPointingDevice(QLatin1String("core pointer"), 1, DeviceType::Mouse, - PointerType::Generic, Capability::Position, 1, 3, seatName); + PointerType::Generic, Capability::Position, 1, 3, seatName, + QPointingDeviceUniqueId(), QCoreApplication::instance()); QInputDevicePrivate::registerDevice(mouse); return mouse; } |