aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton')
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/.prev_CMakeLists.txt27
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/CMakeLists.txt5
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/plugin.cpp34
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/qmldir2
4 files changed, 10 insertions, 58 deletions
diff --git a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/.prev_CMakeLists.txt b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/.prev_CMakeLists.txt
deleted file mode 100644
index e773de357a..0000000000
--- a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# Generated from moduleWithQmlSingleton.pro.
-
-#####################################################################
-## moduleWithQmlSingleton Generic Library:
-#####################################################################
-
-qt_internal_add_cmake_library(moduleWithQmlSingleton
- MODULE
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../imports/org/qtproject/ModuleWithQmlSingleton"
- SOURCES
- plugin.cpp
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::Qml
- Qt::QmlPrivate
-)
-
-#### Keys ignored in scope 1:.:.:moduleWithQmlSingleton.pro:<TRUE>:
-# COPIES = "importfiles" "subfiles"
-# IMPORT_FILES = "qmldir" "MySingleton.qml" "MySingleton2.qml"
-# TEMPLATE = "lib"
-# subfiles.files = "internal/InternalType.qml"
-# subfiles.path = "$$DESTDIR/internal"
-
-qt_autogen_tools_initial_setup(moduleWithQmlSingleton)
diff --git a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/CMakeLists.txt b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/CMakeLists.txt
index d96bff4a57..7c11cc392e 100644
--- a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/CMakeLists.txt
+++ b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from moduleWithQmlSingleton.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_cmake_library(moduleWithQmlSingleton
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../imports/org/qtproject/ModuleWithQmlSingleton"
SOURCES
plugin.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::GuiPrivate
diff --git a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/plugin.cpp b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/plugin.cpp
index 6329927c34..5ffd28dcbb 100644
--- a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/plugin.cpp
+++ b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/plugin.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 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$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqml.h>
@@ -39,11 +14,10 @@ class MyPlugin : public QQmlExtensionPlugin
public:
MyPlugin() {}
- void registerTypes(const char *uri)
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == "org.qtproject.ModuleWithQmlSingleton");
- qmlRegisterSingletonType(baseUrl().resolved(QUrl("ModuleWithQmlSingleton/MySingleton.qml")), uri, 1, 0, "MySingleton");
- qmlRegisterSingletonType(baseUrl().resolved(QUrl("ModuleWithQmlSingleton/MySingleton2.qml")), uri, 1, 0, "MySingleton2");
+ qmlRegisterModule(uri, 1, 0);
}
};
diff --git a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/qmldir b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/qmldir
index 3483f80ab1..e3e99d9f28 100644
--- a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/qmldir
+++ b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/qmldir
@@ -1,2 +1,4 @@
module org.qtproject.ModuleWithQmlSingleton
plugin moduleWithQmlSingleton
+singleton MySingleton 1.0 MySingleton.qml
+singleton MySingleton2 1.0 MySingleton2.qml