diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2018-11-14 11:12:57 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2018-11-14 13:37:49 +0000 |
commit | 2f41f359526c5452b981e002acd935fc3cec4014 (patch) | |
tree | 0bdf743cff435eb013928230bf5326d5f7e2bbad /src/libs/utils/shellcommand.cpp | |
parent | b8dcaa455e8b8139634a1992a30b11295d627378 (diff) |
Git: Make commit a bit less synchronous
If gc.auto is configured, commit can trigger garbage collection, which
takes time. Avoid completely blocking the UI on this case, and at least
show the output of the commit command.
Change-Id: Id301c878c26599bbc363928a6770c04369a62f2f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/utils/shellcommand.cpp')
-rw-r--r-- | src/libs/utils/shellcommand.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libs/utils/shellcommand.cpp b/src/libs/utils/shellcommand.cpp index 92d97dc65b4..0d5be90996e 100644 --- a/src/libs/utils/shellcommand.cpp +++ b/src/libs/utils/shellcommand.cpp @@ -338,10 +338,13 @@ SynchronousProcessResponse ShellCommand::runCommand(const FileName &binary, if (!(d->m_flags & SuppressCommandLogging)) proxy->appendCommand(dir, binary, arguments); - if (d->m_flags & FullySynchronously || QThread::currentThread() == QCoreApplication::instance()->thread()) + if ((d->m_flags & FullySynchronously) + || (!(d->m_flags & NoFullySync) + && QThread::currentThread() == QCoreApplication::instance()->thread())) { response = runFullySynchronous(binary, arguments, proxy, timeoutS, dir, interpreter); - else + } else { response = runSynchronous(binary, arguments, proxy, timeoutS, dir, interpreter); + } if (!d->m_aborted) { // Success/Fail message in appropriate window? |