diff options
Diffstat (limited to 'tests/manual/qmlplugindump/tests/dumper/Versions')
7 files changed, 269 insertions, 0 deletions
diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/plugin.qmltypes b/tests/manual/qmlplugindump/tests/dumper/Versions/plugin.qmltypes new file mode 100644 index 0000000000..0e09c2cfc7 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/plugin.qmltypes @@ -0,0 +1,21 @@ +import QtQuick.tooling 1.2 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump tests.dumper.versions 1.1 .' + +Module { + dependencies: ["QtQuick 2.0"] + Component { + name: "Versions" + defaultProperty: "data" + prototype: "QQuickItem" + exports: ["Versions 1.0", "Versions 1.1"] + exportMetaObjectRevisions: [0, 1] + Property { name: "foo"; type: "int" } + Property { name: "bar"; revision: 1; type: "int" } + Property { name: "baz"; revision: 2; type: "int" } + } +} diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/qmldir b/tests/manual/qmlplugindump/tests/dumper/Versions/qmldir new file mode 100644 index 0000000000..382225f517 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/qmldir @@ -0,0 +1,3 @@ +module tests.dumper.Versions +plugin Versions + diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.cpp b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.cpp new file mode 100644 index 0000000000..ac2698aa53 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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 "versions.h" + +Versions::Versions(QQuickItem *parent): + QQuickItem(parent) +{ + // By default, QQuickItem does not draw anything. If you subclass + // QQuickItem to create a visual item, you will need to uncomment the + // following line and re-implement updatePaintNode() + + // setFlag(ItemHasContents, true); +} + +Versions::~Versions() +{ +} + diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.h b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.h new file mode 100644 index 0000000000..412f39f5d4 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.h @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef VERSIONS_H +#define VERSIONS_H + +#include <QQuickItem> + +class Versions : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(int foo READ foo WRITE setFoo NOTIFY fooChanged) + Q_PROPERTY(int bar READ bar WRITE setBar NOTIFY barChanged REVISION 1) + Q_PROPERTY(int baz READ baz WRITE setBaz NOTIFY bazChanged REVISION 2) + +public: + Versions(QQuickItem *parent = 0); + ~Versions(); + int foo() const { return m_foo; } + void setFoo(int value) { m_foo = value; } + int bar() const { return m_bar; } + void setBar(int value) { m_bar = value; } + int baz() const { return m_baz; } + void setBaz(int value) { m_baz = value; } +signals: + void fooChanged(); + void barChanged(); + void bazChanged(); +private: + int m_foo; + int m_bar; + int m_baz; +}; + +#endif // VERSIONS_H + diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro new file mode 100644 index 0000000000..951f886368 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro @@ -0,0 +1,35 @@ +TEMPLATE = lib +TARGET = Versions +QT += qml quick +CONFIG += qt plugin + +TARGET = $$qtLibraryTarget($$TARGET) +uri = tests.dumper.Versions + +# Input +SOURCES += \ + versions_plugin.cpp \ + versions.cpp + +HEADERS += \ + versions_plugin.h \ + versions.h + +DISTFILES = qmldir + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + copy_qmldir.target = $$OUT_PWD/qmldir + copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir + copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" + QMAKE_EXTRA_TARGETS += copy_qmldir + PRE_TARGETDEPS += $$copy_qmldir.target +} + +qmldir.files = qmldir +unix { + installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) + qmldir.path = $$installPath + target.path = $$installPath + INSTALLS += target qmldir +} + diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.cpp b/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.cpp new file mode 100644 index 0000000000..33f59b7f78 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** 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 "versions_plugin.h" +#include "versions.h" + +#include <qqml.h> + +void VersionsPlugin::registerTypes(const char *uri) +{ + // @uri tests.dumper.versions + qmlRegisterType<Versions>(uri, 1, 0, "Versions"); + qmlRegisterType<Versions, 1>(uri, 1, 1, "Versions"); +} + + diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.h b/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.h new file mode 100644 index 0000000000..8466f6ec63 --- /dev/null +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions_plugin.h @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef VERSIONS_PLUGIN_H +#define VERSIONS_PLUGIN_H + +#include <QQmlExtensionPlugin> + +class VersionsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri); +}; + +#endif // VERSIONS_PLUGIN_H + |