[libcalamares] Improve documentation

- reference to _WITH_JSON is bogus copy-replace from other code
 - fix style of sample code.
This commit is contained in:
Adriaan de Groot 2018-01-16 11:05:30 +01:00
parent 0020fd885c
commit 510af704d8

View File

@ -111,13 +111,11 @@ namespace Calamares
* T(QObject *parent, const QVariantList &args) * T(QObject *parent, const QVariantList &args)
* \endcode * \endcode
* *
* You should typically use either CALAMARES_PLUGIN_FACTORY() or * You should typically use CALAMARES_PLUGIN_FACTORY_DEFINITION() in your plugin code to
* CALAMARES_PLUGIN_FACTORY_WITH_JSON() in your plugin code to create the factory. The * create the factory. The pattern is
* typical pattern is
* *
* \code * \code
* #include <PluginFactory.h> * #include "utils/PluginFactory.h"
* #include <plugininterface.h>
* *
* class MyPlugin : public PluginInterface * class MyPlugin : public PluginInterface
* { * {
@ -127,10 +125,9 @@ namespace Calamares
* {} * {}
* }; * };
* *
* CALAMARES_PLUGIN_FACTORY(MyPluginFactory, * CALAMARES_PLUGIN_FACTORY_DEFINITION(MyPluginFactory,
* registerPlugin<MyPlugin>(); * registerPlugin<MyPlugin>();
* ) * )
* #include <myplugin.moc>
* \endcode * \endcode
* *
* If you want to load a library use KPluginLoader. * If you want to load a library use KPluginLoader.