summaryrefslogtreecommitdiff
path: root/src/plugins/vcsbase
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r--src/plugins/vcsbase/vcsbaseclient.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp
index 0256bc2a2c..2438f29f51 100644
--- a/src/plugins/vcsbase/vcsbaseclient.cpp
+++ b/src/plugins/vcsbase/vcsbaseclient.cpp
@@ -514,10 +514,12 @@ void VcsBaseClient::commit(const QString &repositoryRoot,
// So descendants of VcsBaseClient *must* redefine commit() and extend
// extraOptions with the usage for commitMessageFile (see BazaarClient::commit()
// for example)
- Q_UNUSED(commitMessageFile);
QStringList args(vcsCommandString(CommitCommand));
args << extraOptions << files;
- enqueueJob(createCommand(repositoryRoot, 0, VcsWindowOutputBind), args);
+ VcsCommand *cmd = createCommand(repositoryRoot, 0, VcsWindowOutputBind);
+ if (!commitMessageFile.isEmpty())
+ connect(cmd, &VcsCommand::finished, [commitMessageFile]() { QFile(commitMessageFile).remove(); });
+ enqueueJob(cmd, args);
}
VcsBaseClientSettings *VcsBaseClient::settings() const