QFile aFile( theFileName );
if( !aFile.open( QFile::WriteOnly | QFile::Text ) )
{
- QString homeDirPath = QDir::homePath();
- aFile.setFileName(homeDirPath);
+ QString homeFilePath = QDir::home().absoluteFilePath( theFileName );
+ aFile.setFileName(homeFilePath);
if (aFile.open( QFile::WriteOnly | QFile::Text ) )
- statMessage = "Telemac file have been exported to the home directory:" + homeDirPath;
+ statMessage = "Telemac file have been exported to the home directory: " + homeFilePath;
else
return false;
}
else
- statMessage = "Telemac file have been exported to the current directory";
+ {
+ QString absFilePath = QDir::current().absoluteFilePath( theFileName );
+ statMessage = "Telemac file have been exported to the current directory: " + absFilePath;
+ }
QTextStream aStream( &aFile );
aStream << "# nodes\n";