QFileSystemModel: remove useless check
The NULL check is on the line before, no point of repeating it again. Change-Id: Id6fa9ffc4dcc00819882f2d3157e9dbdb0e1db78 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
1485c2f3fa
commit
45f60d2da2
@ -544,7 +544,7 @@ QModelIndex QFileSystemModel::parent(const QModelIndex &index) const
|
||||
|
||||
QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(index);
|
||||
Q_ASSERT(indexNode != 0);
|
||||
QFileSystemModelPrivate::QFileSystemNode *parentNode = (indexNode ? indexNode->parent : 0);
|
||||
QFileSystemModelPrivate::QFileSystemNode *parentNode = indexNode->parent;
|
||||
if (parentNode == 0 || parentNode == &d->root)
|
||||
return QModelIndex();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user