PluginDependency Class | Extending Qt Creator Manual

Extending Qt Creator Manual | PluginDependency

Extending Qt Creator Manual 4.4.1

# PluginDependency Class

(ExtensionSystem::PluginDependency)

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

Header: | #include <PluginDependency>

- List of all members, including inherited members

## Public Types

enum | Type { Required, Optional, Test }

## Public Functions

| PluginDependency()
QString | toString() const

## Public Variables

QString | name
Type | type
QString | version

## Detailed Description

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

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 Function Documentation

### PluginDependency::PluginDependency()

Default constructs an instance of PluginDependency.

### QString PluginDependency::toString() const

## Member Variable Documentation

### QString PluginDependency::name

String identifier of the plugin.

### 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.