summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@digia.com>2013-02-05 12:22:17 +0100
committerAndy Nichols <andy.nichols@digia.com>2013-02-08 12:34:56 +0100
commit1b39d072c2601d39354fe83dff8b1e5c05095aaf (patch)
tree4b38960a1bcef0de376dc5441ec6372e41341801 /tests
parent2e0efd201aa75121f4dd4049598f4d120811d784 (diff)
downloadqtwayland-1b39d072c2601d39354fe83dff8b1e5c05095aaf.tar.gz
Qt-ify the QtCompositor module
Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/compositor/testcompositor.cpp4
-rw-r--r--tests/auto/compositor/testcompositor.h12
-rw-r--r--tests/auto/compositor/tst_compositor.cpp12
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/compositor/testcompositor.cpp b/tests/auto/compositor/testcompositor.cpp
index c5758753..aa15a6ab 100644
--- a/tests/auto/compositor/testcompositor.cpp
+++ b/tests/auto/compositor/testcompositor.cpp
@@ -41,12 +41,12 @@
#include "testcompositor.h"
-void TestCompositor::surfaceCreated(WaylandSurface *surface)
+void TestCompositor::surfaceCreated(QWaylandSurface *surface)
{
surfaces << surface;
}
-void TestCompositor::surfaceAboutToBeDestroyed(WaylandSurface *surface)
+void TestCompositor::surfaceAboutToBeDestroyed(QWaylandSurface *surface)
{
surfaces.removeOne(surface);
}
diff --git a/tests/auto/compositor/testcompositor.h b/tests/auto/compositor/testcompositor.h
index 785024cd..4cb77aab 100644
--- a/tests/auto/compositor/testcompositor.h
+++ b/tests/auto/compositor/testcompositor.h
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#include "waylandcompositor.h"
-#include "waylandsurface.h"
+#include "qwaylandcompositor.h"
+#include "qwaylandsurface.h"
-class TestCompositor : public WaylandCompositor
+class TestCompositor : public QWaylandCompositor
{
public:
- void surfaceCreated(WaylandSurface *surface);
- void surfaceAboutToBeDestroyed(WaylandSurface *surface);
+ void surfaceCreated(QWaylandSurface *surface);
+ void surfaceAboutToBeDestroyed(QWaylandSurface *surface);
- QList<WaylandSurface *> surfaces;
+ QList<QWaylandSurface *> surfaces;
};
diff --git a/tests/auto/compositor/tst_compositor.cpp b/tests/auto/compositor/tst_compositor.cpp
index 65dd6e23..8656338e 100644
--- a/tests/auto/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/tst_compositor.cpp
@@ -78,7 +78,7 @@ void tst_WaylandCompositor::singleClient()
QCOMPARE(ca, cb);
- QList<WaylandSurface *> surfaces = compositor.surfacesForClient(ca);
+ QList<QWaylandSurface *> surfaces = compositor.surfacesForClient(ca);
QCOMPARE(surfaces.size(), 2);
QVERIFY((surfaces.at(0) == compositor.surfaces.at(0) && surfaces.at(1) == compositor.surfaces.at(1))
|| (surfaces.at(0) == compositor.surfaces.at(1) && surfaces.at(1) == compositor.surfaces.at(0)));
@@ -149,12 +149,12 @@ void tst_WaylandCompositor::mapSurface()
wl_surface *surface = client.createSurface();
QTRY_COMPARE(compositor.surfaces.size(), 1);
- WaylandSurface *waylandSurface = compositor.surfaces.at(0);
+ QWaylandSurface *waylandSurface = compositor.surfaces.at(0);
QSignalSpy mappedSpy(waylandSurface, SIGNAL(mapped()));
QCOMPARE(waylandSurface->size(), QSize());
- QCOMPARE(waylandSurface->type(), WaylandSurface::Invalid);
+ QCOMPARE(waylandSurface->type(), QWaylandSurface::Invalid);
QSize size(256, 256);
ShmBuffer buffer(size, client.shm);
@@ -163,7 +163,7 @@ void tst_WaylandCompositor::mapSurface()
wl_surface_damage(surface, 0, 0, size.width(), size.height());
QTRY_COMPARE(waylandSurface->size(), size);
- QTRY_COMPARE(waylandSurface->type(), WaylandSurface::Shm);
+ QTRY_COMPARE(waylandSurface->type(), QWaylandSurface::Shm);
QTRY_COMPARE(mappedSpy.count(), 1);
wl_surface_destroy(surface);
@@ -199,14 +199,14 @@ void tst_WaylandCompositor::frameCallback()
int frameCounter = 0;
QTRY_COMPARE(compositor.surfaces.size(), 1);
- WaylandSurface *waylandSurface = compositor.surfaces.at(0);
+ QWaylandSurface *waylandSurface = compositor.surfaces.at(0);
QSignalSpy damagedSpy(waylandSurface, SIGNAL(damaged(const QRect &)));
for (int i = 0; i < 10; ++i) {
registerFrameCallback(surface, &frameCounter);
wl_surface_damage(surface, 0, 0, size.width(), size.height());
- QTRY_COMPARE(waylandSurface->type(), WaylandSurface::Shm);
+ QTRY_COMPARE(waylandSurface->type(), QWaylandSurface::Shm);
QTRY_COMPARE(damagedSpy.count(), i + 1);
QCOMPARE(waylandSurface->image(), buffer.image);