forked from qt-creator/qt-creator
GenericProject: Simplify code using member initialization
Change-Id: Iac260f97224c0bd440542b94ee50271be9dc2bf5 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
QList<Tree *> visibleFiles;
|
||||
QIcon icon;
|
||||
Utils::FileName fullPath;
|
||||
Tree *parent;
|
||||
Tree *parent = nullptr;
|
||||
};
|
||||
|
||||
class Glob
|
||||
|
Reference in New Issue
Block a user