plasma: use unique factory names and pass keyword to register function in macros

fixes runners configuration loading

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-07-08 13:31:53 +03:00
parent 1185408637
commit 534d5e397b

View file

@ -486,8 +486,8 @@ class PLASMA_EXPORT AbstractRunner : public QObject
} // Plasma namespace
#define K_EXPORT_PLASMA_RUNNER( libname, classname ) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(factory("plasma_runner_" #libname))
K_PLUGIN_FACTORY(classname ## Factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(classname ## Factory("plasma_runner_" #libname))
/**
* These plugins are Used by the plugin selector dialog to show
@ -495,7 +495,7 @@ K_EXPORT_PLUGIN(factory("plasma_runner_" #libname))
* must be runner global and not pertain to a specific match.
*/
#define K_EXPORT_RUNNER_CONFIG( name, classname ) \
K_PLUGIN_FACTORY(ConfigFactory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(ConfigFactory("kcm_krunner_" #name))
K_PLUGIN_FACTORY(classname ## Factory, registerPlugin<classname>("kcm_krunner_" #name);) \
K_EXPORT_PLUGIN(classname ## Factory("kcm_krunner_" #name))
#endif