Commit 8b4bdb6a authored by Christian Stenger's avatar Christian Stenger Committed by Niels Weber
Browse files

Consolidate duplicate code



Change-Id: I0cae5df1b1f5a8ddab063dc37e1dcd0cb97701a0
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 8f738836
...@@ -557,7 +557,8 @@ bool TestCodeParser::postponed(const QStringList &fileList) ...@@ -557,7 +557,8 @@ bool TestCodeParser::postponed(const QStringList &fileList)
case Idle: case Idle:
return false; return false;
case PartialParse: case PartialParse:
// partial is running, postponing a full parse case FullParse:
// parse is running, postponing a full parse
if (fileList.isEmpty()) { if (fileList.isEmpty()) {
m_partialUpdatePostponed = false; m_partialUpdatePostponed = false;
m_postponedFiles.clear(); m_postponedFiles.clear();
...@@ -567,23 +568,6 @@ bool TestCodeParser::postponed(const QStringList &fileList) ...@@ -567,23 +568,6 @@ bool TestCodeParser::postponed(const QStringList &fileList)
if (m_fullUpdatePostponed) if (m_fullUpdatePostponed)
return true; return true;
// partial parse triggered, postpone or add current files to already postponed partial // partial parse triggered, postpone or add current files to already postponed partial
foreach (const QString &file, fileList)
m_postponedFiles.insert(file);
m_partialUpdatePostponed = true;
}
return true;
case FullParse:
// full parse is running, postponing another full parse
if (fileList.isEmpty()) {
m_partialUpdatePostponed = false;
m_postponedFiles.clear();
m_fullUpdatePostponed = true;
} else {
// full parse already postponed, ignoring triggering a partial parse
if (m_fullUpdatePostponed) {
return true;
}
// partial parse triggered, postpone or add current files to already postponed partial
foreach (const QString &file, fileList) foreach (const QString &file, fileList)
m_postponedFiles.insert(file); m_postponedFiles.insert(file);
m_partialUpdatePostponed = true; m_partialUpdatePostponed = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment