forked from qt-creator/qt-creator
Docker: Remove DockerPlugin::dockerApi()
Access is nowadays via DockerApi::instance() Change-Id: Idc1530358771c3a008182661c263c30b68fe84be Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -31,24 +31,14 @@ public:
|
|||||||
DockerApi m_dockerApi{&m_settings};
|
DockerApi m_dockerApi{&m_settings};
|
||||||
};
|
};
|
||||||
|
|
||||||
static DockerPlugin *s_instance = nullptr;
|
|
||||||
|
|
||||||
DockerPlugin::DockerPlugin()
|
DockerPlugin::DockerPlugin()
|
||||||
{
|
{
|
||||||
s_instance = this;
|
|
||||||
FSEngine::registerDeviceScheme(Constants::DOCKER_DEVICE_SCHEME);
|
FSEngine::registerDeviceScheme(Constants::DOCKER_DEVICE_SCHEME);
|
||||||
}
|
}
|
||||||
|
|
||||||
DockerApi *DockerPlugin::dockerApi()
|
|
||||||
{
|
|
||||||
QTC_ASSERT(s_instance, return nullptr);
|
|
||||||
return &s_instance->d->m_dockerApi;
|
|
||||||
}
|
|
||||||
|
|
||||||
DockerPlugin::~DockerPlugin()
|
DockerPlugin::~DockerPlugin()
|
||||||
{
|
{
|
||||||
FSEngine::unregisterDeviceScheme(Constants::DOCKER_DEVICE_SCHEME);
|
FSEngine::unregisterDeviceScheme(Constants::DOCKER_DEVICE_SCHEME);
|
||||||
s_instance = nullptr;
|
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "dockerapi.h"
|
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
namespace Docker::Internal {
|
namespace Docker::Internal {
|
||||||
|
|
||||||
class DockerPlugin final : public ExtensionSystem::IPlugin
|
class DockerPlugin final : public ExtensionSystem::IPlugin
|
||||||
@@ -19,8 +15,6 @@ class DockerPlugin final : public ExtensionSystem::IPlugin
|
|||||||
public:
|
public:
|
||||||
DockerPlugin();
|
DockerPlugin();
|
||||||
|
|
||||||
static DockerApi *dockerApi();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~DockerPlugin() final;
|
~DockerPlugin() final;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user