Git: Allow clicking references in VcsOutputWindow

Fixes: QTCREATORBUG-16477
Change-Id: If1f36bec0826a3116e5261a270cd63a1536e13f5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2020-02-16 14:03:47 +01:00
committed by André Hartmann
parent d0a11322f4
commit 4cbb24906f
5 changed files with 47 additions and 8 deletions

View File

@@ -919,6 +919,14 @@ GitPluginPrivate::GitPluginPrivate()
m_gerritPlugin->initialize(remoteRepositoryMenu);
m_gerritPlugin->updateActions(currentState());
m_gerritPlugin->addToLocator(m_commandLocator);
connect(VcsOutputWindow::instance(), &VcsOutputWindow::referenceClicked,
this, [this](const QString &name) {
const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
m_gitClient.show(state.topLevel(), name);
});
}
void GitPluginPrivate::diffCurrentFile()