diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-04-26 15:07:56 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-05-02 14:55:15 +0000 |
commit | d3329545674ba6ee0233477f0821741e496c6b77 (patch) | |
tree | 954c1f17402d3d3c6097c6886300ae5809a36066 /src/plugins/pythoneditor/pythoneditorplugin.cpp | |
parent | f9585d939f6a140ecbf6526d30c294048060b246 (diff) | |
download | qt-creator-d3329545674ba6ee0233477f0821741e496c6b77.tar.gz |
ProjectExplorer: Add and use addNestedNode(...) that takes unique_ptr
Change-Id: Ieb26721d053111fb350494e31d1f6da3fe642420
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditorplugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 0f9d58546f..50ef0abffb 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -461,7 +461,8 @@ void PythonProject::refresh(Target *target) for (const QString &f : m_files) { const QString displayName = baseDir.relativeFilePath(f); FileType fileType = f.endsWith(".pyqtc") ? FileType::Project : FileType::Source; - newRoot->addNestedNode(new PythonFileNode(FileName::fromString(f), displayName, fileType)); + newRoot->addNestedNode(std::make_unique<PythonFileNode>(FileName::fromString(f), + displayName, fileType)); if (fileType == FileType::Source) { BuildTargetInfo bti; bti.buildKey = f; |