IPlugin Class
(ExtensionSystem::IPlugin)The IPlugin class is an abstract base class that must be implemented once for each plugin. More...
| Header: | #include <IPlugin> |
| Inherited By: | ProjectExplorer::ProjectExplorerPlugin and VcsBase::VcsBasePlugin |
Public Types
| enum | ShutdownFlag { SynchronousShutdown, AsynchronousShutdown } |
Public Functions
| virtual QVector<QObject *> | createTestObjects() const |
| ExtensionSystem::PluginSpec * | pluginSpec() const |
Detailed Description
A plugin needs to provide meta data in addition to the actual plugin library, so the plugin manager can find the plugin, resolve its dependencies, and load it. For more information, see Plugin Meta Data.
Plugins must provide one implementation of the IPlugin class, located in a library that matches the name attribute given in their meta data. The IPlugin implementation must be exported and made known to Qt's plugin system, using the Q_PLUGIN_METADATA macro with an IID set to "org.qt-project.Qt.QtCreatorPlugin".
For more information, see Plugin Life Cycle.
Member Type Documentation
enum IPlugin::ShutdownFlag
This enum type holds whether the plugin is shut down synchronously or asynchronously.
| Constant | Value | Description |
|---|---|---|
ExtensionSystem::IPlugin::SynchronousShutdown | 0 | The plugin is shut down synchronously. |
ExtensionSystem::IPlugin::AsynchronousShutdown | 1 | The plugin needs to perform asynchronous actions before it shuts down. |
Member Function Documentation
[virtual] QVector<QObject *> IPlugin::createTestObjects() const
Returns objects that are meant to be passed on to QTest::qExec().
This function will be called if the user starts Qt Creator with -test PluginName or -test all.
The ownership of returned objects is transferred to caller.
ExtensionSystem::PluginSpec *IPlugin::pluginSpec() const
Returns the PluginSpec corresponding to this plugin. This is not available in the constructor.