Salome HOME
Copyright update 2021
[modules/gui.git] / src / SVTK / SVTK_RecorderDlg.cxx
old mode 100755 (executable)
new mode 100644 (file)
index b30283c..a31516f
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,8 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 
+#include <Qtx.h>
+
 #include <QtxDoubleSpinBox.h>
 #include <QtxIntSpinBox.h>
 
@@ -36,6 +38,7 @@
 #include <QLayout>
 #include <QLineEdit>
 #include <QPushButton>
+#include <QDir>
 
 /*!
  * Constructor
@@ -130,7 +133,7 @@ void SVTK_RecorderDlg::onStart()
   if( myFileName.isNull() )
     return;
 
-  myRecorder->SetName( (const char*)myFileName.toLatin1() );
+  myRecorder->SetName( (const char*)myFileName.toUtf8() );
 
   myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentIndex() == 0 );
   myRecorder->SetNbFPS( myFPSSpinBox->value() );
@@ -173,7 +176,7 @@ bool SVTK_RecorderDlg::onBrowseFile()
   aFilter.append( tr( "FLT_AVI_FILES" ) );
   aFilter.append( tr( "FLT_ALL_FILES" ) );
 
-  QString aFileName = SUIT_FileDlg::getFileName( this, getenv( "HOME" ), aFilter,
+  QString aFileName = SUIT_FileDlg::getFileName( this, QDir::homePath(), aFilter,
                                                  tr( "FILE_NAME" ), false );
 
   if( aFileName.isNull() )