aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/bazaar
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-01-24 10:13:02 +0100
committerhjk <hjk@qt.io>2020-01-24 09:55:35 +0000
commite0072ec165fc12c45718b154512a3268ae66a818 (patch)
treee63ea2ee83e8f0d7bb53c0226d0c42c1ed414f52 /src/plugins/bazaar
parent1cd936c53145f520fb9a3817a6548d9d25c399f0 (diff)
Vcs: Move settings ownership from VcsBaseClientImpl to plugin
Turns out CVS and Bazaar already had an unused copy there... Change-Id: I512c4d6322620e2b55d9008600ac676ce09032aa Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/bazaar')
-rw-r--r--src/plugins/bazaar/bazaarclient.cpp10
-rw-r--r--src/plugins/bazaar/bazaarclient.h2
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/bazaar/bazaarclient.cpp b/src/plugins/bazaar/bazaarclient.cpp
index d56e39534f..f3c2d35c00 100644
--- a/src/plugins/bazaar/bazaarclient.cpp
+++ b/src/plugins/bazaar/bazaarclient.cpp
@@ -101,13 +101,13 @@ public:
}
};
-BazaarClient::BazaarClient() : VcsBaseClient(new BazaarSettings)
+BazaarClient::BazaarClient(BazaarSettings *settings) : VcsBaseClient(settings)
{
- setDiffConfigCreator([this](QToolBar *toolBar) {
- return new BazaarDiffConfig(settings(), toolBar);
+ setDiffConfigCreator([settings](QToolBar *toolBar) {
+ return new BazaarDiffConfig(*settings, toolBar);
});
- setLogConfigCreator([this](QToolBar *toolBar) {
- return new BazaarLogConfig(settings(), toolBar);
+ setLogConfigCreator([settings](QToolBar *toolBar) {
+ return new BazaarLogConfig(*settings, toolBar);
});
}
diff --git a/src/plugins/bazaar/bazaarclient.h b/src/plugins/bazaar/bazaarclient.h
index 78d1ca5b35..5d45dd0c4c 100644
--- a/src/plugins/bazaar/bazaarclient.h
+++ b/src/plugins/bazaar/bazaarclient.h
@@ -40,7 +40,7 @@ class BazaarClient : public VcsBase::VcsBaseClient
Q_OBJECT
public:
- BazaarClient();
+ explicit BazaarClient(BazaarSettings *settings);
bool synchronousSetUserId();
BranchInfo synchronousBranchQuery(const QString &repositoryRoot) const;
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 7db4b212d7..230269b38a 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -162,7 +162,7 @@ BazaarPluginPrivate::BazaarPluginPrivate()
Context context(Constants::BAZAAR_CONTEXT);
- m_client = new BazaarClient;
+ m_client = new BazaarClient(&m_bazaarSettings);
auto vcsCtrl = new BazaarControl(m_client);
initializeVcs(vcsCtrl, context);