Skip to content

Commit a7a072e

Browse files
committed
Merge branch 'qfileinfo' into 'master'
Avoid unnecessary file system access in plugin toggling See merge request OpenMW/openmw!4679
2 parents 52b3e06 + 89d6408 commit a7a072e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/contentselector/model/contentmodel.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,7 @@ bool ContentSelectorModel::ContentModel::setCheckState(const QString& filepath,
835835
{
836836
for (const EsmFile* downstreamFile : mFiles)
837837
{
838-
QFileInfo fileInfo(filepath);
839-
QString filename = fileInfo.fileName();
840-
841-
if (downstreamFile->gameFiles().contains(filename, Qt::CaseInsensitive))
838+
if (downstreamFile->gameFiles().contains(file->fileName(), Qt::CaseInsensitive))
842839
{
843840
mCheckedFiles.erase(downstreamFile);
844841

0 commit comments

Comments
 (0)