diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index e54688a597..54dabd3ef9 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -401,11 +401,8 @@ QStringList Launcher::DataFilesPage::selectedFilePaths() const ContentSelectorModel::ContentFileList items = mSelector->selectedFiles(); QStringList filePaths; for (const ContentSelectorModel::EsmFile* item : items) - { - QFile file(item->filePath()); - if (file.exists()) + if (QFile::exists(item->filePath())) filePaths.append(item->filePath()); - } return filePaths; } diff --git a/apps/wizard/existinginstallationpage.cpp b/apps/wizard/existinginstallationpage.cpp index 1f97ad88e0..71ae331a61 100644 --- a/apps/wizard/existinginstallationpage.cpp +++ b/apps/wizard/existinginstallationpage.cpp @@ -50,9 +50,8 @@ bool Wizard::ExistingInstallationPage::validatePage() // Or failed to be detected due to the target being a symlink QString path(field(QLatin1String("installation.path")).toString()); - QFile file(mWizard->mInstallations[path].iniPath); - if (!file.exists()) + if (!QFile::exists(mWizard->mInstallations[path].iniPath)) { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error detecting Morrowind configuration"));