mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1476 Include isFile() when checking if a file exists
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "cafPdmUiPropertyView.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafPdmUiTreeViewEditor.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QtGui>
|
||||
@@ -99,7 +100,7 @@ QString RiuWellImportWizard::jsonWellsFilePath()
|
||||
void RiuWellImportWizard::downloadFields()
|
||||
{
|
||||
QString wellFileName = jsonWellsFilePath();
|
||||
if (QFile::exists(wellFileName))
|
||||
if (caf::Utils::fileExists(wellFileName))
|
||||
{
|
||||
QFile::remove(wellFileName);
|
||||
}
|
||||
@@ -355,7 +356,7 @@ void RiuWellImportWizard::updateFieldsModel()
|
||||
{
|
||||
QString fileName = jsonFieldsFilePath();
|
||||
|
||||
if (QFile::exists(fileName))
|
||||
if (caf::Utils::fileExists(fileName))
|
||||
{
|
||||
ResInsightInternalJson::JsonReader jsonReader;
|
||||
QMap<QString, QVariant> jsonMap = jsonReader.decodeFile(fileName);
|
||||
@@ -540,7 +541,7 @@ QStringList RiuWellImportWizard::absoluteFilePathsToWellPaths() const
|
||||
|
||||
for (size_t i = 0; i < downloadEntities.size(); i++)
|
||||
{
|
||||
if (QFile::exists(downloadEntities[i].responseFilename))
|
||||
if (caf::Utils::fileExists(downloadEntities[i].responseFilename))
|
||||
{
|
||||
filePaths.push_back(downloadEntities[i].responseFilename);
|
||||
}
|
||||
@@ -582,7 +583,7 @@ void RiuWellImportWizard::parseWellsResponse(RimOilFieldEntry* oilFieldEntry)
|
||||
QStringList surveyNames;
|
||||
QStringList planNames;
|
||||
|
||||
if (QFile::exists(oilFieldEntry->wellsFilePath))
|
||||
if (caf::Utils::fileExists(oilFieldEntry->wellsFilePath))
|
||||
{
|
||||
ResInsightInternalJson::JsonReader jsonReader;
|
||||
QMap<QString, QVariant> jsonMap = jsonReader.decodeFile(oilFieldEntry->wellsFilePath);
|
||||
@@ -1056,7 +1057,7 @@ void WellSummaryPage::updateSummaryPage()
|
||||
|
||||
for (size_t i = 0; i < downloadEntities.size(); i++)
|
||||
{
|
||||
if (QFile::exists(downloadEntities[i].responseFilename))
|
||||
if (caf::Utils::fileExists(downloadEntities[i].responseFilename))
|
||||
{
|
||||
wellPathCount++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user