Bazaar: Remove direct accesses to singletons

Change-Id: Ie736597dcc17256fc1ef912689ef86e706acbd99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-01-24 14:10:01 +01:00
parent f39e9be2f2
commit 60f0e06942
6 changed files with 33 additions and 40 deletions

View File

@@ -168,7 +168,7 @@ BazaarPluginPrivate::BazaarPluginPrivate()
connect(m_client, &VcsBaseClient::changed, vcsCtrl, &BazaarControl::changed);
new OptionsPage(vcsCtrl, this);
new OptionsPage(vcsCtrl, &m_bazaarSettings, this);
const auto describeFunc = [this](const QString &source, const QString &id) {
m_client->view(source, id);
@@ -187,11 +187,6 @@ BazaarPluginPrivate::BazaarPluginPrivate()
createMenu(context);
}
BazaarPluginPrivate *BazaarPluginPrivate::instance()
{
return dd;
}
BazaarClient *BazaarPluginPrivate::client() const
{
return m_client;
@@ -635,7 +630,7 @@ void BazaarPluginPrivate::uncommit()
const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
UnCommitDialog dialog(ICore::dialogParent());
UnCommitDialog dialog(this, ICore::dialogParent());
if (dialog.exec() == QDialog::Accepted)
m_client->synchronousUncommit(state.topLevel(), dialog.revision(), dialog.extraOptions());
}