forked from qt-creator/qt-creator
SelectableFilesModel: Remove redundant variable
Change-Id: I259ab5e918aa5fd8a12f08bdd683b2f8392f20ac Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -38,7 +38,6 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
|
||||
void SelectableFilesModel::setInitialMarkedFiles(const Utils::FilePaths &files)
|
||||
{
|
||||
m_files = Utils::toSet(files);
|
||||
m_allFiles = files.isEmpty();
|
||||
}
|
||||
|
||||
void SelectableFilesFromDirModel::startParsing(const Utils::FilePath &baseDir)
|
||||
@@ -136,8 +135,8 @@ void SelectableFilesFromDirModel::buildTree(const Utils::FilePath &baseDir, Tree
|
||||
auto t = new Tree;
|
||||
t->parent = tree;
|
||||
t->name = fileInfo.fileName();
|
||||
FilterState state = filter(t);
|
||||
t->checked = ((m_allFiles && state == FilterState::CHECKED)
|
||||
const FilterState state = filter(t);
|
||||
t->checked = ((m_files.isEmpty() && state == FilterState::CHECKED)
|
||||
|| m_files.contains(fn)) ? Qt::Checked : Qt::Unchecked;
|
||||
t->fullPath = fn;
|
||||
t->isDir = false;
|
||||
|
@@ -121,7 +121,6 @@ private:
|
||||
void selectAllFiles(Tree *root);
|
||||
|
||||
protected:
|
||||
bool m_allFiles = true;
|
||||
QSet<Utils::FilePath> m_outOfBaseDirFiles;
|
||||
QSet<Utils::FilePath> m_files;
|
||||
Tree *m_root = nullptr;
|
||||
|
Reference in New Issue
Block a user