Commit 725e97aa authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Remove factory methods in Display

The main reason why we have factory methods is that up to some point,
kwayland had its own signal to indicate when globals have to be removed.

Now that all globals add destroy listeners for the wl_display object,
we don't have that signal. Most factory methods are equivalent to doing
new T(display).

Besides adding unnecessary boilerplate code, another reason to get rid
of the factory methods is to reduce the amount of merge conflicts. If
several persons work on implementing wayland protocols at the same time,
sooner or later someone will have to resolve merge conflicts in Display.
parent 31d0b988
Pipeline #44092 passed with stage
in 5 minutes and 57 seconds
......@@ -76,7 +76,7 @@ void TestCompositor::init()
registry.setup();
// here we need a shm pool
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
}
......
......@@ -102,13 +102,13 @@ void TestDataDevice::init()
QVERIFY(registry.isValid());
registry.setup();
m_dataDeviceManagerInterface = m_display->createDataDeviceManager(m_display);
m_dataDeviceManagerInterface = new DataDeviceManagerInterface(m_display, m_display);
QVERIFY(dataDeviceManagerSpy.wait());
m_dataDeviceManager = registry.createDataDeviceManager(dataDeviceManagerSpy.first().first().value<quint32>(),
dataDeviceManagerSpy.first().last().value<quint32>(), this);
m_seatInterface = m_display->createSeat(m_display);
m_seatInterface = new SeatInterface(m_display, m_display);
m_seatInterface->setHasPointer(true);
m_seatInterface->create();
QVERIFY(m_seatInterface->isValid());
......@@ -121,7 +121,7 @@ void TestDataDevice::init()
QVERIFY(pointerChangedSpy.isValid());
QVERIFY(pointerChangedSpy.wait());
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(),
compositorSpy.first().last().value<quint32>(), this);
......
......@@ -80,7 +80,7 @@ void TestDataSource::init()
QVERIFY(registry.isValid());
registry.setup();
m_dataDeviceManagerInterface = m_display->createDataDeviceManager(m_display);
m_dataDeviceManagerInterface = new DataDeviceManagerInterface(m_display, m_display);
QVERIFY(dataDeviceManagerSpy.wait());
m_dataDeviceManager = registry.createDataDeviceManager(dataDeviceManagerSpy.first().first().value<quint32>(),
......
......@@ -77,13 +77,13 @@ void TestDragAndDrop::init()
QVERIFY(connectedSpy.isValid());
m_connection->setSocketName(s_socketName);
m_compositorInterface = m_display->createCompositor(m_display);
m_seatInterface = m_display->createSeat(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_seatInterface = new SeatInterface(m_display, m_display);
m_seatInterface->setHasPointer(true);
m_seatInterface->setHasTouch(true);
m_seatInterface->create();
QVERIFY(m_seatInterface->isValid());
m_dataDeviceManagerInterface = m_display->createDataDeviceManager(m_display);
m_dataDeviceManagerInterface = new DataDeviceManagerInterface(m_display, m_display);
m_display->createShm();
m_thread = new QThread(this);
......
......@@ -54,8 +54,8 @@ void ErrorTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_ci = m_display->createCompositor(m_display);
m_psi = m_display->createPlasmaShell(m_display);
m_ci = new CompositorInterface(m_display, m_display);
m_psi = new PlasmaShellInterface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -61,7 +61,7 @@ void FakeInputTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_fakeInputInterface = m_display->createFakeInput();
m_fakeInputInterface = new FakeInputInterface(m_display);
QSignalSpy deviceCreatedSpy(m_fakeInputInterface, &FakeInputInterface::deviceCreated);
QVERIFY(deviceCreatedSpy.isValid());
......
......@@ -53,10 +53,10 @@ void IdleTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_seatInterface = m_display->createSeat();
m_seatInterface = new SeatInterface(m_display);
m_seatInterface->setName(QStringLiteral("seat0"));
m_seatInterface->create();
m_idleInterface = m_display->createIdle();
m_idleInterface = new IdleInterface(m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -116,16 +116,16 @@ void TestVirtualDesktop::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_plasmaVirtualDesktopManagementInterface = m_display->createPlasmaVirtualDesktopManagement(m_display);
m_plasmaVirtualDesktopManagementInterface = new PlasmaVirtualDesktopManagementInterface(m_display, m_display);
QVERIFY(plasmaVirtualDesktopManagementSpy.wait());
m_plasmaVirtualDesktopManagement = registry.createPlasmaVirtualDesktopManagement(plasmaVirtualDesktopManagementSpy.first().first().value<quint32>(), plasmaVirtualDesktopManagementSpy.first().last().value<quint32>(), this);
m_windowManagementInterface = m_display->createPlasmaWindowManagement(m_display);
m_windowManagementInterface = new PlasmaWindowManagementInterface(m_display, m_display);
m_windowManagementInterface->setPlasmaVirtualDesktopManagementInterface(m_plasmaVirtualDesktopManagementInterface);
QVERIFY(windowManagementSpy.wait());
......
......@@ -100,8 +100,8 @@ void PlasmaWindowModelTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_pwInterface = m_display->createPlasmaWindowManagement();
m_plasmaVirtualDesktopManagementInterface = m_display->createPlasmaVirtualDesktopManagement(m_display);
m_pwInterface = new PlasmaWindowManagementInterface(m_display, m_display);
m_plasmaVirtualDesktopManagementInterface = new PlasmaVirtualDesktopManagementInterface(m_display, m_display);
m_plasmaVirtualDesktopManagementInterface->createDesktop("desktop1");
m_plasmaVirtualDesktopManagementInterface->createDesktop("desktop2");
m_pwInterface->setPlasmaVirtualDesktopManagementInterface(m_plasmaVirtualDesktopManagementInterface);
......
......@@ -64,10 +64,10 @@ void TestPlasmaShell::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_display->createShm();
m_plasmaShellInterface = m_display->createPlasmaShell(m_display);
m_plasmaShellInterface = new PlasmaShellInterface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -67,11 +67,11 @@ void TestPointerConstraints::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_seatInterface = m_display->createSeat(m_display);
m_seatInterface = new SeatInterface(m_display, m_display);
m_seatInterface->setHasPointer(true);
m_seatInterface->create();
m_compositorInterface = m_display->createCompositor(m_display);
m_pointerConstraintsInterface = m_display->createPointerConstraintsV1(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_pointerConstraintsInterface = new PointerConstraintsV1Interface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -67,11 +67,11 @@ void SelectionTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_compositorInterface = m_display->createCompositor(m_display);
m_seatInterface = m_display->createSeat(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_seatInterface = new SeatInterface(m_display, m_display);
m_seatInterface->setHasKeyboard(true);
m_seatInterface->create();
m_ddmInterface = m_display->createDataDeviceManager(m_display);
m_ddmInterface = new DataDeviceManagerInterface(m_display, m_display);
// setup connection
setupConnection(&m_client1);
......
......@@ -93,11 +93,11 @@ void TestServerSideDecoration::init()
QVERIFY(m_registry->isValid());
m_registry->setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = m_registry->createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_serverSideDecorationManagerInterface = m_display->createServerSideDecorationManager(m_display);
m_serverSideDecorationManagerInterface = new ServerSideDecorationManagerInterface(m_display, m_display);
QVERIFY(serverSideDecoManagerSpy.wait());
m_serverSideDecorationManager = m_registry->createServerSideDecorationManager(serverSideDecoManagerSpy.first().first().value<quint32>(),
......
......@@ -97,11 +97,11 @@ void TestServerSideDecorationPalette::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_paletteManagerInterface = m_display->createServerSideDecorationPaletteManager(m_display);
m_paletteManagerInterface = new ServerSideDecorationPaletteManagerInterface(m_display, m_display);
QVERIFY(registrySpy.wait());
m_paletteManager = registry.createServerSideDecorationPaletteManager(registrySpy.first().first().value<quint32>(), registrySpy.first().last().value<quint32>(), this);
......
......@@ -56,8 +56,8 @@ void ShadowTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_compositorInterface = m_display->createCompositor(m_display);
m_shadowInterface = m_display->createShadowManager(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_shadowInterface = new ShadowManagerInterface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -75,12 +75,12 @@ void TextInputTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_seatInterface = m_display->createSeat();
m_seatInterface = new SeatInterface(m_display, m_display);
m_seatInterface->setHasKeyboard(true);
m_seatInterface->setHasTouch(true);
m_seatInterface->create();
m_compositorInterface = m_display->createCompositor();
m_textInputManagerV2Interface = m_display->createTextInputManagerV2();
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_textInputManagerV2Interface = new TextInputManagerV2Interface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......
......@@ -100,11 +100,11 @@ void TestAppmenu::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_appmenuManagerInterface = m_display->createAppMenuManagerInterface(m_display);
m_appmenuManagerInterface = new AppMenuManagerInterface(m_display, m_display);
QVERIFY(appmenuSpy.wait());
m_appmenuManager = registry.createAppMenuManager(appmenuSpy.first().first().value<quint32>(), appmenuSpy.first().last().value<quint32>(), this);
......
......@@ -97,11 +97,11 @@ void TestBlur::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_blurManagerInterface = m_display->createBlurManager(m_display);
m_blurManagerInterface = new BlurManagerInterface(m_display, m_display);
QVERIFY(blurSpy.wait());
m_blurManager = registry.createBlurManager(blurSpy.first().first().value<quint32>(), blurSpy.first().last().value<quint32>(), this);
}
......
......@@ -99,11 +99,11 @@ void TestContrast::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_contrastManagerInterface = m_display->createContrastManager(m_display);
m_contrastManagerInterface = new ContrastManagerInterface(m_display, m_display);
QVERIFY(contrastSpy.wait());
m_contrastManager = registry.createContrastManager(contrastSpy.first().first().value<quint32>(), contrastSpy.first().last().value<quint32>(), this);
......
......@@ -81,8 +81,8 @@ void TestFilter::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_compositorInterface = m_display->createCompositor(m_display);
m_blurManagerInterface = m_display->createBlurManager(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_blurManagerInterface = new BlurManagerInterface(m_display, m_display);
}
void TestFilter::cleanup()
......
......@@ -70,7 +70,7 @@ void TestWaylandOutput::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_serverOutput = m_display->createOutput(this);
m_serverOutput = new OutputInterface(m_display, this);
QCOMPARE(m_serverOutput->pixelSize(), QSize());
QCOMPARE(m_serverOutput->refreshRate(), 60000);
m_serverOutput->addMode(QSize(800, 600), OutputInterface::ModeFlags(OutputInterface::ModeFlag::Preferred));
......@@ -477,7 +477,7 @@ void TestWaylandOutput::testDpms()
using namespace KWayland::Client;
using namespace KWaylandServer;
m_display->createDpmsManager();
new DpmsManagerInterface(m_display);
// set Dpms on the Output
QSignalSpy serverDpmsSupportedChangedSpy(m_serverOutput, &OutputInterface::dpmsSupportedChanged);
......@@ -572,7 +572,7 @@ void TestWaylandOutput::testDpmsRequestMode()
using namespace KWaylandServer;
// setup code
m_display->createDpmsManager();
new DpmsManagerInterface(m_display);
// set Dpms on the Output
QSignalSpy serverDpmsSupportedChangedSpy(m_serverOutput, &OutputInterface::dpmsSupportedChanged);
......
......@@ -82,7 +82,7 @@ void TestWaylandOutputDevice::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_serverOutputDevice = m_display->createOutputDevice(this);
m_serverOutputDevice = new OutputDeviceInterface(m_display, this);
m_serverOutputDevice->setUuid("1337");
......
......@@ -95,8 +95,8 @@ void TestWaylandOutputManagement::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createCompositor(this);
auto outputDeviceInterface = m_display->createOutputDevice(this);
new CompositorInterface(m_display, this);
auto outputDeviceInterface = new OutputDeviceInterface(m_display, this);
OutputDeviceInterface::Mode m0;
m0.id = 0;
......@@ -129,7 +129,7 @@ void TestWaylandOutputManagement::init()
outputDeviceInterface->create();
m_serverOutputs << outputDeviceInterface;
m_outputManagementInterface = m_display->createOutputManagement(this);
m_outputManagementInterface = new OutputManagementInterface(m_display, this);
m_outputManagementInterface->create();
QVERIFY(m_outputManagementInterface->isValid());
......
......@@ -90,7 +90,7 @@ void TestRegion::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
}
......
......@@ -128,12 +128,12 @@ void TestWaylandSeat::init()
QVERIFY(m_display->isRunning());
m_display->createShm();
m_compositorInterface = m_display->createCompositor(m_display);
m_subCompositorInterface = m_display->createSubCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_subCompositorInterface = new SubCompositorInterface(m_display, m_display);
QVERIFY(m_subCompositorInterface);
m_relativePointerManagerV1Interface = m_display->createRelativePointerManagerV1(m_display);
m_pointerGesturesV1Interface = m_display->createPointerGesturesV1(m_display);
m_relativePointerManagerV1Interface = new RelativePointerManagerV1Interface(m_display, m_display);
m_pointerGesturesV1Interface = new PointerGesturesV1Interface(m_display, m_display);
// setup connection
m_connection = new KWayland::Client::ConnectionThread;
......@@ -160,7 +160,7 @@ void TestWaylandSeat::init()
registry.setup();
QVERIFY(compositorSpy.wait());
m_seatInterface = m_display->createSeat();
m_seatInterface = new SeatInterface(m_display);
QVERIFY(m_seatInterface);
m_seatInterface->setName(QStringLiteral("seat0"));
m_seatInterface->create();
......@@ -1746,7 +1746,7 @@ void TestWaylandSeat::testSelection()
{
using namespace KWayland::Client;
using namespace KWaylandServer;
QScopedPointer<DataDeviceManagerInterface> ddmi(m_display->createDataDeviceManager());
QScopedPointer<DataDeviceManagerInterface> ddmi(new DataDeviceManagerInterface(m_display));
Registry registry;
QSignalSpy dataDeviceManagerSpy(&registry, SIGNAL(dataDeviceManagerAnnounced(quint32,quint32)));
QVERIFY(dataDeviceManagerSpy.isValid());
......@@ -1857,7 +1857,7 @@ void TestWaylandSeat::testDataDeviceForKeyboardSurface()
using namespace KWayland::Client;
using namespace KWaylandServer;
// create the DataDeviceManager
QScopedPointer<DataDeviceManagerInterface> ddmi(m_display->createDataDeviceManager());
QScopedPointer<DataDeviceManagerInterface> ddmi(new DataDeviceManagerInterface(m_display));
QSignalSpy ddiCreatedSpy(ddmi.data(), &DataDeviceManagerInterface::dataDeviceCreated);
QVERIFY(ddiCreatedSpy.isValid());
m_seatInterface->setHasKeyboard(true);
......
......@@ -96,11 +96,11 @@ void TestSlide::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_slideManagerInterface = m_display->createSlideManager(m_display);
m_slideManagerInterface = new SlideManagerInterface(m_display, m_display);
QVERIFY(slideSpy.wait());
m_slideManager = registry.createSlideManager(slideSpy.first().first().value<quint32>(), slideSpy.first().last().value<quint32>(), this);
......
......@@ -83,7 +83,7 @@ void TestSubCompositor::init()
QVERIFY(registry.isValid());
registry.setup();
m_subcompositorInterface = m_display->createSubCompositor(m_display);
m_subcompositorInterface = new SubCompositorInterface(m_display, m_display);
QVERIFY(m_subcompositorInterface);
QVERIFY(subCompositorSpy.wait());
......
......@@ -118,8 +118,8 @@ void TestSubSurface::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_subcompositorInterface = m_display->createSubCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
m_subcompositorInterface = new SubCompositorInterface(m_display, m_display);
QVERIFY(m_subcompositorInterface);
QVERIFY(subCompositorSpy.wait());
......
......@@ -88,10 +88,10 @@ void TestWaylandSurface::init()
QVERIFY(m_display->isRunning());
m_display->createShm();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(m_compositorInterface);
m_idleInhibitInterface = m_display->createIdleInhibitManagerV1(m_display);
m_idleInhibitInterface = new IdleInhibitManagerV1Interface(m_display, m_display);
QVERIFY(m_idleInhibitInterface);
// setup connection
......@@ -1114,7 +1114,7 @@ void TestWaylandSurface::testOutput()
QSignalSpy outputAnnouncedSpy(&registry, &Registry::outputAnnounced);
QVERIFY(outputAnnouncedSpy.isValid());
auto serverOutput = m_display->createOutput(m_display);
auto serverOutput = new OutputInterface(m_display, m_display);
serverOutput->create();
QVERIFY(outputAnnouncedSpy.wait());
QScopedPointer<Output> clientOutput(registry.createOutput(outputAnnouncedSpy.first().first().value<quint32>(), outputAnnouncedSpy.first().last().value<quint32>()));
......
......@@ -131,12 +131,12 @@ void TestWindowManagement::init()
QVERIFY(m_registry->isValid());
m_registry->setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = m_registry->createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_windowManagementInterface = m_display->createPlasmaWindowManagement(m_display);
m_windowManagementInterface = new PlasmaWindowManagementInterface(m_display, m_display);
QVERIFY(windowManagementSpy.wait());
m_windowManagement = m_registry->createPlasmaWindowManagement(windowManagementSpy.first().first().value<quint32>(), windowManagementSpy.first().last().value<quint32>(), this);
......
......@@ -97,16 +97,16 @@ void TestXdgDecoration::init()
QVERIFY(m_registry->isValid());
m_registry->setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = m_registry->createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_xdgShellInterface = m_display->createXdgShell(m_display);
m_xdgShellInterface = new XdgShellInterface(m_display, m_display);
QVERIFY(xdgShellSpy.wait());
m_xdgShell = m_registry->createXdgShell(xdgShellSpy.first().first().value<quint32>(),
xdgShellSpy.first().last().value<quint32>(), this);
m_xdgDecorationManagerInterface = m_display->createXdgDecorationManagerV1(m_display);
m_xdgDecorationManagerInterface = new XdgDecorationManagerV1Interface(m_display, m_display);
QVERIFY(xdgDecorationManagerSpy.wait());
m_xdgDecorationManager = m_registry->createXdgDecorationManager(xdgDecorationManagerSpy.first().first().value<quint32>(),
......
......@@ -122,11 +122,11 @@ void TestForeign::init()
QVERIFY(registry.isValid());
registry.setup();
m_compositorInterface = m_display->createCompositor(m_display);
m_compositorInterface = new CompositorInterface(m_display, m_display);
QVERIFY(compositorSpy.wait());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
m_foreignInterface = m_display->createXdgForeignV2Interface(m_display);
m_foreignInterface = new XdgForeignV2Interface(m_display, m_display);
QVERIFY(exporterSpy.wait());
//Both importer and exporter should have been triggered by now
......
......@@ -58,12 +58,12 @@ void TestXdgOutput::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_serverOutput = m_display->createOutput(this);
m_serverOutput = new OutputInterface(m_display, this);
m_serverOutput->addMode(QSize(1920, 1080), OutputInterface::ModeFlags(OutputInterface::ModeFlag::Preferred));
m_serverOutput->setCurrentMode(QSize(1920, 1080));
m_serverOutput->create();
m_serverXdgOutputManager = m_display->createXdgOutputManagerV1(this);
m_serverXdgOutputManager = new XdgOutputManagerV1Interface(m_display, this);
m_serverXdgOutput = m_serverXdgOutputManager->createXdgOutput(m_serverOutput, this);
m_serverXdgOutput->setLogicalSize(QSize(1280, 720)); //a 1.5 scale factor
m_serverXdgOutput->setLogicalPosition(QPoint(11,12)); //not a sensible value for one monitor, but works for this test
......
......@@ -93,19 +93,19 @@ void XdgShellTest::init()
m_display->start();
QVERIFY(m_display->isRunning());
m_display->createShm();
m_o1Interface = m_display->createOutput(m_display);
m_o1Interface = new OutputInterface(m_display, m_display);
m_o1Interface->addMode(QSize(1024, 768));
m_o1Interface->create();
m_o2Interface = m_display->createOutput(m_display);
m_o2Interface = new OutputInterface(m_display, m_display);
m_o2Interface->addMode(QSize(1024<