Qmake: Invalidate contents of QmakeVfs on target change

Task-number: QTCREATORBUG-20113
Change-Id: I13cd3749a942cc06172dd63f163bff88490a44ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Tobias Hunger
2018-04-13 15:36:24 +02:00
parent 9a946decc3
commit fefce829ad
2 changed files with 9 additions and 2 deletions

View File

@@ -562,7 +562,12 @@ void QmakeProject::asyncUpdate()
{
m_asyncUpdateTimer.setInterval(UPDATE_INTERVAL);
if (m_invalidateQmakeVfsContents) {
m_invalidateQmakeVfsContents = false;
m_qmakeVfs->invalidateContents();
} else {
m_qmakeVfs->invalidateCache();
}
Q_ASSERT(!m_asyncUpdateFutureInterface);
m_asyncUpdateFutureInterface = new QFutureInterface<void>();
@@ -588,7 +593,7 @@ void QmakeProject::asyncUpdate()
void QmakeProject::buildFinished(bool success)
{
if (success)
m_qmakeVfs->invalidateContents();
m_invalidateQmakeVfsContents = true;
}
bool QmakeProject::supportsKit(const Kit *k, QString *errorMessage) const
@@ -819,6 +824,7 @@ void QmakeProject::activeTargetWasChanged()
}
m_activeTarget = activeTarget();
m_invalidateQmakeVfsContents = true;
if (!m_activeTarget)
return;

View File

@@ -181,6 +181,7 @@ private:
// cached data during project rescan
std::unique_ptr<QMakeGlobals> m_qmakeGlobals;
int m_qmakeGlobalsRefCnt = 0;
bool m_invalidateQmakeVfsContents = false;
QString m_qmakeSysroot;