Commit c23f67f9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Port namespaces and includes

parent c286a4b0
......@@ -7,7 +7,7 @@ KWayland is a Qt-style API to interact with the wayland-client and wayland-serve
KWayland provides two libraries:
- KWayland::Client
- KWayland::Server
- KWaylandServer
As the names suggest they implement a Client respectively a Server API for the Wayland
protocol. The API is Qt-styled removing the needs to interact with a for a Qt developer
......@@ -37,7 +37,7 @@ following technologies:
- QtQuick
Although the library does not perform any output, it makes it very easy to enable rendering.
The representation for a [Buffer](@ref KWayland::Server::BufferInterface) allows easy conversion
The representation for a [Buffer](@ref KWaylandServer::BufferInterface) allows easy conversion
to a (memory-shared) QImage in case the buffer represents a shared memory buffer. This QImage
can be used for rendering in a QPainter based API or to generate an OpenGL texture.
......@@ -54,14 +54,14 @@ As long as a buffer is attached surface, the surface has it referenced and the u
access the buffer without needing to care about referencing it.
The API of KWayland is hand-crafted to make usage easier. The representation of a
[Surface](@ref KWayland::Server::SurfaceInterface) combines multiple aspects about a Surface even
[Surface](@ref KWaylandServer::SurfaceInterface) combines multiple aspects about a Surface even
if in Wayland API it is added to other elements. E.g. a Surface contains all
[SubSurfaces](@ref KWayland::Server::SubSurfaceInterface) attached to it instead of the user
[SubSurfaces](@ref KWaylandServer::SubSurfaceInterface) attached to it instead of the user
having to monitor for which Surface a SubSurface got created.
Similar the representation of a [Seat](@ref KWayland::Server::SeatInterface) combines all aspects of
Similar the representation of a [Seat](@ref KWaylandServer::SeatInterface) combines all aspects of
the Seat. A user of the API only needs to interact with the Seat, there is no need to track all the
created [keyboards](@ref KWayland::Server::KeyboardInterface), [pointers](@ref KWayland::Server::PointerInterface), etc. The
created [keyboards](@ref KWaylandServer::KeyboardInterface), [pointers](@ref KWaylandServer::PointerInterface), etc. The
representation of Seat tracks which keyboards are generated and is able to forward events to the
proper focus surface, send enter and leave notifications when needed without the user of the API
to care about it.
......@@ -85,7 +85,7 @@ Applications built on top of KWayland Server integrated input events with the fo
### Private IPC with child processes
KWayland Server is well suited for having a private IPC with child processes. The [Display](@ref KWayland::Server::Display) can be
KWayland Server is well suited for having a private IPC with child processes. The [Display](@ref KWaylandServer::Display) can be
setup in a way that it doesn't create a public socket but only allows connections through socket
pairs. This allows to create a socketpair, pass one file descriptor to KWayland server and the other
to the forked process, e.g. through the WAYLAND_SOCKET environment variable. Thus a dedicated IPC
......
......@@ -29,8 +29,8 @@ private Q_SLOTS:
void testCast();
private:
KWayland::Server::Display *m_display;
KWayland::Server::CompositorInterface *m_compositorInterface;
KWaylandServer::Display *m_display;
KWaylandServer::CompositorInterface *m_compositorInterface;
KWayland::Client::ConnectionThread *m_connection;
KWayland::Client::Compositor *m_compositor;
QThread *m_thread;
......@@ -50,7 +50,7 @@ TestCompositor::TestCompositor(QObject *parent)
void TestCompositor::init()
{
using namespace KWayland::Server;
using namespace KWaylandServer;
delete m_display;
m_display = new Display(this);
m_display->setSocketName(s_socketName);
......
......@@ -45,10 +45,10 @@ private Q_SLOTS:
void testDestroy();
private:
KWayland::Server::Display *m_display = nullptr;
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWayland::Server::CompositorInterface *m_compositorInterface = nullptr;
KWayland::Server::SeatInterface *m_seatInterface = nullptr;
KWaylandServer::Display *m_display = nullptr;
KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWaylandServer::CompositorInterface *m_compositorInterface = nullptr;
KWaylandServer::SeatInterface *m_seatInterface = nullptr;
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::DataDeviceManager *m_dataDeviceManager = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
......@@ -61,8 +61,8 @@ static const QString s_socketName = QStringLiteral("kwayland-test-wayland-datade
void TestDataDevice::init()
{
qRegisterMetaType<KWayland::Server::DataSourceInterface*>();
using namespace KWayland::Server;
qRegisterMetaType<KWaylandServer::DataSourceInterface*>();
using namespace KWaylandServer;
delete m_display;
m_display = new Display(this);
m_display->setSocketName(s_socketName);
......@@ -165,9 +165,9 @@ void TestDataDevice::cleanup()
void TestDataDevice::testCreate()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWayland::Server::DataDeviceInterface*)));
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWaylandServer::DataDeviceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataDevice> dataDevice(m_dataDeviceManager->getDataDevice(m_seat));
......@@ -211,10 +211,10 @@ void TestDataDevice::testDrag_data()
void TestDataDevice::testDrag()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QScopedPointer<Pointer> pointer(m_seat->createPointer());
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWayland::Server::DataDeviceInterface*)));
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWaylandServer::DataDeviceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataDevice> dataDevice(m_dataDeviceManager->getDataDevice(m_seat));
......@@ -225,7 +225,7 @@ void TestDataDevice::testDrag()
auto deviceInterface = dataDeviceCreatedSpy.first().first().value<DataDeviceInterface*>();
QVERIFY(deviceInterface);
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -236,7 +236,7 @@ void TestDataDevice::testDrag()
auto sourceInterface = dataSourceCreatedSpy.first().first().value<DataSourceInterface*>();
QVERIFY(sourceInterface);
QSignalSpy surfaceCreatedSpy(m_compositorInterface, SIGNAL(surfaceCreated(KWayland::Server::SurfaceInterface*)));
QSignalSpy surfaceCreatedSpy(m_compositorInterface, SIGNAL(surfaceCreated(KWaylandServer::SurfaceInterface*)));
QVERIFY(surfaceCreatedSpy.isValid());
QScopedPointer<Surface> surface(m_compositor->createSurface());
......@@ -294,10 +294,10 @@ void TestDataDevice::testDragInternally_data()
void TestDataDevice::testDragInternally()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QScopedPointer<Pointer> pointer(m_seat->createPointer());
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWayland::Server::DataDeviceInterface*)));
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWaylandServer::DataDeviceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataDevice> dataDevice(m_dataDeviceManager->getDataDevice(m_seat));
......@@ -308,7 +308,7 @@ void TestDataDevice::testDragInternally()
auto deviceInterface = dataDeviceCreatedSpy.first().first().value<DataDeviceInterface*>();
QVERIFY(deviceInterface);
QSignalSpy surfaceCreatedSpy(m_compositorInterface, SIGNAL(surfaceCreated(KWayland::Server::SurfaceInterface*)));
QSignalSpy surfaceCreatedSpy(m_compositorInterface, SIGNAL(surfaceCreated(KWaylandServer::SurfaceInterface*)));
QVERIFY(surfaceCreatedSpy.isValid());
QScopedPointer<Surface> surface(m_compositor->createSurface());
......@@ -361,10 +361,10 @@ void TestDataDevice::testDragInternally()
void TestDataDevice::testSetSelection()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QScopedPointer<Pointer> pointer(m_seat->createPointer());
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWayland::Server::DataDeviceInterface*)));
QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataDeviceCreated(KWaylandServer::DataDeviceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataDevice> dataDevice(m_dataDeviceManager->getDataDevice(m_seat));
......@@ -375,7 +375,7 @@ void TestDataDevice::testSetSelection()
auto deviceInterface = dataDeviceCreatedSpy.first().first().value<DataDeviceInterface*>();
QVERIFY(deviceInterface);
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataDeviceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -388,7 +388,7 @@ void TestDataDevice::testSetSelection()
QVERIFY(sourceInterface);
// everything setup, now we can test setting the selection
QSignalSpy selectionChangedSpy(deviceInterface, SIGNAL(selectionChanged(KWayland::Server::DataSourceInterface*)));
QSignalSpy selectionChangedSpy(deviceInterface, SIGNAL(selectionChanged(KWaylandServer::DataSourceInterface*)));
QVERIFY(selectionChangedSpy.isValid());
QSignalSpy selectionClearedSpy(deviceInterface, SIGNAL(selectionCleared()));
QVERIFY(selectionClearedSpy.isValid());
......@@ -446,7 +446,7 @@ void TestDataDevice::testSendSelectionOnSeat()
{
// this test verifies that the selection is sent when setting a focused keyboard
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
// first add keyboard support to Seat
QSignalSpy keyboardChangedSpy(m_seat, &Seat::hasKeyboardChanged);
QVERIFY(keyboardChangedSpy.isValid());
......@@ -503,7 +503,7 @@ void TestDataDevice::testReplaceSource()
{
// this test verifies that replacing a data source cancels the previous source
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
// first add keyboard support to Seat
QSignalSpy keyboardChangedSpy(m_seat, &Seat::hasKeyboardChanged);
QVERIFY(keyboardChangedSpy.isValid());
......
......@@ -35,8 +35,8 @@ private Q_SLOTS:
void testDestroy();
private:
KWayland::Server::Display *m_display = nullptr;
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWaylandServer::Display *m_display = nullptr;
KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::DataDeviceManager *m_dataDeviceManager = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
......@@ -47,7 +47,7 @@ static const QString s_socketName = QStringLiteral("kwayland-test-wayland-dataso
void TestDataSource::init()
{
using namespace KWayland::Server;
using namespace KWaylandServer;
delete m_display;
m_display = new Display(this);
m_display->setSocketName(s_socketName);
......@@ -116,10 +116,10 @@ void TestDataSource::cleanup()
void TestDataSource::testOffer()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
qRegisterMetaType<KWayland::Server::DataSourceInterface*>();
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
qRegisterMetaType<KWaylandServer::DataSourceInterface*>();
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataSourceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -180,9 +180,9 @@ void TestDataSource::testTargetAccepts_data()
void TestDataSource::testTargetAccepts()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataSourceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -205,9 +205,9 @@ void TestDataSource::testTargetAccepts()
void TestDataSource::testRequestSend()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataSourceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -238,7 +238,7 @@ void TestDataSource::testRequestSendOnUnbound()
{
// this test verifies that the server doesn't crash when requesting a send on an unbound DataSource
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, &DataDeviceManagerInterface::dataSourceCreated);
QVERIFY(dataSourceCreatedSpy.isValid());
......@@ -259,9 +259,9 @@ void TestDataSource::testRequestSendOnUnbound()
void TestDataSource::testCancel()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataSourceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......@@ -281,9 +281,9 @@ void TestDataSource::testCancel()
void TestDataSource::testServerGet()
{
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWayland::Server::DataSourceInterface*)));
QSignalSpy dataSourceCreatedSpy(m_dataDeviceManagerInterface, SIGNAL(dataSourceCreated(KWaylandServer::DataSourceInterface*)));
QVERIFY(dataSourceCreatedSpy.isValid());
QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
......
......@@ -41,13 +41,13 @@ private Q_SLOTS:
private:
KWayland::Client::Surface *createSurface();
KWayland::Server::SurfaceInterface *getServerSurface();
KWaylandServer::SurfaceInterface *getServerSurface();
KWayland::Server::Display *m_display = nullptr;
KWayland::Server::CompositorInterface *m_compositorInterface = nullptr;
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWayland::Server::SeatInterface *m_seatInterface = nullptr;
KWayland::Server::ShellInterface *m_shellInterface = nullptr;
KWaylandServer::Display *m_display = nullptr;
KWaylandServer::CompositorInterface *m_compositorInterface = nullptr;
KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManagerInterface = nullptr;
KWaylandServer::SeatInterface *m_seatInterface = nullptr;
KWaylandServer::ShellInterface *m_shellInterface = nullptr;
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
......@@ -67,7 +67,7 @@ static const QString s_socketName = QStringLiteral("kwayland-test-wayland-drag-n
void TestDragAndDrop::init()
{
using namespace KWayland::Server;
using namespace KWaylandServer;
using namespace KWayland::Client;
delete m_display;
m_display = new Display(this);
......@@ -189,9 +189,9 @@ KWayland::Client::Surface *TestDragAndDrop::createSurface()
return s;
}
KWayland::Server::SurfaceInterface *TestDragAndDrop::getServerSurface()
KWaylandServer::SurfaceInterface *TestDragAndDrop::getServerSurface()
{
using namespace KWayland::Server;
using namespace KWaylandServer;
QSignalSpy surfaceCreatedSpy(m_compositorInterface, &CompositorInterface::surfaceCreated);
if (!surfaceCreatedSpy.isValid()) {
return nullptr;
......@@ -205,7 +205,7 @@ KWayland::Server::SurfaceInterface *TestDragAndDrop::getServerSurface()
void TestDragAndDrop::testPointerDragAndDrop()
{
// this test verifies the very basic drag and drop on one surface, an enter, a move and the drop
using namespace KWayland::Server;
using namespace KWaylandServer;
using namespace KWayland::Client;
// first create a window
QScopedPointer<Surface> s(createSurface());
......@@ -298,7 +298,7 @@ void TestDragAndDrop::testPointerDragAndDrop()
void TestDragAndDrop::testTouchDragAndDrop()
{
// this test verifies the very basic drag and drop on one surface, an enter, a move and the drop
using namespace KWayland::Server;
using namespace KWaylandServer;
using namespace KWayland::Client;
// first create a window
QScopedPointer<Surface> s(createSurface());
......@@ -398,7 +398,7 @@ void TestDragAndDrop::testTouchDragAndDrop()
void TestDragAndDrop::testDragAndDropWithCancelByDestroyDataSource()
{
// this test simulates the problem from BUG 389221
using namespace KWayland::Server;
using namespace KWaylandServer;
using namespace KWayland::Client;
// first create a window
QScopedPointer<Surface> s(createSurface());
......@@ -490,7 +490,7 @@ void TestDragAndDrop::testDragAndDropWithCancelByDestroyDataSource()
void TestDragAndDrop::testPointerEventsIgnored()
{
// this test verifies that all pointer events are ignored on the focused Pointer device during drag
using namespace KWayland::Server;
using namespace KWaylandServer;
using namespace KWayland::Client;
// first create a window
QScopedPointer<Surface> s(createSurface());
......
......@@ -24,7 +24,7 @@
#include <errno.h> // For EPROTO
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
class ErrorTest : public QObject
{
......
......@@ -17,7 +17,7 @@
#include <linux/input.h>
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
Q_DECLARE_METATYPE(Qt::MouseButton)
......
......@@ -17,7 +17,7 @@
#include "../../src/server/seat_interface.h"
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
class IdleTest : public QObject
{
......
......@@ -43,11 +43,11 @@ private Q_SLOTS:
void testRemoveRequested();
private:
KWayland::Server::Display *m_display;
KWayland::Server::CompositorInterface *m_compositorInterface;
KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_plasmaVirtualDesktopManagementInterface;
KWayland::Server::PlasmaWindowManagementInterface *m_windowManagementInterface;
KWayland::Server::PlasmaWindowInterface *m_windowInterface;
KWaylandServer::Display *m_display;
KWaylandServer::CompositorInterface *m_compositorInterface;
KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_plasmaVirtualDesktopManagementInterface;
KWaylandServer::PlasmaWindowManagementInterface *m_windowManagementInterface;
KWaylandServer::PlasmaWindowInterface *m_windowInterface;
KWayland::Client::ConnectionThread *m_connection;
KWayland::Client::Compositor *m_compositor;
......@@ -74,7 +74,7 @@ TestVirtualDesktop::TestVirtualDesktop(QObject *parent)
void TestVirtualDesktop::init()
{
using namespace KWayland::Server;
using namespace KWaylandServer;
delete m_display;
m_display = new Display(this);
m_display->setSocketName(s_socketName);
......@@ -183,7 +183,7 @@ void TestVirtualDesktop::testCreate()
//on this createDesktop bind() isn't called already, the desktopadded signals will be sent after bind happened
KWayland::Server::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-1"));
KWaylandServer::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-1"));
desktop1Int->setName("Desktop 1");
desktopCreatedSpy.wait();
......@@ -206,7 +206,7 @@ void TestVirtualDesktop::testCreate()
//on those createDesktop the bind will already be done
KWayland::Server::PlasmaVirtualDesktopInterface *desktop2Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-2"));
KWaylandServer::PlasmaVirtualDesktopInterface *desktop2Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-2"));
desktop2Int->setName("Desktop 2");
desktopCreatedSpy.wait();
arguments = desktopCreatedSpy.takeFirst();
......@@ -214,7 +214,7 @@ void TestVirtualDesktop::testCreate()
QCOMPARE(arguments.at(1).toUInt(), (quint32)1);
QCOMPARE(m_plasmaVirtualDesktopManagement->desktops().length(), 2);
KWayland::Server::PlasmaVirtualDesktopInterface *desktop3Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-3"));
KWaylandServer::PlasmaVirtualDesktopInterface *desktop3Int = m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-3"));
desktop3Int->setName("Desktop 3");
desktopCreatedSpy.wait();
arguments = desktopCreatedSpy.takeFirst();
......@@ -300,7 +300,7 @@ void TestVirtualDesktop::testDestroy()
//rebuild some desktops
testCreate();
KWayland::Server::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->desktops().first();
KWaylandServer::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->desktops().first();
KWayland::Client::PlasmaVirtualDesktop *desktop1 = m_plasmaVirtualDesktopManagement->desktops().first();
......@@ -337,16 +337,16 @@ void TestVirtualDesktop::testActivate()
//rebuild some desktops
testCreate();
KWayland::Server::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->desktops().first();
KWaylandServer::PlasmaVirtualDesktopInterface *desktop1Int = m_plasmaVirtualDesktopManagementInterface->desktops().first();
KWayland::Client::PlasmaVirtualDesktop *desktop1 = m_plasmaVirtualDesktopManagement->desktops().first();
QVERIFY(desktop1->isActive());
QVERIFY(desktop1Int->isActive());
KWayland::Server::PlasmaVirtualDesktopInterface *desktop2Int = m_plasmaVirtualDesktopManagementInterface->desktops()[1];
KWaylandServer::PlasmaVirtualDesktopInterface *desktop2Int = m_plasmaVirtualDesktopManagementInterface->desktops()[1];
KWayland::Client::PlasmaVirtualDesktop *desktop2 = m_plasmaVirtualDesktopManagement->desktops()[1];
QVERIFY(!desktop2Int->isActive());
QSignalSpy requestActivateSpy(desktop2Int, &KWayland::Server::PlasmaVirtualDesktopInterface::activateRequested);
QSignalSpy requestActivateSpy(desktop2Int, &KWaylandServer::PlasmaVirtualDesktopInterface::activateRequested);
QSignalSpy activatedSpy(desktop2, &KWayland::Client::PlasmaVirtualDesktop::activated);
desktop2->requestActivate();
......@@ -386,7 +386,7 @@ void TestVirtualDesktop::testEnterLeaveDesktop()
{
testCreate();
QSignalSpy enterRequestedSpy(m_windowInterface, &KWayland::Server::PlasmaWindowInterface::enterPlasmaVirtualDesktopRequested);
QSignalSpy enterRequestedSpy(m_windowInterface, &KWaylandServer::PlasmaWindowInterface::enterPlasmaVirtualDesktopRequested);
m_window->requestEnterVirtualDesktop(QStringLiteral("0-1"));
enterRequestedSpy.wait();
......@@ -420,7 +420,7 @@ void TestVirtualDesktop::testEnterLeaveDesktop()
QCOMPARE(m_window->plasmaVirtualDesktops().length(), 2);
//remove a desktop
QSignalSpy leaveRequestedSpy(m_windowInterface, &KWayland::Server::PlasmaWindowInterface::leavePlasmaVirtualDesktopRequested);
QSignalSpy leaveRequestedSpy(m_windowInterface, &KWaylandServer::PlasmaWindowInterface::leavePlasmaVirtualDesktopRequested);
m_window->requestLeaveVirtualDesktop(QStringLiteral("0-1"));
leaveRequestedSpy.wait();
......@@ -484,7 +484,7 @@ void TestVirtualDesktop::testCreateRequested()
//rebuild some desktops
testCreate();
QSignalSpy desktopCreateRequestedSpy(m_plasmaVirtualDesktopManagementInterface, &KWayland::Server::PlasmaVirtualDesktopManagementInterface::desktopCreateRequested);
QSignalSpy desktopCreateRequestedSpy(m_plasmaVirtualDesktopManagementInterface, &KWaylandServer::PlasmaVirtualDesktopManagementInterface::desktopCreateRequested);
QSignalSpy desktopCreatedSpy(m_plasmaVirtualDesktopManagement, &PlasmaVirtualDesktopManagement::desktopCreated);
//listen for createdRequested
......@@ -495,7 +495,7 @@ void TestVirtualDesktop::testCreateRequested()
//actually create
m_plasmaVirtualDesktopManagementInterface->createDesktop(QStringLiteral("0-4"), 1);
KWayland::Server::PlasmaVirtualDesktopInterface *desktopInt = m_plasmaVirtualDesktopManagementInterface->desktops().at(1);
KWaylandServer::PlasmaVirtualDesktopInterface *desktopInt = m_plasmaVirtualDesktopManagementInterface->desktops().at(1);
QCOMPARE(desktopInt->id(), QStringLiteral("0-4"));
desktopInt->setName(QStringLiteral("Desktop"));
......@@ -521,7 +521,7 @@ void TestVirtualDesktop::testRemoveRequested()
//rebuild some desktops
testCreate();
QSignalSpy desktopRemoveRequestedSpy(m_plasmaVirtualDesktopManagementInterface, &KWayland::Server::PlasmaVirtualDesktopManagementInterface::desktopRemoveRequested);
QSignalSpy desktopRemoveRequestedSpy(m_plasmaVirtualDesktopManagementInterface, &KWaylandServer::PlasmaVirtualDesktopManagementInterface::desktopRemoveRequested);
//request a remove, just check the request arrived, ignore the request.
m_plasmaVirtualDesktopManagement->requestRemoveVirtualDesktop(QStringLiteral("0-1"));
......
......@@ -19,20 +19,20 @@
#include <linux/input.h>
using namespace KWayland::Client;
using namespace KWayland::Server;
using namespace KWaylandServer;
Q_DECLARE_METATYPE(Qt::MouseButton)
typedef void (KWayland::Client::PlasmaWindow::*ClientWindowSignal)();
Q_DECLARE_METATYPE(ClientWindowSignal)
typedef void (KWayland::Server::PlasmaWindowInterface::*ServerWindowBoolSetter)(bool);
typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowBoolSetter)(bool);
Q_DECLARE_METATYPE(ServerWindowBoolSetter)
typedef void (KWayland::Server::PlasmaWindowInterface::*ServerWindowStringSetter)(const QString&);
typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowStringSetter)(const QString&);
Q_DECLARE_METATYPE(ServerWindowStringSetter)
typedef void (KWayland::Server::PlasmaWindowInterface::*ServerWindowQuint32Setter)(quint32);
typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowQuint32Setter)(quint32);
Q_DECLARE_METATYPE(ServerWindowQuint32Setter)
typedef void (KWayland::Server::PlasmaWindowInterface::*ServerWindowVoidSetter)();
typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowVoidSetter)();
Q_DECLARE_METATYPE(ServerWindowVoidSetter)
typedef void (KWayland::Server::PlasmaWindowInterface::*ServerWindowIconSetter)(const QIcon&);
typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowIconSetter)(const QIcon&);
Q_DECLARE_METATYPE(ServerWindowIconSetter)
class PlasmaWindowModelTest : public QObject
......@@ -84,7 +84,7 @@ private:
Display *m_display = nullptr;
PlasmaWindowManagementInterface *m_pwInterface = nullptr;
PlasmaWindowManagement *m_pw = nullptr;
KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_plasmaVirtualDesktopManagementInterface = nullptr;
KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_plasmaVirtualDesktopManagementInterface = nullptr;
ConnectionThread *m_connection = nullptr;
QThread *m_thread = nullptr;
EventQueue *m_queue = nullptr;
......
......@@ -18,7 +18,7 @@
using namespace KWayland::Client;