QPointingDevice: Parent the default mouse to QCoreApplication

Otherwise it will leak.

Change-Id: I1c522dace0139dac3e626399963f58c56f052aba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Ulf Hermann 2020-06-24 17:40:19 +02:00
parent 82743fb8a2
commit bdc2493096

View File

@ -332,7 +332,8 @@ const QPointingDevice *QPointingDevice::primaryPointingDevice(const QString& sea
<< "The platform plugin should have provided one via " << "The platform plugin should have provided one via "
"QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now."; "QWindowSystemInterface::registerInputDevice(). Creating a default mouse for now.";
mouse = new QPointingDevice(QLatin1String("core pointer"), 1, DeviceType::Mouse, 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); QInputDevicePrivate::registerDevice(mouse);
return mouse; return mouse;
} }