summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitplugin.cpp
diff options
context:
space:
mode:
authorPetar Perisin <petar.perisin@gmail.com>2013-10-22 22:34:20 +0200
committerPetar Perisin <petar.perisin@gmail.com>2013-10-29 07:27:19 +0100
commit9bb93246c1bf32ab9f1abfe74cd1ad8b3b96eec3 (patch)
tree54d44c3401d2c8583cd1a091ed31d642f22db254 /src/plugins/git/gitplugin.cpp
parente31426366bfb9ebefde10df13062c5aa76e3eb00 (diff)
downloadqt-creator-9bb93246c1bf32ab9f1abfe74cd1ad8b3b96eec3.tar.gz
Git: Remove function pointer in changeRelatedActions
makes code more readable Change-Id: I8f6369bf571144dde468546b8f47695fd4ffdf44 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r--src/plugins/git/gitplugin.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 9d806d7da1..06ed7d2ca9 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -894,24 +894,22 @@ void GitPlugin::startChangeRelatedAction()
if (!ensureAllDocumentsSaved())
return;
- bool (GitClient::*commandFunction)(const QString&, const QString&);
+
switch (dialog.command()) {
case CherryPick:
- commandFunction = &GitClient::synchronousCherryPick;
+ m_gitClient->synchronousCherryPick(workingDirectory, change);
break;
case Revert:
- commandFunction = &GitClient::synchronousRevert;
+ m_gitClient->synchronousRevert(workingDirectory, change);
break;
case Checkout:
if (!m_gitClient->beginStashScope(workingDirectory, QLatin1String("Checkout")))
return;
- commandFunction = &GitClient::synchronousCheckout;
+ m_gitClient->synchronousCheckout(workingDirectory, change);
break;
default:
return;
}
-
- (m_gitClient->*commandFunction)(workingDirectory, change);
}
void GitPlugin::stageFile()