Fix some of cppcheck warnings
Summary: - selfInitialization - memleak I could probably suppress the selfInitialization warning, but probably is cleaner this way. Opinions welcome. This also fixes the memleak in autotest. Test Plan: - arc lint --everything - Fix issues - build - run tests Reviewers: #frameworks, aacid Reviewed By: aacid Subscribers: apol, aacid, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D13559
This commit is contained in:
parent
312298e2f6
commit
cb5847e726
3 changed files with 10 additions and 10 deletions
|
@ -207,10 +207,10 @@ void TestWaylandServerDisplay::testConnectNoSocket()
|
|||
|
||||
void TestWaylandServerDisplay::testOutputManagement()
|
||||
{
|
||||
auto display = new KWayland::Server::Display(this);
|
||||
display->setSocketName("kwayland-test-0");
|
||||
display->start();
|
||||
auto kwin = display->createOutputManagement(this);
|
||||
Display display;
|
||||
display.setSocketName("kwayland-test-0");
|
||||
display.start();
|
||||
auto kwin = display.createOutputManagement(this);
|
||||
kwin->create();
|
||||
QVERIFY(kwin->isValid());
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ const struct org_kde_kwin_dpms_manager_interface DpmsManagerInterface::Private::
|
|||
};
|
||||
#endif
|
||||
|
||||
DpmsManagerInterface::Private::Private(DpmsManagerInterface *q, Display *d)
|
||||
DpmsManagerInterface::Private::Private(DpmsManagerInterface *qptr, Display *d)
|
||||
: Global::Private(d, &org_kde_kwin_dpms_manager_interface, s_version)
|
||||
, q(q)
|
||||
, q(qptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,9 @@ const struct org_kde_kwin_dpms_interface DpmsInterface::Private::s_interface = {
|
|||
};
|
||||
#endif
|
||||
|
||||
DpmsInterface::Private::Private(DpmsInterface *q, DpmsManagerInterface *g, wl_resource *parentResource, OutputInterface *output)
|
||||
DpmsInterface::Private::Private(DpmsInterface *q, DpmsManagerInterface *g, wl_resource *parentResource, OutputInterface *outputInterface)
|
||||
: Resource::Private(q, g, parentResource, &org_kde_kwin_dpms_interface, &s_interface)
|
||||
, output(output)
|
||||
, output(outputInterface)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -150,9 +150,9 @@ void XdgOutputManagerInterface::Private::getXdgOutputCallback(wl_client *client,
|
|||
});
|
||||
}
|
||||
|
||||
XdgOutputManagerInterface::Private::Private(XdgOutputManagerInterface *q, Display *d)
|
||||
XdgOutputManagerInterface::Private::Private(XdgOutputManagerInterface *qptr, Display *d)
|
||||
: Global::Private(d, &zxdg_output_manager_v1_interface, s_version)
|
||||
, q(q)
|
||||
, q(qptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue