summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@theqtcompany.com>2015-07-27 10:49:40 +0200
committerNiels Weber <niels.weber@theqtcompany.com>2015-08-06 14:47:27 +0300
commit8b4bdb6a0023806cf869ec344d75854cd7a848ce (patch)
tree40ff0fafdd250c1e0b2c819f90290fa7228b6807
parent8f738836ea0d368f44fa575adf64284cff1aee9b (diff)
downloadqt-creator-8b4bdb6a0023806cf869ec344d75854cd7a848ce.tar.gz
Consolidate duplicate code
Change-Id: I0cae5df1b1f5a8ddab063dc37e1dcd0cb97701a0 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
-rw-r--r--plugins/autotest/testcodeparser.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp
index a437bd4d15..0cf2ba5675 100644
--- a/plugins/autotest/testcodeparser.cpp
+++ b/plugins/autotest/testcodeparser.cpp
@@ -557,7 +557,8 @@ bool TestCodeParser::postponed(const QStringList &fileList)
case Idle:
return false;
case PartialParse:
- // partial is running, postponing a full parse
+ case FullParse:
+ // parse is running, postponing a full parse
if (fileList.isEmpty()) {
m_partialUpdatePostponed = false;
m_postponedFiles.clear();
@@ -568,23 +569,6 @@ bool TestCodeParser::postponed(const QStringList &fileList)
return true;
// 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)
m_postponedFiles.insert(file);
m_partialUpdatePostponed = true;
}