GenericProject: Simplify code using member initialization

Change-Id: Iac260f97224c0bd440542b94ee50271be9dc2bf5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-04-06 17:42:31 +02:00
parent 11b5dfb679
commit 977608bc5d
2 changed files with 1 additions and 3 deletions

View File

@@ -58,7 +58,6 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
connect(this, &SelectableFilesModel::modelReset, this, [this] { emit checkedFilesChanged(); }); connect(this, &SelectableFilesModel::modelReset, this, [this] { emit checkedFilesChanged(); });
m_root = new Tree; m_root = new Tree;
m_root->parent = 0;
} }
void SelectableFilesModel::setInitialMarkedFiles(const Utils::FileNameList &files) void SelectableFilesModel::setInitialMarkedFiles(const Utils::FileNameList &files)
@@ -78,7 +77,6 @@ void SelectableFilesModel::startParsing(const Utils::FileName &baseDir)
// Build a tree in a future // Build a tree in a future
m_rootForFuture = new Tree; m_rootForFuture = new Tree;
m_rootForFuture->name = baseDir.toUserOutput(); m_rootForFuture->name = baseDir.toUserOutput();
m_rootForFuture->parent = 0;
m_rootForFuture->fullPath = baseDir; m_rootForFuture->fullPath = baseDir;
m_rootForFuture->isDir = true; m_rootForFuture->isDir = true;

View File

@@ -57,7 +57,7 @@ public:
QList<Tree *> visibleFiles; QList<Tree *> visibleFiles;
QIcon icon; QIcon icon;
Utils::FileName fullPath; Utils::FileName fullPath;
Tree *parent; Tree *parent = nullptr;
}; };
class Glob class Glob