summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-10-25 14:06:54 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2017-10-25 14:06:54 +0200
commit523cf490b4c46916c6f5253c666a492f5cce2aad (patch)
treeb4514f338b143ab430fe2b91ec7699cb176a147e /examples
parent8e3c71b2d1ec37222bf1648aa23eb033062b4ea6 (diff)
parentf1407493d6d25f24a3c71fbcedc00598baa44b56 (diff)
Merge remote-tracking branch 'qt/5.9' into 5.10v5.10.0-beta3
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/custom-extension/client-common/customextension.cpp26
-rw-r--r--examples/wayland/custom-extension/client-common/customextension.h34
-rw-r--r--examples/wayland/custom-extension/compositor/customextension.cpp36
-rw-r--r--examples/wayland/custom-extension/compositor/customextension.h61
-rw-r--r--examples/wayland/custom-extension/compositor/qml/main.qml37
-rw-r--r--examples/wayland/custom-extension/cpp-client/main.cpp20
-rw-r--r--examples/wayland/custom-extension/protocol/custom.xml51
-rw-r--r--examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc8
-rw-r--r--examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc8
-rw-r--r--examples/wayland/minimal-qml/main.cpp3
-rw-r--r--examples/wayland/multi-output/doc/src/multi-output.qdoc10
-rw-r--r--examples/wayland/multi-screen/doc/src/multi-screen.qdoc8
-rw-r--r--examples/wayland/pure-qml/doc/src/pure-qml.qdoc10
-rw-r--r--examples/wayland/pure-qml/main.cpp3
-rw-r--r--examples/wayland/qwindow-compositor/doc/src/qwindow-compositor.qdoc10
-rw-r--r--examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc8
16 files changed, 291 insertions, 42 deletions
diff --git a/examples/wayland/custom-extension/client-common/customextension.cpp b/examples/wayland/custom-extension/client-common/customextension.cpp
index 81f524d9d..41b4a30e9 100644
--- a/examples/wayland/custom-extension/client-common/customextension.cpp
+++ b/examples/wayland/custom-extension/client-common/customextension.cpp
@@ -109,6 +109,12 @@ void CustomExtension::registerWindow(QWindow *window)
sendWindowRegistration(window);
}
+CustomExtensionObject *CustomExtension::createCustomObject(const QString &color, const QString &text)
+{
+ auto *obj = create_local_object(color, text);
+ return new CustomExtensionObject(obj, text);
+}
+
void CustomExtension::sendBounce(QWindow *window, uint ms)
{
QtWayland::qt_example_extension::bounce(getWlSurface(window), ms);
@@ -152,4 +158,24 @@ void CustomExtension::example_extension_set_window_decoration(uint32_t state)
}
}
+CustomExtensionObject::CustomExtensionObject(struct ::qt_example_local_object *wl_object, const QString &text)
+ : QWaylandClientExtensionTemplate<CustomExtensionObject>(1)
+ , QtWayland::qt_example_local_object(wl_object)
+ , m_text(text)
+{
+
+}
+
+void CustomExtensionObject::example_local_object_clicked()
+{
+ qDebug() << "Object clicked:" << m_text;
+ emit clicked();
+}
+
+void CustomExtensionObject::setText(const QString &text)
+{
+ m_text = text;
+ set_text(text);
+}
+
QT_END_NAMESPACE
diff --git a/examples/wayland/custom-extension/client-common/customextension.h b/examples/wayland/custom-extension/client-common/customextension.h
index e76682f62..003a5a008 100644
--- a/examples/wayland/custom-extension/client-common/customextension.h
+++ b/examples/wayland/custom-extension/client-common/customextension.h
@@ -58,6 +58,8 @@
QT_BEGIN_NAMESPACE
+class CustomExtensionObject;
+
class CustomExtension : public QWaylandClientExtensionTemplate<CustomExtension>
, public QtWayland::qt_example_extension
{
@@ -66,6 +68,8 @@ public:
CustomExtension();
Q_INVOKABLE void registerWindow(QWindow *window);
+ CustomExtensionObject *createCustomObject(const QString &color, const QString &text);
+
public slots:
void sendBounce(QWindow *window, uint ms);
void sendSpin(QWindow *window, uint ms);
@@ -92,6 +96,36 @@ private:
bool m_activated;
};
+class CustomExtensionObject : public QWaylandClientExtensionTemplate<CustomExtensionObject>
+ , public QtWayland::qt_example_local_object
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+public:
+ CustomExtensionObject(struct ::qt_example_local_object *wl_object, const QString &text);
+
+ QString text() const
+ {
+ return m_text;
+ }
+
+protected:
+ void example_local_object_clicked() override;
+
+public slots:
+ void setText(const QString &text);
+
+
+signals:
+ void textChanged(const QString &text);
+ void clicked();
+
+private:
+ QString m_text;
+};
+
+
+
QT_END_NAMESPACE
#endif // CUSTOMEXTENSION_H
diff --git a/examples/wayland/custom-extension/compositor/customextension.cpp b/examples/wayland/custom-extension/compositor/customextension.cpp
index 8304e1afe..d9f637a12 100644
--- a/examples/wayland/custom-extension/compositor/customextension.cpp
+++ b/examples/wayland/custom-extension/compositor/customextension.cpp
@@ -123,3 +123,39 @@ void CustomExtension::example_extension_register_surface(QtWaylandServer::qt_exa
qDebug() << "server received new surface" << surface;
emit surfaceAdded(surface);
}
+
+
+void CustomExtension::example_extension_create_local_object(Resource *resource, uint32_t id, const QString &color, const QString &text)
+{
+ auto *obj = new CustomExtensionObject(color, text, resource->client(), id, 1);
+ qDebug() << "Object created" << text << color;
+ emit customObjectCreated(obj);
+}
+
+CustomExtensionObject::CustomExtensionObject(const QString &color, const QString &text, wl_client *client, int id, int version)
+ : QtWaylandServer::qt_example_local_object(client, id, version)
+ , m_color(color)
+ , m_text(text)
+{
+
+}
+
+void CustomExtensionObject::sendClicked()
+{
+ send_clicked();
+}
+
+void CustomExtensionObject::example_local_object_destroy_resource(QtWaylandServer::qt_example_local_object::Resource *resource)
+{
+ Q_UNUSED(resource);
+ qDebug() << "Object destroyed" << m_text << m_color;
+ emit resourceDestroyed();
+}
+
+
+void CustomExtensionObject::example_local_object_set_text(QtWaylandServer::qt_example_local_object::Resource *resource, const QString &text)
+{
+ Q_UNUSED(resource);
+ qDebug() << "Client changed text from" << m_text << "to" << text;
+ setText(text);
+}
diff --git a/examples/wayland/custom-extension/compositor/customextension.h b/examples/wayland/custom-extension/compositor/customextension.h
index b8f05b17c..de7df6acb 100644
--- a/examples/wayland/custom-extension/compositor/customextension.h
+++ b/examples/wayland/custom-extension/compositor/customextension.h
@@ -58,6 +58,8 @@
#include <QtWaylandCompositor/QWaylandCompositor>
#include "qwayland-server-custom.h"
+class CustomExtensionObject;
+
class CustomExtension : public QWaylandCompositorExtensionTemplate<CustomExtension>
, public QtWaylandServer::qt_example_extension
{
@@ -71,6 +73,8 @@ signals:
void bounce(QWaylandSurface *surface, uint ms);
void spin(QWaylandSurface *surface, uint ms);
+ void customObjectCreated(CustomExtensionObject *obj);
+
public slots:
void setFontSize(QWaylandSurface *surface, uint pixelSize);
void showDecorations(QWaylandClient *client, bool);
@@ -80,6 +84,63 @@ protected:
void example_extension_bounce(Resource *resource, wl_resource *surface, uint32_t duration) override;
void example_extension_spin(Resource *resource, wl_resource *surface, uint32_t duration) override;
void example_extension_register_surface(Resource *resource, wl_resource *surface) override;
+
+ void example_extension_create_local_object(Resource *resource, uint32_t id, const QString &color, const QString &text) override;
+};
+
+
+class CustomExtensionObject : public QWaylandCompositorExtensionTemplate<CustomExtensionObject>
+ , public QtWaylandServer::qt_example_local_object
+{
+ Q_OBJECT
+ Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+public:
+ CustomExtensionObject(const QString &color, const QString &text, struct ::wl_client *client, int id, int version);
+
+ QString color() const
+ {
+ return m_color;
+ }
+
+ QString text() const
+ {
+ return m_text;
+ }
+
+public slots:
+ void setColor(const QString &color)
+ {
+ if (m_color == color)
+ return;
+
+ m_color = color;
+ emit colorChanged(m_color);
+ }
+
+ void setText(QString text)
+ {
+ if (m_text == text)
+ return;
+
+ m_text = text;
+ emit textChanged(m_text);
+ }
+ void sendClicked();
+
+signals:
+ void colorChanged(const QString &color);
+ void resourceDestroyed();
+
+ void textChanged(QString text);
+
+protected:
+ void example_local_object_destroy_resource(Resource *resource) override;
+ void example_local_object_set_text(Resource *resource, const QString &text) override;
+
+private:
+ QString m_color;
+ QString m_text;
};
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(CustomExtension)
diff --git a/examples/wayland/custom-extension/compositor/qml/main.qml b/examples/wayland/custom-extension/compositor/qml/main.qml
index 6739a5c9c..a7d762276 100644
--- a/examples/wayland/custom-extension/compositor/qml/main.qml
+++ b/examples/wayland/custom-extension/compositor/qml/main.qml
@@ -139,6 +139,40 @@ WaylandCompositor {
}
}
+
+ Component {
+ id: customObjectComponent
+ Rectangle {
+ id: customItem
+ property QtObject obj
+ property alias text: label.text
+
+ width: 100
+ height: 100
+ radius: width/2
+ x: Math.random() * (defaultOutput.surfaceArea.width - 100)
+ y: Math.random() * (defaultOutput.surfaceArea.height - 100)
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "?"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: obj.sendClicked()
+ }
+
+ Connections {
+ target: obj
+ onResourceDestroyed: {
+ customItem.destroy()
+ }
+ }
+ }
+ }
+
WlShell {
id: defaultShell
onWlShellSurfaceCreated: {
@@ -168,6 +202,9 @@ WaylandCompositor {
var item = itemForSurface(surface)
item.doSpin(ms)
}
+ onCustomObjectCreated: {
+ var item = customObjectComponent.createObject(defaultOutput.surfaceArea, { "color": obj.color, "text": obj.text, "obj": obj } );
+ }
}
function setDecorations(shown) {
diff --git a/examples/wayland/custom-extension/cpp-client/main.cpp b/examples/wayland/custom-extension/cpp-client/main.cpp
index 54c0bcc0b..da6230cc7 100644
--- a/examples/wayland/custom-extension/cpp-client/main.cpp
+++ b/examples/wayland/custom-extension/cpp-client/main.cpp
@@ -70,6 +70,7 @@ public:
, rect1(50, 50, 100, 100)
, rect2(50, 200, 100, 100)
, rect3(50, 350, 100, 100)
+ , rect4(200,350, 100, 100)
{
m_extension->registerWindow(this);
connect(m_extension, &CustomExtension::fontSize, this, &TestWindow::handleSetFontSize);
@@ -101,6 +102,14 @@ public slots:
w->show();
}
+ CustomExtensionObject *newObject()
+ {
+ m_objectCount++;
+ QColor col = QColor::fromHsv(0, 511/(m_objectCount+1), 255);
+
+ return m_extension->createCustomObject(col.name(), QString::number(m_objectCount));
+ }
+
void handleSetFontSize(QWindow *w, uint pixelSize)
{
if (w == this) {
@@ -121,6 +130,9 @@ protected:
p.drawText(rect2, Qt::TextWordWrap, "Press here to send bounce request.");
p.fillRect(rect3, QColor("#7EA"));
p.drawText(rect3, Qt::TextWordWrap, "Create new window.");
+ p.fillRect(rect4, QColor("#7EABA6"));
+ p.drawText(rect4, Qt::TextWordWrap, "Create custom object.");
+
}
void mousePressEvent(QMouseEvent *ev) override
@@ -131,6 +143,8 @@ protected:
doBounce();
else if (rect3.contains(ev->pos()))
newWindow();
+ else if (rect4.contains(ev->pos()))
+ newObject();
}
private:
@@ -138,9 +152,15 @@ private:
QRect rect1;
QRect rect2;
QRect rect3;
+ QRect rect4;
QFont m_font;
+ static int m_objectCount;
+ static int m_hue;
};
+int TestWindow::m_objectCount = 0;
+int TestWindow::m_hue;
+
int main (int argc, char **argv)
{
QGuiApplication app(argc, argv);
diff --git a/examples/wayland/custom-extension/protocol/custom.xml b/examples/wayland/custom-extension/protocol/custom.xml
index 9bbe50d6e..2e9a84260 100644
--- a/examples/wayland/custom-extension/protocol/custom.xml
+++ b/examples/wayland/custom-extension/protocol/custom.xml
@@ -40,9 +40,9 @@
<interface name="qt_example_extension" version="1">
- <description summary="example extension for surfaces">
- This example shows how to add extra functionality to the Wayland
- through an extension.
+ <description summary="Example Wayland extension">
+ This example shows how to add extra functionality to Wayland
+ through an extension. This is the global object of the extension.
</description>
<request name="register_surface">
@@ -85,23 +85,52 @@
<arg name="pixel_size" type="uint"/>
</event>
+ <enum name="decoration_state">
+ <description summary="window decoration state">
+ Describes whether window decorations should be shown.
+ </description>
+ <entry name="hidden" value="0" summary="Decorations are not shown"/>
+ <entry name="shown" value="1" summary="Decorations are shown"/>
+ </enum>
+
<event name="set_window_decoration">
<description summary="turn window decoration on/off">
Ask the client to turn window decoration on/off on all surfaces.
</description>
- <enum name="decoration_state">
- <description summary="window decoration state">
- Describes whether window decorations should be shown.
- </description>
- <entry name="hidden" value="0" summary="Decorations are not shown"/>
- <entry name="shown" value="1" summary="Decorations are shown"/>
- </enum>
-
<arg name="state" type="uint"/>
</event>
+ <request name="create_local_object">
+ <description summary="Create a sily object">
+ Create a new object that should be visualized by the compositor
+ </description>
+ <arg name="id" type="new_id" interface="qt_example_local_object"/>
+ <arg name="color" type = "string"/>
+ <arg name="text" type = "string"/>
+ </request>
</interface>
+ <interface name="qt_example_local_object" version="1">
+ <description summary="An object created on the client side">
+ This object should have a visual representation in the compositor.
+ </description>
+
+ <request name="set_text">
+ <description summary="Change the text">
+ Tell the compositor that the object's text is changed
+ </description>
+ <arg name="text" type="string"/>
+ </request>
+
+ <event name="clicked">
+ <description summary="The object was clicked">
+ Notification to the client that the user clicked the representation of
+ the object in the compositor.
+ </description>
+
+ </event>
+
+ </interface>
</protocol>
diff --git a/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc b/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc
index ae37c8950..f25eb8559 100644
--- a/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc
+++ b/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc b/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc
index 24a5f6522..5a435f3fc 100644
--- a/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc
+++ b/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/minimal-qml/main.cpp b/examples/wayland/minimal-qml/main.cpp
index 435b4e3f1..60378e860 100644
--- a/examples/wayland/minimal-qml/main.cpp
+++ b/examples/wayland/minimal-qml/main.cpp
@@ -57,6 +57,9 @@
int main(int argc, char *argv[])
{
+ // ShareOpenGLContexts is needed for using the threaded renderer
+ // on Nvidia EGLStreams
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QGuiApplication app(argc, argv);
QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml"));
diff --git a/examples/wayland/multi-output/doc/src/multi-output.qdoc b/examples/wayland/multi-output/doc/src/multi-output.qdoc
index 32b9aa696..233b29ba3 100644
--- a/examples/wayland/multi-output/doc/src/multi-output.qdoc
+++ b/examples/wayland/multi-output/doc/src/multi-output.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/multi-screen/doc/src/multi-screen.qdoc b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc
index 20d3912ca..cd60213b5 100644
--- a/examples/wayland/multi-screen/doc/src/multi-screen.qdoc
+++ b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/pure-qml/doc/src/pure-qml.qdoc b/examples/wayland/pure-qml/doc/src/pure-qml.qdoc
index 18ca73ec5..06a938bed 100644
--- a/examples/wayland/pure-qml/doc/src/pure-qml.qdoc
+++ b/examples/wayland/pure-qml/doc/src/pure-qml.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/pure-qml/main.cpp b/examples/wayland/pure-qml/main.cpp
index 304b13c4a..38ed5c939 100644
--- a/examples/wayland/pure-qml/main.cpp
+++ b/examples/wayland/pure-qml/main.cpp
@@ -57,6 +57,9 @@
int main(int argc, char *argv[])
{
+ // ShareOpenGLContexts is needed for using the threaded renderer
+ // on Nvidia EGLStreams
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QGuiApplication app(argc, argv);
QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml"));
diff --git a/examples/wayland/qwindow-compositor/doc/src/qwindow-compositor.qdoc b/examples/wayland/qwindow-compositor/doc/src/qwindow-compositor.qdoc
index d268aca43..c4f408c5a 100644
--- a/examples/wayland/qwindow-compositor/doc/src/qwindow-compositor.qdoc
+++ b/examples/wayland/qwindow-compositor/doc/src/qwindow-compositor.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc
index cbb720fae..3ab0b91f5 100644
--- a/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc
+++ b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -11,8 +11,8 @@
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
@@ -20,7 +20,7 @@
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/