From 977608bc5d812087d2f7619b2c1289f9b7d1736b Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 6 Apr 2016 17:42:31 +0200 Subject: [PATCH] GenericProject: Simplify code using member initialization Change-Id: Iac260f97224c0bd440542b94ee50271be9dc2bf5 Reviewed-by: Tim Jenssen --- src/plugins/projectexplorer/selectablefilesmodel.cpp | 2 -- src/plugins/projectexplorer/selectablefilesmodel.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp index b88f2e72f08..d89d3a8e846 100644 --- a/src/plugins/projectexplorer/selectablefilesmodel.cpp +++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp @@ -58,7 +58,6 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel connect(this, &SelectableFilesModel::modelReset, this, [this] { emit checkedFilesChanged(); }); m_root = new Tree; - m_root->parent = 0; } void SelectableFilesModel::setInitialMarkedFiles(const Utils::FileNameList &files) @@ -78,7 +77,6 @@ void SelectableFilesModel::startParsing(const Utils::FileName &baseDir) // Build a tree in a future m_rootForFuture = new Tree; m_rootForFuture->name = baseDir.toUserOutput(); - m_rootForFuture->parent = 0; m_rootForFuture->fullPath = baseDir; m_rootForFuture->isDir = true; diff --git a/src/plugins/projectexplorer/selectablefilesmodel.h b/src/plugins/projectexplorer/selectablefilesmodel.h index d31159931b3..c1baa921e9c 100644 --- a/src/plugins/projectexplorer/selectablefilesmodel.h +++ b/src/plugins/projectexplorer/selectablefilesmodel.h @@ -57,7 +57,7 @@ public: QList visibleFiles; QIcon icon; Utils::FileName fullPath; - Tree *parent; + Tree *parent = nullptr; }; class Glob