summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-04-15 09:19:39 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-04-15 09:33:45 +0200
commitd7b198605de9979b7875c2da20dea5e4657deb17 (patch)
tree7374f5b42572027f09c54e08b32ee3aac0bed4b8 /examples
parente4a4a6dd7503f069efbae81c0587f6d8fe3cee99 (diff)
parentd5e7965a87d81e2d7157c785403b0aba681de62a (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/qml-compositor/main.cpp9
-rw-r--r--examples/wayland/qwindow-compositor/qwindowcompositor.cpp1
-rw-r--r--examples/wayland/server-buffer/compositor/main.cpp12
3 files changed, 4 insertions, 18 deletions
diff --git a/examples/wayland/qml-compositor/main.cpp b/examples/wayland/qml-compositor/main.cpp
index b857f6bbd..ab8589986 100644
--- a/examples/wayland/qml-compositor/main.cpp
+++ b/examples/wayland/qml-compositor/main.cpp
@@ -87,7 +87,6 @@ public:
signals:
void windowAdded(QVariant window);
- void windowDestroyed(QVariant window);
void windowResized(QVariant window);
void fullscreenSurfaceChanged();
@@ -112,14 +111,12 @@ private slots:
QWaylandQuickSurface *surface = qobject_cast<QWaylandQuickSurface *>(sender());
if (surface == m_fullscreenSurface)
m_fullscreenSurface = 0;
- emit windowDestroyed(QVariant::fromValue(surface));
}
- void surfaceDestroyed(QObject *object) {
- QWaylandQuickSurface *surface = static_cast<QWaylandQuickSurface *>(object);
+ void surfaceDestroyed() {
+ QWaylandQuickSurface *surface = static_cast<QWaylandQuickSurface *>(sender());
if (surface == m_fullscreenSurface)
m_fullscreenSurface = 0;
- emit windowDestroyed(QVariant::fromValue(surface));
}
void sendCallbacks() {
@@ -137,7 +134,7 @@ protected:
}
void surfaceCreated(QWaylandSurface *surface) {
- connect(surface, SIGNAL(destroyed(QObject *)), this, SLOT(surfaceDestroyed(QObject *)));
+ connect(surface, SIGNAL(surfaceDestroyed()), this, SLOT(surfaceDestroyed()));
connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
connect(surface,SIGNAL(unmapped()), this,SLOT(surfaceUnmapped()));
}
diff --git a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
index 31751e057..0b39f1102 100644
--- a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
+++ b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
@@ -90,6 +90,7 @@ public:
if (bufferRef) {
if (bufferRef.isShm()) {
shmTex = new QOpenGLTexture(bufferRef.image(), QOpenGLTexture::DontGenerateMipMaps);
+ shmTex->setWrapMode(QOpenGLTexture::ClampToEdge);
texture = shmTex->textureId();
} else {
texture = bufferRef.createTexture();
diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp
index e0eb0ad2c..312cff2c5 100644
--- a/examples/wayland/server-buffer/compositor/main.cpp
+++ b/examples/wayland/server-buffer/compositor/main.cpp
@@ -100,7 +100,6 @@ public:
signals:
void windowAdded(QVariant window);
- void windowDestroyed(QVariant window);
void windowResized(QVariant window);
void serverBufferItemCreated(QVariant);
void serverBuffersCreated();
@@ -118,16 +117,6 @@ private slots:
emit windowAdded(QVariant::fromValue(surface));
}
- void surfaceUnmapped() {
- QWaylandSurface *surface = qobject_cast<QWaylandSurface *>(sender());
- emit windowDestroyed(QVariant::fromValue(surface));
- }
-
- void surfaceDestroyed(QObject *object) {
- QWaylandSurface *surface = static_cast<QWaylandSurface *>(object);
- emit windowDestroyed(QVariant::fromValue(surface));
- }
-
void sendCallbacks() {
sendFrameCallbacks(surfaces());
}
@@ -216,7 +205,6 @@ protected:
void surfaceCreated(QWaylandSurface *surface) {
connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
- connect(surface,SIGNAL(unmapped()), this,SLOT(surfaceUnmapped()));
}
void share_buffer_bind_resource(Resource *resource) Q_DECL_OVERRIDE