Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/tests/plugins/globalnondefaultplugin.cpp
- This file was copied from kdevplatform/shell/tests/nonguiinterfaceplugin.h.
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * This file is part of KDevelop | 2 | * This file is part of KDevelop | ||
3 | * | 3 | * | ||
4 | * Copyright 2007 Hamish Rodda <rodda@kde.org> | 4 | * Copyright 2017 Friedrich W. H. Kossebau <kossebau@kde.org> | ||
5 | * | 5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU Library General Public License as | 7 | * it under the terms of the GNU Library General Public License as | ||
8 | * published by the Free Software Foundation; either version 2 of the | 8 | * published by the Free Software Foundation; either version 2 of the | ||
9 | * License, or (at your option) any later version. | 9 | * License, or (at your option) any later version. | ||
10 | * | 10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | 11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. | ||
15 | * | 15 | * | ||
16 | * You should have received a copy of the GNU General Public | 16 | * You should have received a copy of the GNU General Public | ||
17 | * License along with this program; if not, write to the | 17 | * License along with this program; if not, write to the | ||
18 | * Free Software Foundation, Inc., | 18 | * Free Software Foundation, Inc., | ||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef NONGUIINTERFACEPLUGIN | | |||
23 | #define NONGUIINTERFACEPLUGIN | | |||
24 | | ||||
25 | #include <interfaces/iplugin.h> | 22 | #include <interfaces/iplugin.h> | ||
26 | 23 | | |||
27 | #include <QVariant> | 24 | #include <KPluginFactory> | ||
28 | 25 | | |||
29 | class ITestNonGuiInterface | 26 | class GlobalNonDefaultPlugin : public KDevelop::IPlugin | ||
30 | { | 27 | { | ||
28 | Q_OBJECT | ||||
31 | public: | 29 | public: | ||
32 | virtual ~ITestNonGuiInterface() {} | 30 | GlobalNonDefaultPlugin(QObject* parent, const QVariantList&); | ||
33 | }; | 31 | }; | ||
34 | 32 | | |||
35 | Q_DECLARE_INTERFACE( ITestNonGuiInterface, "org.kdevelop.ITestNonGuiInterface" ) | 33 | GlobalNonDefaultPlugin::GlobalNonDefaultPlugin(QObject* parent, const QVariantList&) | ||
36 | 34 | : IPlugin(QStringLiteral("globalnondefaultplugin"), parent) | |||
37 | | ||||
38 | class NonGuiInterfacePlugin : public KDevelop::IPlugin, ITestNonGuiInterface | | |||
39 | { | 35 | { | ||
40 | Q_OBJECT | 36 | } | ||
41 | Q_INTERFACES(ITestNonGuiInterface) | | |||
42 | public: | | |||
43 | explicit NonGuiInterfacePlugin( QObject* parent, const QVariantList& = QVariantList() ); | | |||
44 | }; | | |||
45 | 37 | | |||
46 | #endif | 38 | K_PLUGIN_FACTORY_WITH_JSON(GlobalNonDefaultPluginFactory, "globalnondefaultplugin.testpluginjson", | ||
39 | registerPlugin<GlobalNonDefaultPlugin>();) | ||||
47 | 40 | | |||
41 | #include "globalnondefaultplugin.moc" |