forked from qt-creator/qt-creator
Add information about how to write plugin tests and how to integrate unit tests. Change-Id: I13721f03c4c55a265a93f71a7c4d892f3e53a6bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
35 lines
665 B
C++
35 lines
665 B
C++
#pragma once
|
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
//! [namespaces]
|
|
namespace Example {
|
|
namespace Internal {
|
|
//! [namespaces]
|
|
|
|
//! [base class]
|
|
class ExamplePlugin : public ExtensionSystem::IPlugin
|
|
{
|
|
Q_OBJECT
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Example.json")
|
|
//! [base class]
|
|
|
|
public:
|
|
ExamplePlugin();
|
|
~ExamplePlugin();
|
|
|
|
//! [plugin functions]
|
|
bool initialize(const QStringList &arguments, QString *errorString);
|
|
void extensionsInitialized();
|
|
ShutdownFlag aboutToShutdown();
|
|
//! [plugin functions]
|
|
|
|
//! [slot]
|
|
private:
|
|
void triggerAction();
|
|
//! [slot]
|
|
};
|
|
|
|
} // namespace Internal
|
|
} // namespace Example
|