diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-01-19 10:41:31 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-01-20 15:44:46 +0100 |
commit | f3220dd4086a123e1aa4acf9dc732621a3a14ef5 (patch) | |
tree | bafe838ce008de96dc41efd42a84cc9268c955c2 | |
parent | 6fe3eec590c574510f2cbfb8ed3d2732ab6a0dbf (diff) | |
download | qt-creator-f3220dd4086a123e1aa4acf9dc732621a3a14ef5.tar.gz |
Vcs: Delete commit message file after commit
Change-Id: I5786fb49d99c793319d28d5a14460f962f416ab5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r-- | src/plugins/vcsbase/vcsbaseclient.cpp | 6 |
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 |