summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/tst_compositor.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@kdab.com>2016-08-29 15:15:29 +0200
committerGiulio Camuffo <giulio.camuffo@kdab.com>2016-09-05 11:30:27 +0000
commitda61739728b2df7981b898da5dbdd4b74be068fc (patch)
tree7fc5100c02b883a9f58983bc01b2bf010f1f776d /tests/auto/compositor/compositor/tst_compositor.cpp
parent7eccad7db057ed841e3670d14274213dcf8416e5 (diff)
Rename the QWaylandXdg* classes to QWaylandXdg*V5
This frees the QWaylandXdg name for the hopefully coming stable version of xdg-shell. Change-Id: I9beb9b035c6497fb45bee5c9104485b564ca0619 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'tests/auto/compositor/compositor/tst_compositor.cpp')
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index 05e876dd..ef076001 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -35,7 +35,7 @@
#include "qwaylandbufferref.h"
#include "qwaylandseat.h"
-#include <QtWaylandCompositor/QWaylandXdgShell>
+#include <QtWaylandCompositor/QWaylandXdgShellV5>
#include <QtWaylandCompositor/QWaylandSurface>
#include <QtWaylandCompositor/QWaylandResource>
#include <qwayland-xdg-shell.h>
@@ -379,7 +379,7 @@ class XdgTestCompositor: public TestCompositor {
Q_OBJECT
public:
XdgTestCompositor() : xdgShell(this) {}
- QWaylandXdgShell xdgShell;
+ QWaylandXdgShellV5 xdgShell;
};
void tst_WaylandCompositor::advertisesXdgShellSupport()
@@ -399,9 +399,9 @@ void tst_WaylandCompositor::createsXdgSurfaces()
MockClient client;
QTRY_VERIFY(&client.xdgShell);
- QSignalSpy xdgSurfaceCreatedSpy(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated);
- QWaylandXdgSurface *xdgSurface = nullptr;
- QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) {
+ QSignalSpy xdgSurfaceCreatedSpy(&compositor.xdgShell, &QWaylandXdgShellV5::xdgSurfaceCreated);
+ QWaylandXdgSurfaceV5 *xdgSurface = nullptr;
+ QObject::connect(&compositor.xdgShell, &QWaylandXdgShellV5::xdgSurfaceCreated, [&](QWaylandXdgSurfaceV5 *s) {
xdgSurface = s;
});
@@ -417,8 +417,8 @@ void tst_WaylandCompositor::reportsXdgSurfaceWindowGeometry()
XdgTestCompositor compositor;
compositor.create();
- QWaylandXdgSurface *xdgSurface = nullptr;
- QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) {
+ QWaylandXdgSurfaceV5 *xdgSurface = nullptr;
+ QObject::connect(&compositor.xdgShell, &QWaylandXdgShellV5::xdgSurfaceCreated, [&](QWaylandXdgSurfaceV5 *s) {
xdgSurface = s;
});
@@ -445,8 +445,8 @@ void tst_WaylandCompositor::setsXdgAppId()
XdgTestCompositor compositor;
compositor.create();
- QWaylandXdgSurface *xdgSurface = nullptr;
- QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) {
+ QWaylandXdgSurfaceV5 *xdgSurface = nullptr;
+ QObject::connect(&compositor.xdgShell, &QWaylandXdgShellV5::xdgSurfaceCreated, [&](QWaylandXdgSurfaceV5 *s) {
xdgSurface = s;
});
@@ -487,8 +487,8 @@ void tst_WaylandCompositor::sendsXdgConfigure()
XdgTestCompositor compositor;
compositor.create();
- QWaylandXdgSurface *xdgSurface = nullptr;
- QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) {
+ QWaylandXdgSurfaceV5 *xdgSurface = nullptr;
+ QObject::connect(&compositor.xdgShell, &QWaylandXdgShellV5::xdgSurfaceCreated, [&](QWaylandXdgSurfaceV5 *s) {
xdgSurface = s;
});
@@ -503,15 +503,15 @@ void tst_WaylandCompositor::sendsXdgConfigure()
QTRY_VERIFY(!xdgSurface->fullscreen());
QTRY_VERIFY(!xdgSurface->resizing());
- xdgSurface->sendConfigure(QSize(10, 20), QVector<QWaylandXdgSurface::State>{QWaylandXdgSurface::State::ActivatedState});
+ xdgSurface->sendConfigure(QSize(10, 20), QVector<QWaylandXdgSurfaceV5::State>{QWaylandXdgSurfaceV5::State::ActivatedState});
compositor.flushClients();
- QTRY_COMPARE(mockXdgSurface.configureStates, QList<uint>{QWaylandXdgSurface::State::ActivatedState});
+ QTRY_COMPARE(mockXdgSurface.configureStates, QList<uint>{QWaylandXdgSurfaceV5::State::ActivatedState});
QTRY_COMPARE(mockXdgSurface.configureSize, QSize(10, 20));
xdgSurface->sendMaximized(QSize(800, 600));
compositor.flushClients();
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::MaximizedState));
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::MaximizedState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
QTRY_COMPARE(mockXdgSurface.configureSize, QSize(800, 600));
// There hasn't been any ack_configures, so state should still be unchanged
@@ -525,8 +525,8 @@ void tst_WaylandCompositor::sendsXdgConfigure()
xdgSurface->sendUnmaximized();
compositor.flushClients();
- QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::MaximizedState));
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
+ QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::MaximizedState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
QTRY_COMPARE(mockXdgSurface.configureSize, QSize(0, 0));
// The unmaximized configure hasn't been acked, so maximized should still be true
@@ -535,32 +535,32 @@ void tst_WaylandCompositor::sendsXdgConfigure()
xdgSurface->sendResizing(QSize(800, 600));
compositor.flushClients();
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ResizingState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ResizingState));
QTRY_COMPARE(mockXdgSurface.configureSize, QSize(800, 600));
xdgSurface->sendFullscreen(QSize(1024, 768));
compositor.flushClients();
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::FullscreenState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::FullscreenState));
QTRY_COMPARE(mockXdgSurface.configureSize, QSize(1024, 768));
uint fullscreenSerial = mockXdgSurface.configureSerial;
xdgSurface->sendUnmaximized();
compositor.flushClients();
- QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
- QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::FullscreenState));
+ QTRY_VERIFY(mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
+ QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::FullscreenState));
- xdgSurface->sendConfigure(QSize(0, 0), QVector<QWaylandXdgSurface::State>{});
+ xdgSurface->sendConfigure(QSize(0, 0), QVector<QWaylandXdgSurfaceV5::State>{});
compositor.flushClients();
- QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
+ QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
xdgSurface->sendMaximized(QSize(800, 600));
compositor.flushClients();
- QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::ActivatedState));
+ QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::ActivatedState));
xdgSurface->sendFullscreen(QSize(800, 600));
compositor.flushClients();
- QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurface::State::MaximizedState));
+ QTRY_VERIFY(!mockXdgSurface.configureStates.contains(QWaylandXdgSurfaceV5::State::MaximizedState));
// Verify that acking a configure that's not the most recently sent works
xdg_surface_ack_configure(clientXdgSurface, fullscreenSerial);