forked from qt-creator/qt-creator
docker: Change Settings to single owner
We change DockerSettings to have a single owner. Since DockerDevices are destroyed after the plugin is unloaded, we have to make sure to remove the settings from devices during plugin teardown. For this we store a list of created devices in the factory, and call their shutdown function when the plugin unloads. Change-Id: Ic9c7d8ad9437c48d68f20c9a8f8ad7449b3cb972 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -42,7 +42,7 @@ class DockerApi : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DockerApi(QSharedPointer<DockerSettings> settings);
|
||||
DockerApi(DockerSettings *settings);
|
||||
|
||||
static DockerApi *instance();
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
private:
|
||||
Utils::optional<bool> m_dockerDaemonAvailable;
|
||||
QMutex m_daemonCheckGuard;
|
||||
QSharedPointer<DockerSettings> m_settings;
|
||||
DockerSettings *m_settings;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user