forked from qt-creator/qt-creator
VcsCommand: Call GlobalFileChangeBlocker functions directly
Since we now always run on the main thread, there is no reason to use invokeMethod. Change-Id: Id5fbade283b5d196f0ae7e5102bffee618a20881 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
0793184956
commit
92d84738cf
@@ -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)
|
||||
|
Reference in New Issue
Block a user