forked from qt-creator/qt-creator
Git: Modernize
* pragma once * member initialization * s/struct/class/ * Introduce a static GitPlugin::client() method and use it Change-Id: Ifdcac86dd16f3cdba11d564d03e9a15f00a6afdb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -127,16 +127,7 @@ const VcsBaseEditorParameters editorParameters[] = {
|
||||
|
||||
static GitPlugin *m_instance = 0;
|
||||
|
||||
GitPlugin::GitPlugin() :
|
||||
m_commandLocator(0),
|
||||
m_submitCurrentAction(0),
|
||||
m_diffSelectedFilesAction(0),
|
||||
m_undoAction(0),
|
||||
m_redoAction(0),
|
||||
m_menuAction(0),
|
||||
m_applyCurrentFilePatchAction(0),
|
||||
m_gitClient(0),
|
||||
m_submitActionTriggered(false)
|
||||
GitPlugin::GitPlugin()
|
||||
{
|
||||
m_instance = this;
|
||||
m_fileActions.reserve(10);
|
||||
@@ -169,6 +160,11 @@ GitPlugin *GitPlugin::instance()
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
GitClient *GitPlugin::client()
|
||||
{
|
||||
return m_instance->m_gitClient;
|
||||
}
|
||||
|
||||
const VcsBaseSubmitEditorParameters submitParameters = {
|
||||
Git::Constants::SUBMIT_MIMETYPE,
|
||||
Git::Constants::GITSUBMITEDITOR_ID,
|
||||
@@ -1353,11 +1349,6 @@ void GitPlugin::updateRepositoryBrowserAction()
|
||||
m_repositoryBrowserAction->setEnabled(repositoryEnabled && hasRepositoryBrowserCmd);
|
||||
}
|
||||
|
||||
GitClient *GitPlugin::client() const
|
||||
{
|
||||
return m_gitClient;
|
||||
}
|
||||
|
||||
Gerrit::Internal::GerritPlugin *GitPlugin::gerritPlugin() const
|
||||
{
|
||||
return m_gerritPlugin;
|
||||
|
Reference in New Issue
Block a user