From 36a8265549b2cbd6dd9f5b1730137428521595f7 Mon Sep 17 00:00:00 2001
From: Christian Stenger <christian.stenger@theqtcompany.com>
Date: Tue, 3 Mar 2015 15:01:09 +0100
Subject: [PATCH] Move variable declaration into using block

Change-Id: Ibf5f5fd825b7beb2bb6b607c8b822b4dfeebfda5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
---
 plugins/autotest/testcodeparser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp
index 6b2ff8d4a82..bc28fa07206 100644
--- a/plugins/autotest/testcodeparser.cpp
+++ b/plugins/autotest/testcodeparser.cpp
@@ -672,11 +672,11 @@ void TestCodeParser::removeTestsIfNecessary(const QString &fileName)
             emit testItemsRemoved(file, TestTreeModel::QuickTest);
         }
         // unnamed Quick Tests must be handled separately
-        QSet<QString> filePaths;
         if (fileName.endsWith(QLatin1String(".qml"))) {
             removeUnnamedQuickTestsByName(fileName);
             emit unnamedQuickTestsRemoved(fileName);
         } else {
+            QSet<QString> filePaths;
             m_model->qmlFilesForMainFile(fileName, &filePaths);
             foreach (const QString &file, filePaths) {
                 removeUnnamedQuickTestsByName(file);
-- 
GitLab