diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml | 2 | ||||
-rw-r--r-- | examples/websockets/qmlwebsocketserver/qml/qmlwebsocketserver/main.qml | 2 | ||||
-rw-r--r-- | src/imports/qmlwebsockets_compat/qmldir | 2 | ||||
-rw-r--r-- | tests/auto/auto.pro | 4 | ||||
-rw-r--r-- | tests/auto/qml/qml.pro | 3 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets/qmlwebsockets.pro | 9 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.cpp | 35 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.qml | 52 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets_compat/qmlwebsockets_compat.pro | 9 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.cpp | 35 | ||||
-rw-r--r-- | tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.qml | 52 |
12 files changed, 202 insertions, 4 deletions
@@ -56,4 +56,3 @@ include tests/auto/cmake/build lib/ mkspecs/ -qml/ diff --git a/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml b/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml index 6d2749c..35d64e0 100644 --- a/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml +++ b/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml @@ -31,7 +31,7 @@ ** ****************************************************************************/ import QtQuick 2.0 -import Qt.WebSockets 1.0 +import QtWebSockets 1.0 Rectangle { width: 360 diff --git a/examples/websockets/qmlwebsocketserver/qml/qmlwebsocketserver/main.qml b/examples/websockets/qmlwebsocketserver/qml/qmlwebsocketserver/main.qml index 6c3433f..c0178ba 100644 --- a/examples/websockets/qmlwebsocketserver/qml/qmlwebsocketserver/main.qml +++ b/examples/websockets/qmlwebsocketserver/qml/qmlwebsocketserver/main.qml @@ -32,7 +32,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.WebSockets 1.0 +import QtWebSockets 1.0 Rectangle { width: 360 diff --git a/src/imports/qmlwebsockets_compat/qmldir b/src/imports/qmlwebsockets_compat/qmldir index 8541103..eca44f0 100644 --- a/src/imports/qmlwebsockets_compat/qmldir +++ b/src/imports/qmlwebsockets_compat/qmldir @@ -1,4 +1,4 @@ module Qt.WebSockets -plugin ../../QtWebSockets/declarative_qmlwebsockets +plugin declarative_qmlwebsockets ../../QtWebSockets/ classname QtWebSocketsDeclarativeModule typeinfo ../../QtWebSockets/plugins.qmltypes diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 634e44b..d83cc1f 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,3 +1,7 @@ TEMPLATE = subdirs SUBDIRS += websockets + +qtHaveModule(quick) { + SUBDIRS += qml +} diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro new file mode 100644 index 0000000..24941ad --- /dev/null +++ b/tests/auto/qml/qml.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs + +SUBDIRS += qmlwebsockets qmlwebsockets_compat diff --git a/tests/auto/qml/qmlwebsockets/qmlwebsockets.pro b/tests/auto/qml/qmlwebsockets/qmlwebsockets.pro new file mode 100644 index 0000000..9405f37 --- /dev/null +++ b/tests/auto/qml/qmlwebsockets/qmlwebsockets.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +TARGET = tst_qmlwebsockets +CONFIG += qmltestcase +CONFIG += console +SOURCES += tst_qmlwebsockets.cpp + +importFiles.path = . +DEPLOYMENT += importFiles + diff --git a/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.cpp b/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.cpp new file mode 100644 index 0000000..c230bf5 --- /dev/null +++ b/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** 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. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtQuickTest/quicktest.h> +QUICK_TEST_MAIN(qmlwebsockets) diff --git a/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.qml b/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.qml new file mode 100644 index 0000000..6018037 --- /dev/null +++ b/tests/auto/qml/qmlwebsockets/tst_qmlwebsockets.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** 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. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.5 +import QtWebSockets 1.0 + +Rectangle { + width: 360 + height: 360 + + function appendMessage(message) { + messageBox.text += "\n" + message + } + + WebSocketServer { + id: server + } + + WebSocket { + id: socket + } +} diff --git a/tests/auto/qml/qmlwebsockets_compat/qmlwebsockets_compat.pro b/tests/auto/qml/qmlwebsockets_compat/qmlwebsockets_compat.pro new file mode 100644 index 0000000..104e6de --- /dev/null +++ b/tests/auto/qml/qmlwebsockets_compat/qmlwebsockets_compat.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +TARGET = tst_qmlwebsockets_compat +CONFIG += qmltestcase +CONFIG += console +SOURCES += tst_qmlwebsockets_compat.cpp + +importFiles.path = . +DEPLOYMENT += importFiles + diff --git a/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.cpp b/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.cpp new file mode 100644 index 0000000..0ce5bce --- /dev/null +++ b/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** 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. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtQuickTest/quicktest.h> +QUICK_TEST_MAIN(qmlwebsockets_compat) diff --git a/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.qml b/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.qml new file mode 100644 index 0000000..fa2a992 --- /dev/null +++ b/tests/auto/qml/qmlwebsockets_compat/tst_qmlwebsockets_compat.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** 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. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.5 +import Qt.WebSockets 1.0 + +Rectangle { + width: 360 + height: 360 + + function appendMessage(message) { + messageBox.text += "\n" + message + } + + WebSocketServer { + id: server + } + + WebSocket { + id: socket + } +} |