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:
parent
82743fb8a2
commit
bdc2493096
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user