QFileSystemModel: remove an unneeded const_cast
QAIM::createIndex() takes a const void* pointer, so we don't need to const_cast the const away. Amends the start of the public history. Picking all the way back, because I'm hunting a memleak here, and can't say, yet, whether these lines need to be modified or not. Besides, this change is 100% safe: either it compiles and works as before or it doesn't compile. There is no silent breakage possible. Pick-to: 6.8 6.5 5.15 Change-Id: I2f9284540beed9d1ab027ac1e24f1c527537e122 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9f2db4acd7d063b884cf3ad4f085f1644ba925db) Reviewed-by: Daniel Smith <daniel.smith@qt.io>
This commit is contained in:
parent
141f061130
commit
75e042173d
@ -233,7 +233,7 @@ QModelIndex QFileSystemModel::index(int row, int column, const QModelIndex &pare
|
||||
const QFileSystemModelPrivate::QFileSystemNode *indexNode = parentNode->children.value(childName);
|
||||
Q_ASSERT(indexNode);
|
||||
|
||||
return createIndex(row, column, const_cast<QFileSystemModelPrivate::QFileSystemNode*>(indexNode));
|
||||
return createIndex(row, column, indexNode);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user