summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditorplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r--src/plugins/pythoneditor/pythoneditorplugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp
index c8fbe192c7..f3efaedba5 100644
--- a/src/plugins/pythoneditor/pythoneditorplugin.cpp
+++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp
@@ -381,8 +381,8 @@ static QStringList readLinesJson(const Utils::FileName &projectFile,
const QJsonObject obj = doc.object();
if (obj.contains("files")) {
- QJsonValue files = obj.value("files");
- QJsonArray files_array = files.toArray();
+ const QJsonValue files = obj.value("files");
+ const QJsonArray files_array = files.toArray();
QSet<QString> visited;
for (const auto &file : files_array)
visited.insert(file.toString());
@@ -512,7 +512,7 @@ void PythonProject::refresh(Target *target)
QDir baseDir(projectDirectory().toString());
BuildTargetInfoList appTargets;
auto newRoot = std::make_unique<PythonProjectNode>(this);
- for (const QString &f : m_files) {
+ for (const QString &f : qAsConst(m_files)) {
const QString displayName = baseDir.relativeFilePath(f);
FileType fileType = f.endsWith(".pyproject") || f.endsWith(".pyqtc") ? FileType::Project : FileType::Source;
newRoot->addNestedNode(std::make_unique<PythonFileNode>(FileName::fromString(f),