- Extending Qt Creator Manual
- QtCreator
- PluginDependency
- Extending Qt Creator Manual 8.0.2

# PluginDependency Struct

struct ExtensionSystem::PluginDependency

The PluginDependency class contains the name and required compatible version number of a plugin's dependency. More...

Header: | #include <extensionsystem/pluginspec.h>

- List of all members, including inherited members

## Public Types

enum | Type { Required, Optional, Test }

## Public Variables

QString | name
ExtensionSystem::PluginDependency::Type | type
QString | version

## Detailed Description

This reflects the data of a dependency object in the plugin's meta data. The name and version are used to resolve the dependency. That is, a plugin with the given name and plugin `compatibility version <= dependency version <= plugin version` is searched for.

See also ExtensionSystem::IPlugin for more information about plugin dependencies and version matching.

## Member Type Documentation

### enum PluginDependency::Type

Whether the dependency is required or optional.

Constant | Value | Description
--- | --- | ---
`ExtensionSystem::PluginDependency::Required` | `0` | Dependency needs to be there.
`ExtensionSystem::PluginDependency::Optional` | `1` | Dependency is not necessarily needed. You need to make sure that the plugin is able to load without this dependency installed, so for example you may not link to the dependency's library.
`ExtensionSystem::PluginDependency::Test` | `2` | Dependency needs to be force-loaded for running tests of the plugin.

## Member Variable Documentation

### QString PluginDependency::name

String identifier of the plugin.

### ExtensionSystem::PluginDependency::Type PluginDependency::type

Defines whether the dependency is required or optional.

See also ExtensionSystem::PluginDependency::Type.

### QString PluginDependency::version

Version string that a plugin must match to fill this dependency.