summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-08-19 13:06:08 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2016-08-22 11:31:18 +0000
commitb7075b72200b7b087e2c34fa449737970981ccea (patch)
treeaeae0620bd3c64a8f836619d68ae5b4fd139dbf6 /tests
parent768a28b284fa806cba38f864c56ba2e2c37296f2 (diff)
Rename QWaylandSurface::isMapped to hasContent
It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/compositor/tst_compositor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/compositor/tst_compositor.cpp b/tests/auto/compositor/tst_compositor.cpp
index 606a7e7a8..05e876dd0 100644
--- a/tests/auto/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/tst_compositor.cpp
@@ -212,10 +212,10 @@ void tst_WaylandCompositor::mapSurface()
QWaylandSurface *waylandSurface = compositor.surfaces.at(0);
- QSignalSpy mappedSpy(waylandSurface, SIGNAL(mappedChanged()));
+ QSignalSpy hasContentSpy(waylandSurface, SIGNAL(hasContentChanged()));
QCOMPARE(waylandSurface->size(), QSize());
- QCOMPARE(waylandSurface->isMapped(), false);
+ QCOMPARE(waylandSurface->hasContent(), false);
QSize size(256, 256);
ShmBuffer buffer(size, client.shm);
@@ -227,8 +227,8 @@ void tst_WaylandCompositor::mapSurface()
wl_surface_commit(surface);
QTRY_COMPARE(waylandSurface->size(), size);
- QTRY_COMPARE(waylandSurface->isMapped(), true);
- QTRY_COMPARE(mappedSpy.count(), 1);
+ QTRY_COMPARE(waylandSurface->hasContent(), true);
+ QTRY_COMPARE(hasContentSpy.count(), 1);
wl_surface_destroy(surface);
}
@@ -296,7 +296,7 @@ void tst_WaylandCompositor::frameCallback()
wl_surface_damage(surface, 0, 0, size.width(), size.height());
wl_surface_commit(surface);
- QTRY_COMPARE(waylandSurface->isMapped(), true);
+ QTRY_COMPARE(waylandSurface->hasContent(), true);
QTRY_COMPARE(damagedSpy.count(), i + 1);
QCOMPARE(static_cast<BufferView*>(waylandSurface->views().first())->image(), buffer.image);