From 89d6408587210b00afaa48eb32c958f5920012b6 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Thu, 15 May 2025 23:00:08 +0300 Subject: [PATCH] Avoid unnecessary file system access in plugin toggling --- components/contentselector/model/contentmodel.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp index 5f0d41d38c..81095db196 100644 --- a/components/contentselector/model/contentmodel.cpp +++ b/components/contentselector/model/contentmodel.cpp @@ -835,10 +835,7 @@ bool ContentSelectorModel::ContentModel::setCheckState(const QString& filepath, { for (const EsmFile* downstreamFile : mFiles) { - QFileInfo fileInfo(filepath); - QString filename = fileInfo.fileName(); - - if (downstreamFile->gameFiles().contains(filename, Qt::CaseInsensitive)) + if (downstreamFile->gameFiles().contains(file->fileName(), Qt::CaseInsensitive)) { mCheckedFiles.erase(downstreamFile);