mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
[Fwk] Propagate return value from QFile::open in writeFile() to caller
This commit is contained in:
parent
b26d199815
commit
1f91405c50
@ -98,13 +98,15 @@ void PdmDocument::readFile(QIODevice* xmlFile)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmDocument::writeFile()
|
||||
bool PdmDocument::writeFile()
|
||||
{
|
||||
QFile xmlFile(fileName);
|
||||
if (!xmlFile.open(QIODevice::WriteOnly ))
|
||||
return;
|
||||
return false;
|
||||
|
||||
writeFile(&xmlFile);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -56,7 +56,7 @@ class PdmDocument: public PdmObject
|
||||
PdmField<QString> fileName;
|
||||
|
||||
void readFile();
|
||||
void writeFile();
|
||||
bool writeFile();
|
||||
|
||||
void readFile(QIODevice* device);
|
||||
void writeFile(QIODevice* device);
|
||||
|
Loading…
Reference in New Issue
Block a user