KCoreAddons

kexportplugin.h
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2007 Bernhard Loos <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-only
7 */
8 
9 #ifndef KEXPORTPLUGIN_H
10 #define KEXPORTPLUGIN_H
11 
12 #include <QPluginLoader>
13 #include <QtPlugin>
14 #include <kcoreaddons_export.h>
15 
16 /**
17  * \relates KPluginLoader
18  * Use this macro if you want to give your plugin a version number.
19  * You can later access the version number with KPluginLoader::pluginVersion()
20  */
21 #define K_EXPORT_PLUGIN_VERSION(version) Q_EXTERN_C Q_DECL_EXPORT const quint32 kde_plugin_version = version;
22 
23 #if KCOREADDONS_ENABLE_DEPRECATED_SINCE(5, 0)
24 /**
25  * \relates KPluginLoader
26  * This macro exports the main object of the plugin. Most times, this will be a KPluginFactory
27  * or derived class, but any QObject derived class can be used.
28  * Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details.
29  */
30 
31 #if defined(Q_OS_WIN32) && defined(Q_CC_BOR)
32 #define Q_STANDARD_CALL __stdcall
33 #else
34 #define Q_STANDARD_CALL
35 
36 class KCOREADDONS_DEPRECATED_EXPORT K_EXPORT_PLUGIN_is_deprecated_see_KDE5PORTING
37 {
38 };
39 
40 #define K_EXPORT_PLUGIN(factory) K_EXPORT_PLUGIN_is_deprecated_see_KDE5PORTING dummy;
41 #endif
42 
43 #endif
44 
45 #endif // KEXPORTPLUGIN_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Apr 18 2021 23:02:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.