Fix qmake's pro file cache to interact correctly with write_file

When writing a file with write_file() we have to inform the pro file parser
cache to discard the file if it's existent in the cache, to ensure that
calling include() after write_file() always works.

Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/f45d6414ad6ef1d75f049a61411cd954bcae29c3)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Oswald Buddenhagen
2013-05-16 18:11:46 +02:00
parent a64eac0a74
commit aa2508ba41
3 changed files with 9 additions and 0 deletions

View File

@@ -210,6 +210,12 @@ ProFile *QMakeParser::parsedProBlock(
return pro;
}
void QMakeParser::discardFileFromCache(const QString &fileName)
{
if (m_cache)
m_cache->discardFile(fileName);
}
bool QMakeParser::read(ProFile *pro)
{
QFile file(pro->fileName());