| 58 | K_PLUGIN_CLASS(PluginWithoutMetaData) |
| 59 | |
| 60 | class StaticSimplePluginClass : public QObject |
| 61 | { |
| 62 | Q_OBJECT |
| 63 | |
| 64 | public: |
| 65 | // Next to the assertion below, ensure that we have no ambiguity! |
| 66 | explicit StaticSimplePluginClass(QObject *parent, const QString &data = {}) |
| 67 | : QObject(parent) |
| 68 | { |
| 69 | // We have added a default arg, but KPluginFactory should still provide the valid metadata instead of the default one |
| 70 | data = QString("foo"); |
| 71 | } |
| 72 | }; |
| 73 | K_PLUGIN_CLASS_WITH_JSON(StaticSimplePluginClass, "data/jsonplugin.json") |
| 74 | |