From 804c94262e3a87e9f4032c79ccea62101b915156 Mon Sep 17 00:00:00 2001 From: Nikita Baryshnikov Date: Thu, 13 Jun 2013 14:33:43 +0300 Subject: Mercurial: annotate - goto current line Retrieve current line from editor and provide it to the client Task-number: QTCREATORBUG-8067 Change-Id: Ia1a8c9556ffc975cf2bed72ed790aa02f7157ffc Reviewed-by: Orgad Shaneh Reviewed-by: Tobias Hunger --- src/plugins/mercurial/mercurialplugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 12db4d74c5..25bae0bd1e 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -267,9 +267,12 @@ void MercurialPlugin::addCurrentFile() void MercurialPlugin::annotateCurrentFile() { + int currentLine = -1; + if (Core::IEditor *editor = Core::EditorManager::currentEditor()) + currentLine = editor->currentLine(); const VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasFile(), return); - m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile()); + m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile(), QString(), currentLine); } void MercurialPlugin::diffCurrentFile() -- cgit v1.2.1