KCoreAddons

kcoreaddonsplugin.cpp
1/*
2 SPDX-FileCopyrightText: 2014 Bhushan Shah <bhush94@gmail.com>
3 SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org>
4 SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include <QQmlEngine>
10#include <QQmlExtensionPlugin>
11
12#include <KAboutData>
13
14class KCoreAddonsPlugin : public QQmlExtensionPlugin
15{
17 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
18
19public:
20 void registerTypes(const char *uri) override
21 {
22 qmlRegisterSingletonType(uri, 1, 0, "AboutData", [](QQmlEngine *engine, QJSEngine *) -> QJSValue {
24 });
25 }
26};
27
28#include "kcoreaddonsplugin.moc"
static KAboutData applicationData()
Returns the KAboutData for the application.
QJSValue toScriptValue(const T &value)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:00:49 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.