mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5147 RimWellLogFile::m_fileName ->FilePath
This commit is contained in:
@@ -151,9 +151,9 @@ bool RimWellLogFile::readFile( QString* errorMessage )
|
||||
m_wellLogDataFile = new RigWellLogFile;
|
||||
}
|
||||
|
||||
m_name = QFileInfo( m_fileName ).fileName();
|
||||
m_name = QFileInfo( m_fileName().path() ).fileName();
|
||||
|
||||
if ( !m_wellLogDataFile->open( m_fileName, errorMessage ) )
|
||||
if ( !m_wellLogDataFile->open( m_fileName().path(), errorMessage ) )
|
||||
{
|
||||
m_wellLogDataFile = nullptr;
|
||||
return false;
|
||||
@@ -242,15 +242,15 @@ bool RimWellLogFile::hasFlowData() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogFile::updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath )
|
||||
{
|
||||
bool foundFile = false;
|
||||
std::vector<QString> searchedPaths;
|
||||
|
||||
QString fileNameCandidate =
|
||||
RimTools::relocateFile( m_fileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths );
|
||||
if ( foundFile )
|
||||
{
|
||||
m_fileName = fileNameCandidate;
|
||||
}
|
||||
// bool foundFile = false;
|
||||
// std::vector<QString> searchedPaths;
|
||||
//
|
||||
// QString fileNameCandidate =
|
||||
// RimTools::relocateFile( m_fileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths );
|
||||
// if ( foundFile )
|
||||
// {
|
||||
// m_fileName = fileNameCandidate;
|
||||
// }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
void setFileName( const QString& fileName );
|
||||
QString fileName() const
|
||||
{
|
||||
return m_fileName;
|
||||
return m_fileName().path();
|
||||
}
|
||||
QString name() const
|
||||
{
|
||||
@@ -109,7 +109,7 @@ private:
|
||||
private:
|
||||
cvf::ref<RigWellLogFile> m_wellLogDataFile;
|
||||
caf::PdmField<QString> m_wellName;
|
||||
caf::PdmField<QString> m_fileName;
|
||||
caf::PdmField<caf::FilePath> m_fileName;
|
||||
caf::PdmField<QString> m_name;
|
||||
caf::PdmField<QDateTime> m_date;
|
||||
bool m_lasFileHasValidDate;
|
||||
|
||||
Reference in New Issue
Block a user