autotests: Make factional-scale-v1 factory function return a std::unique_ptr
This commit is contained in:
parent
8a11dde6f2
commit
b4e2241ded
2 changed files with 3 additions and 3 deletions
|
@ -698,7 +698,7 @@ std::unique_ptr<QtWayland::zwp_input_panel_surface_v1> createInputPanelSurfaceV1
|
|||
KWayland::Client::Output *output,
|
||||
MockInputMethod::Mode mode);
|
||||
|
||||
FractionalScaleV1 *createFractionalScaleV1(KWayland::Client::Surface *surface);
|
||||
std::unique_ptr<FractionalScaleV1> createFractionalScaleV1(KWayland::Client::Surface *surface);
|
||||
|
||||
std::unique_ptr<XdgToplevel> createXdgToplevelSurface(KWayland::Client::Surface *surface);
|
||||
std::unique_ptr<XdgToplevel> createXdgToplevelSurface(KWayland::Client::Surface *surface, CreationSetup configureMode);
|
||||
|
|
|
@ -958,13 +958,13 @@ std::unique_ptr<QtWayland::zwp_input_panel_surface_v1> createInputPanelSurfaceV1
|
|||
return s;
|
||||
}
|
||||
|
||||
FractionalScaleV1 *createFractionalScaleV1(KWayland::Client::Surface *surface)
|
||||
std::unique_ptr<FractionalScaleV1> createFractionalScaleV1(KWayland::Client::Surface *surface)
|
||||
{
|
||||
if (!s_waylandConnection.fractionalScaleManagerV1) {
|
||||
qWarning() << "Unable to create fractional scale surface. The global is not bound";
|
||||
return nullptr;
|
||||
}
|
||||
auto scale = new FractionalScaleV1();
|
||||
auto scale = std::make_unique<FractionalScaleV1>();
|
||||
scale->init(s_waylandConnection.fractionalScaleManagerV1->get_fractional_scale(*surface));
|
||||
|
||||
return scale;
|
||||
|
|
Loading…
Reference in a new issue