summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitclient.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-09-29 22:57:21 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-09-30 16:36:00 +0200
commit003e25d488ef8b4ac9b797cc26c667b84f246f09 (patch)
tree40c744e0d4ac067d16b104656ef8f76493a67aaf /src/plugins/git/gitclient.cpp
parent8e90640edb43a7192153575e81def2c84d5415c8 (diff)
downloadqt-creator-003e25d488ef8b4ac9b797cc26c667b84f246f09.tar.gz
VCS: Abort previous command for the same editor
It is very common to have output from a previous (longer) command appear instead of the newly created one. For example: Open a log. Check "Show Diff" and immediately uncheck it. If this is done fast enough (or with a high Log Count limit) the output with the diff will appear instead of the normal log. Change-Id: Ie64cc4a383a261f5328a4d0486eec93f73766679 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r--src/plugins/git/gitclient.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 813539d62a..d48d5805f2 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -2467,8 +2467,11 @@ VcsBase::Command *GitClient::createCommand(const QString &workingDirectory,
VcsBase::Command *command = new VcsBase::Command(gitBinaryPath(), workingDirectory, processEnvironment());
command->setCodec(getSourceCodec(currentDocumentPath()));
command->setCookie(QVariant(editorLineNumber));
- if (editor)
- connect(command, SIGNAL(finished(bool,int,QVariant)), editor, SLOT(commandFinishedGotoLine(bool,int,QVariant)));
+ if (editor) {
+ editor->setCommand(command);
+ connect(command, SIGNAL(finished(bool,int,QVariant)),
+ editor, SLOT(commandFinishedGotoLine(bool,int,QVariant)));
+ }
if (useOutputToWindow) {
command->addFlags(VcsBasePlugin::ShowStdOutInLogWindow);
command->addFlags(VcsBasePlugin::ShowSuccessMessage);