Salome HOME
Small correction for writing of data to file.
[modules/hydro.git] / src / HYDROData / HYDROData_Tool.cxx
1
2 #include "HYDROData_Tool.h"
3
4 #include <QFile>
5 #include <QStringList>
6 #include <QTextStream>
7
8 void HYDROData_Tool::WriteStringsToFile( QFile&             theFile,
9                                          const QStringList& theStrings,
10                                          const QString&     theSep )
11 {
12   if ( !theFile.isOpen() || theStrings.isEmpty() )
13     return;
14   
15   QString aWriteStr = theStrings.join( theSep );
16   if ( aWriteStr.isEmpty() )
17     return;
18
19   QTextStream anOutStream( &theFile );
20   anOutStream << aWriteStr << theSep << theSep;
21 }