diff options
Diffstat (limited to 'tests/auto/qml/qmlplugindump/data')
36 files changed, 944 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml new file mode 100644 index 0000000000..b47d2e98f4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int test: 0 +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir new file mode 100644 index 0000000000..c08e74db2e --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir @@ -0,0 +1,3 @@ +module dumper.CompositeSingleton +singleton Singleton 1.0 Singleton.qml +depends QtQuick 2.0 diff --git a/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Composite.qml b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Composite.qml new file mode 100644 index 0000000000..b1055b6992 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Composite.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int test: 0 +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Singleton.qml b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Singleton.qml new file mode 100644 index 0000000000..e81b2b6cb5 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/Singleton.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property Composite test: Composite {} +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/qmldir new file mode 100644 index 0000000000..5a9cb1bd96 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeWithinSingleton/qmldir @@ -0,0 +1,4 @@ +module dumper.CompositeWithinSingleton +singleton Singleton 1.0 Singleton.qml +Composite 1.0 Composite.qml +depends QtQuick 2.0 diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.cpp new file mode 100644 index 0000000000..689ea4aa53 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "dummy.h" + +Dummy::Dummy(QObject *parent): + QObject(parent) +{ +} + +Dummy::~Dummy() +{ +} + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.h b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.h new file mode 100644 index 0000000000..7011f72523 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DUMMY_H +#define DUMMY_H + +#include <QObject> + +class Dummy : public QObject +{ + Q_OBJECT + +public: + Dummy(QObject *parent = nullptr); + ~Dummy(); +}; + +#endif // DUMMY_H + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.pro b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.pro new file mode 100644 index 0000000000..9f5bc927b4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy.pro @@ -0,0 +1,23 @@ +TEMPLATE = lib +TARGET = Dummy +QT += qml +CONFIG += qt plugin + +CONFIG -= debug_and_release_target +!build_pass:qtConfig(debug_and_release): CONFIG += release + +TARGET = $$qtLibraryTarget($$TARGET) + +SOURCES += \ + dummy_plugin.cpp \ + dummy.cpp + +HEADERS += \ + dummy_plugin.h \ + dummy.h + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + cp.files = qmldir plugins.qmltypes + cp.path = $$OUT_PWD + COPIES += cp +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.cpp new file mode 100644 index 0000000000..763604daf0 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.cpp @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "dummy_plugin.h" +#include "dummy.h" + +#include <qqml.h> + +void DummyPlugin::registerTypes(const char *uri) +{ + // @uri dumper.dummy + qmlRegisterType<Dummy>(uri, 1, 0, "Dummy"); +} + + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.h b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.h new file mode 100644 index 0000000000..86e80e6a08 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/dummy_plugin.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DUMMY_PLUGIN_H +#define DUMMY_PLUGIN_H + +#include <QQmlExtensionPlugin> + +class DummyPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + +public: + void registerTypes(const char *uri); +}; + +#endif // DUMMY_PLUGIN_H + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/plugins.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/plugins.qmltypes new file mode 100644 index 0000000000..da0f2f24e4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/plugins.qmltypes @@ -0,0 +1,17 @@ +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 -nonrelocatable -noforceqtquick dumper.Dummy 1.0 .' + +Module { + dependencies: [] + Component { + name: "Dummy" + prototype: "QObject" + exports: ["dumper.Dummy/Dummy 1.0"] + exportMetaObjectRevisions: [0] + } +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Dummy/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/qmldir new file mode 100644 index 0000000000..7d4107c040 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Dummy/qmldir @@ -0,0 +1,3 @@ +module dumper.Dummy +plugin Dummy + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/extendedtype.pro b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/extendedtype.pro new file mode 100644 index 0000000000..24243aa622 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/extendedtype.pro @@ -0,0 +1,22 @@ +TEMPLATE = lib +TARGET = ExtendedType +QT += qml +CONFIG += qt plugin + +CONFIG -= debug_and_release_target +!build_pass:qtConfig(debug_and_release): CONFIG += release + +TARGET = $$qtLibraryTarget($$TARGET) + +SOURCES += \ + plugin.cpp + +HEADERS += \ + plugin.h \ + types.h + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + cp.files = qmldir plugins.qmltypes + cp.path = $$OUT_PWD + COPIES += cp +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.cpp b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.cpp new file mode 100644 index 0000000000..423fbc1f4c --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.cpp @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "plugin.h" +#include "types.h" + +#include <qqml.h> + +void Plugin::registerTypes(const char *uri) +{ + // @uri dumper.ExtendedType + qmlRegisterType<Type>(uri, 1, 0, "Type"); + qmlRegisterExtendedType<Type, ExtendedType>(uri, 1, 1, "Type"); + qmlRegisterType<DerivedType2>(uri, 1, 1, "DerivedType"); +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.h b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.h new file mode 100644 index 0000000000..b677fe2940 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugin.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PLUGIN_H +#define PLUGIN_H + +#include <QQmlExtensionPlugin> + +class Plugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + +public: + void registerTypes(const char *uri); +}; + +#endif // PLUGIN_H diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugins.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugins.qmltypes new file mode 100644 index 0000000000..d84eb0011a --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/plugins.qmltypes @@ -0,0 +1,35 @@ +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 -nonrelocatable -noforceqtquick dumper.ExtendedType 1.1 .' + +Module { + dependencies: [] + Component { + name: "DerivedType1" + prototype: "Type" + Property { name: "m_exendedProperty2"; type: "int" } + } + Component { + name: "DerivedType2" + prototype: "DerivedType1" + exports: ["dumper.ExtendedType/DerivedType 1.1"] + exportMetaObjectRevisions: [0] + } + Component { + name: "Type" + defaultProperty: "data" + prototype: "QObject" + exports: [ + "dumper.ExtendedType/Type 1.0", + "dumper.ExtendedType/Type 1.1" + ] + exportMetaObjectRevisions: [0, 101] + Property { name: "baseProperty"; type: "int" } + Property { name: "extendedProperty"; revision: 101; type: "int" } + Property { name: "data"; revision: 101; type: "QObject"; isList: true; isReadonly: true } + } +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/qmldir new file mode 100644 index 0000000000..6693f403d9 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/qmldir @@ -0,0 +1,3 @@ +module dumper.ExtendedType +plugin ExtendedType + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h new file mode 100644 index 0000000000..dfba55a094 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef TYPES_H +#define TYPES_H + +#include <QObject> +#include <QQmlListProperty> + +class Type : public QObject +{ + Q_OBJECT + Q_PROPERTY(int baseProperty MEMBER m_baseProperty) + +public: + Type(QObject *parent = nullptr) + : QObject(parent) {} + +private: + int m_baseProperty; +}; + +class ExtendedType : public QObject +{ + Q_OBJECT + Q_PROPERTY(int extendedProperty MEMBER m_extendedProperty) + Q_PROPERTY(QQmlListProperty<QObject> data READ data) + Q_CLASSINFO("DefaultProperty", "data") + +public: + ExtendedType(QObject *parent = nullptr) + : QObject(parent) {} + QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, m_data); } + +private: + QList<QObject *> m_data; + int m_extendedProperty; +}; + +class DerivedType1 : public Type +{ + Q_OBJECT + Q_PROPERTY(int m_exendedProperty2 MEMBER m_extendedProperty2) + +public: + DerivedType1(QObject *parent = nullptr) + : Type(parent) {} + +private: + int m_extendedProperty2; +}; + +class DerivedType2 : public DerivedType1 +{ + Q_OBJECT +public: + DerivedType2(QObject *parent = nullptr) + : DerivedType1(parent) {} +}; + +#endif // TYPES_H diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/CompositeImports.qml b/tests/auto/qml/qmlplugindump/data/dumper/Imports/CompositeImports.qml new file mode 100644 index 0000000000..b1055b6992 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/CompositeImports.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property int test: 0 +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.cpp new file mode 100644 index 0000000000..a923fade2a --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "imports.h" + +Imports::Imports(QObject *parent): + QObject(parent) +{ +} + +Imports::~Imports() +{ +} + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.h b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.h new file mode 100644 index 0000000000..d2b9036e4d --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef IMPORTS_H +#define IMPORTS_H + +#include <QObject> + +class Imports : public QObject +{ + Q_OBJECT + +public: + Imports(QObject *parent = nullptr); + ~Imports(); +}; + +#endif // IMPORTS_H + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro new file mode 100644 index 0000000000..d20ea967ea --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports.pro @@ -0,0 +1,24 @@ +TEMPLATE = lib +TARGET = Imports +QT += qml +CONFIG += qt plugin + +CONFIG -= debug_and_release_target +!build_pass:qtConfig(debug_and_release): CONFIG += release + +TARGET = $$qtLibraryTarget($$TARGET) + +SOURCES += \ + imports_plugin.cpp \ + imports.cpp + +HEADERS += \ + imports_plugin.h \ + imports.h + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + cp.files = qmldir plugins.qmltypes CompositeImports.qml + cp.path = $$OUT_PWD + COPIES += cp +} + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.cpp new file mode 100644 index 0000000000..183ba56ac1 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.cpp @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "imports_plugin.h" +#include "imports.h" + +#include <qqml.h> + +void ImportsPlugin::registerTypes(const char *uri) +{ + // @uri dumper.imports + qmlRegisterType<Imports>(uri, 1, 0, "Imports"); +} + + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.h b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.h new file mode 100644 index 0000000000..fd09584d47 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/imports_plugin.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef IMPORTS_PLUGIN_H +#define IMPORTS_PLUGIN_H + +#include <QQmlExtensionPlugin> + +class ImportsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + +public: + void registerTypes(const char *uri); +}; + +#endif // IMPORTS_PLUGIN_H + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes new file mode 100644 index 0000000000..937dd60a9e --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/plugins.qmltypes @@ -0,0 +1,17 @@ +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 -nonrelocatable -noforceqtquick dumper.Imports 1.0 .' + +Module { + dependencies: ["QtQuick 2.0"] + Component { + name: "Imports" + prototype: "QObject" + exports: ["dumper.Imports/Imports 1.0"] + exportMetaObjectRevisions: [0] + } +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir new file mode 100644 index 0000000000..c9058a7f95 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Imports/qmldir @@ -0,0 +1,3 @@ +module dumper.Imports +plugin Imports +CompositeImports 1.0 CompositeImports.qml diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Singleton/CompositeSingleton.qml b/tests/auto/qml/qmlplugindump/data/dumper/Singleton/CompositeSingleton.qml new file mode 100644 index 0000000000..b47d2e98f4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Singleton/CompositeSingleton.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int test: 0 +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Singleton/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/Singleton/qmldir new file mode 100644 index 0000000000..6ed6d6f1d4 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Singleton/qmldir @@ -0,0 +1,2 @@ +module dumper.Singleton +singleton CompositeSingleton 1.0 CompositeSingleton.qml diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Versions/plugin.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/Versions/plugin.qmltypes new file mode 100644 index 0000000000..3a33590139 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/plugin.qmltypes @@ -0,0 +1,23 @@ +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 -nonrelocatable -noforceqtquick dumper.Versions 1.1 .' + +Module { + dependencies: [] + Component { + name: "Versions" + prototype: "QObject" + exports: [ + "dumper.Versions/Versions 1.0", + "dumper.Versions/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/auto/qml/qmlplugindump/data/dumper/Versions/plugins.qmltypes b/tests/auto/qml/qmlplugindump/data/dumper/Versions/plugins.qmltypes new file mode 100644 index 0000000000..3a33590139 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/plugins.qmltypes @@ -0,0 +1,23 @@ +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 -nonrelocatable -noforceqtquick dumper.Versions 1.1 .' + +Module { + dependencies: [] + Component { + name: "Versions" + prototype: "QObject" + exports: [ + "dumper.Versions/Versions 1.0", + "dumper.Versions/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/auto/qml/qmlplugindump/data/dumper/Versions/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/Versions/qmldir new file mode 100644 index 0000000000..a47a2a4573 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/qmldir @@ -0,0 +1,3 @@ +module dumper.Versions +plugin Versions + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.cpp new file mode 100644 index 0000000000..3422275d78 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "versions.h" + +Versions::Versions(QObject *parent): + QObject(parent) +{ +} + +Versions::~Versions() +{ +} + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.h b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.h new file mode 100644 index 0000000000..ba88f478ca --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VERSIONS_H +#define VERSIONS_H + +#include <QObject> + +class Versions : public QObject +{ + 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(QObject *parent = nullptr); + ~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/auto/qml/qmlplugindump/data/dumper/Versions/versions.pro b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.pro new file mode 100644 index 0000000000..6bbb9e556b --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions.pro @@ -0,0 +1,23 @@ +TEMPLATE = lib +TARGET = Versions +QT += qml +CONFIG += qt plugin + +CONFIG -= debug_and_release_target +!build_pass:qtConfig(debug_and_release): CONFIG += release + +TARGET = $$qtLibraryTarget($$TARGET) + +SOURCES += \ + versions_plugin.cpp \ + versions.cpp + +HEADERS += \ + versions_plugin.h \ + versions.h + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + cpqmldir.files = qmldir plugins.qmltypes + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir +} diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.cpp b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.cpp new file mode 100644 index 0000000000..4bd290aff1 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "versions_plugin.h" +#include "versions.h" + +#include <qqml.h> + +void VersionsPlugin::registerTypes(const char *uri) +{ + // @uri dumper.versions + qmlRegisterType<Versions>(uri, 1, 0, "Versions"); + qmlRegisterType<Versions, 1>(uri, 1, 1, "Versions"); +} + + diff --git a/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.h b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.h new file mode 100644 index 0000000000..4ba68a8125 --- /dev/null +++ b/tests/auto/qml/qmlplugindump/data/dumper/Versions/versions_plugin.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VERSIONS_PLUGIN_H +#define VERSIONS_PLUGIN_H + +#include <QQmlExtensionPlugin> + +class VersionsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + +public: + void registerTypes(const char *uri); +}; + +#endif // VERSIONS_PLUGIN_H + |