From 8b4bdb6a0023806cf869ec344d75854cd7a848ce Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 27 Jul 2015 10:49:40 +0200 Subject: Consolidate duplicate code Change-Id: I0cae5df1b1f5a8ddab063dc37e1dcd0cb97701a0 Reviewed-by: Niels Weber --- plugins/autotest/testcodeparser.cpp | 20 ++------------------ 1 file 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(); @@ -567,23 +568,6 @@ bool TestCodeParser::postponed(const QStringList &fileList) 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; - } - 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; -- cgit v1.2.1