// SPDX-FileCopyrightText: 2022 Devin Lin // SPDX-FileCopyrightText: 2022 Carl Schwan // SPDX-License-Identifier: LGPL-2.0-or-later #include #include #include "nameutils.h" class ComponentsLabsPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: ComponentsLabsPlugin() = default; ~ComponentsLabsPlugin() = default; void registerTypes(const char *uri) override { qmlRegisterModule(uri, 1, 0); qmlRegisterSingletonType(uri, 1, 0, "NameUtils", [](QQmlEngine*, QJSEngine*) -> QObject* { return new NameUtils; }); } }; #include "componentslabsplugin.moc"