File indexing completed on 2024-05-12 03:54:48
0001 // SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de> 0002 // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 0004 #include "kpluginfactory.h" 0005 0006 class StaticSimplePluginClass : public QObject 0007 { 0008 Q_OBJECT 0009 0010 public: 0011 // Next to the assertion below, ensure that we have no ambiguity! 0012 explicit StaticSimplePluginClass(QObject *parent, const KPluginMetaData &data = {}) 0013 : QObject(parent) 0014 { 0015 // We have added a default arg, but KPluginFactory should still provide the valid metadata instead of the default one 0016 Q_ASSERT(data.isValid()); 0017 } 0018 }; 0019 0020 K_PLUGIN_CLASS_WITH_JSON(StaticSimplePluginClass, "data/jsonplugin.json") 0021 0022 #include "statickpluginclass.moc"