mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 09:36:40 +00:00
Use static QFile::exists instead of creating object
This commit is contained in:
parent
ecb9c35268
commit
62536d5cf7
2 changed files with 2 additions and 6 deletions
|
@ -401,11 +401,8 @@ QStringList Launcher::DataFilesPage::selectedFilePaths() const
|
||||||
ContentSelectorModel::ContentFileList items = mSelector->selectedFiles();
|
ContentSelectorModel::ContentFileList items = mSelector->selectedFiles();
|
||||||
QStringList filePaths;
|
QStringList filePaths;
|
||||||
for (const ContentSelectorModel::EsmFile* item : items)
|
for (const ContentSelectorModel::EsmFile* item : items)
|
||||||
{
|
if (QFile::exists(item->filePath()))
|
||||||
QFile file(item->filePath());
|
|
||||||
if (file.exists())
|
|
||||||
filePaths.append(item->filePath());
|
filePaths.append(item->filePath());
|
||||||
}
|
|
||||||
return filePaths;
|
return filePaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,8 @@ bool Wizard::ExistingInstallationPage::validatePage()
|
||||||
// Or failed to be detected due to the target being a symlink
|
// Or failed to be detected due to the target being a symlink
|
||||||
|
|
||||||
QString path(field(QLatin1String("installation.path")).toString());
|
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;
|
QMessageBox msgBox;
|
||||||
msgBox.setWindowTitle(tr("Error detecting Morrowind configuration"));
|
msgBox.setWindowTitle(tr("Error detecting Morrowind configuration"));
|
||||||
|
|
Loading…
Reference in a new issue