mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-07-21 00:25:39 +08:00
- Fixed: using Qt5 plugin system based on Q_PLUGIN_METADATA
This commit is contained in:
@@ -3,28 +3,9 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "blackmisc/plugins.h"
|
||||
#include "plugin.h"
|
||||
#include <iostream>
|
||||
|
||||
class CPlugin : public BlackMisc::IPlugin
|
||||
{
|
||||
public:
|
||||
CPlugin(BlackMisc::IPluginFactory &factory, BlackMisc::IContext &context);
|
||||
|
||||
virtual ~CPlugin();
|
||||
|
||||
virtual bool isValid() const { return m_ctorOK; }
|
||||
|
||||
virtual BlackMisc::IPluginFactory &getFactory() { return m_factory; }
|
||||
|
||||
private:
|
||||
bool m_ctorOK;
|
||||
BlackMisc::IPluginFactory &m_factory;
|
||||
BlackMisc::IContext &m_context;
|
||||
};
|
||||
|
||||
MAKE_BLACK_PLUGIN(sample_plugin, CPlugin, "An example minimal plugin")
|
||||
|
||||
CPlugin::CPlugin(BlackMisc::IPluginFactory &factory, BlackMisc::IContext &context)
|
||||
: m_ctorOK(false),
|
||||
m_factory(factory),
|
||||
|
||||
Reference in New Issue
Block a user