#include <qobject.h>
#include <kgenericfactory.h>
#include "configurable.h"
Go to the source code of this file.
◆ UMBRELLO_EXPORT_PLUGIN_FACTORY
#define UMBRELLO_EXPORT_PLUGIN_FACTORY |
( |
|
libname, |
|
|
|
factory |
|
) |
| extern "C" { KDE_EXPORT void *init_##libname() { return new factory(#libname); } } |
This macro replaces the K_EXPORT_COMPONENT_FACTORY macro because of a simple deficiency for this application - the construction of the factory with a default instance name. This macro must be used in the .cpp file implementing the plugin.
- Parameters
-
libname | The name of the plugin. This corresponds to the name of the shared object without the ".so" extension. |
factory | The type of factory. Typically, this will be KGenericFactory<> with the name of the plugin as the parameter. |