mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-28 00:15:06 +00:00
Use static QFile::exists instead of creating object
This commit is contained in:
parent
ecb9c35268
commit
62536d5cf7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user