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