summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-04-26 14:41:46 +0200
committerTobias Hunger <tobias.hunger@qt.io>2018-05-02 11:34:35 +0000
commit5754d5accf10ce7cc01927188c3e6a28c469368b (patch)
tree8899438063530c7eaeafa86e740852f1ad642752 /src/plugins/pythoneditor
parent1f55ba9012eea79fafedddf270ef401aa6988298 (diff)
downloadqt-creator-5754d5accf10ce7cc01927188c3e6a28c469368b.tar.gz
ProjectExplorer: Use unique_ptr for Project::setRootProjectNode
Change-Id: If63a49d0eecfb93adcc6076fcb3208c87603af10 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/pythoneditor')
-rw-r--r--src/plugins/pythoneditor/pythoneditorplugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp
index 5d9d9b4c09..0f9d58546f 100644
--- a/src/plugins/pythoneditor/pythoneditorplugin.cpp
+++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp
@@ -457,7 +457,7 @@ void PythonProject::refresh(Target *target)
QDir baseDir(projectDirectory().toString());
BuildTargetInfoList appTargets;
- auto newRoot = new PythonProjectNode(this);
+ auto newRoot = std::make_unique<PythonProjectNode>(this);
for (const QString &f : m_files) {
const QString displayName = baseDir.relativeFilePath(f);
FileType fileType = f.endsWith(".pyqtc") ? FileType::Project : FileType::Source;
@@ -470,7 +470,7 @@ void PythonProject::refresh(Target *target)
appTargets.list.append(bti);
}
}
- setRootProjectNode(newRoot);
+ setRootProjectNode(std::move(newRoot));
if (!target)
target = activeTarget();