diff --git a/src/plugins/vcsbase/vcscommand.cpp b/src/plugins/vcsbase/vcscommand.cpp index c62508d57bc..1043478ad1b 100644 --- a/src/plugins/vcsbase/vcscommand.cpp +++ b/src/plugins/vcsbase/vcscommand.cpp @@ -115,22 +115,16 @@ int VcsCommandPrivate::timeoutS() const void VcsCommandPrivate::setup() { m_futureInterface.reportStarted(); - if (m_flags & RunFlags::ExpectRepoChanges) { - QMetaObject::invokeMethod(GlobalFileChangeBlocker::instance(), [] { - GlobalFileChangeBlocker::instance()->forceBlocked(true); - }); - } + if (m_flags & RunFlags::ExpectRepoChanges) + GlobalFileChangeBlocker::instance()->forceBlocked(true); } void VcsCommandPrivate::cleanup() { QTC_ASSERT(m_futureInterface.isRunning(), return); m_futureInterface.reportFinished(); - if (m_flags & RunFlags::ExpectRepoChanges) { - QMetaObject::invokeMethod(GlobalFileChangeBlocker::instance(), [] { - GlobalFileChangeBlocker::instance()->forceBlocked(false); - }); - } + if (m_flags & RunFlags::ExpectRepoChanges) + GlobalFileChangeBlocker::instance()->forceBlocked(false); } void VcsCommandPrivate::setupProcess(QtcProcess *process, const Job &job)