CMake: Make fileapi not race against its own reply file detection

Fix broken logic to prevent CMake fileapi from detecting the change
its own cmake run triggered via file watching.

Remember the last file that was parsed and do not attempt to parse
this again. Remember the file on a per-project basis, too:-)

Change-Id: Ia6e155b65d77994f6e3d2a3677f770a4ba53539d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tobias Hunger
2019-07-25 15:16:55 +02:00
committed by Alexandru Croitor
parent ec92784778
commit eab0df22f9
3 changed files with 11 additions and 11 deletions

View File

@@ -251,6 +251,8 @@ public:
QStringList cmakeQueryFileNames() const;
QStringList cmakeQueryFilePaths() const;
void setParsedReplyFilePath(const QString &filePath);
static FileApiData parseData(const QFileInfo &replyFileInfo, QString &errorMessage);
signals:
@@ -266,6 +268,7 @@ private:
void replyDirectoryHasChanged(const QString &directory) const;
Utils::FileSystemWatcher m_watcher;
QString m_lastParsedReplyFile;
};
} // namespace Internal