Salome HOME
Copyright update 2022
[modules/gui.git] / src / SUIT / SUIT_LicenseDlg.cxx
index bafa48fe8f5c2ae33aca8a47effb49214d42b098..9b8a92a6503e72610022e8a1aeac0bfd6c7ed7bc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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,7 @@
 #include <QPushButton>
 #include <QTextStream> 
 #include <QFile>
+#include <QDir>
 #include <QPrinter>
 //#include <QSimpleRichText>
 #include <QTextDocument>
@@ -115,6 +116,7 @@ SUIT_LicenseDlg::~SUIT_LicenseDlg()
 
 void SUIT_LicenseDlg::onAgree()
 {
+  /*
   QString env;
 #ifdef WIN32
   DWORD aLen=1024;
@@ -138,6 +140,11 @@ void SUIT_LicenseDlg::onAgree()
   QFile file( env + "/ReadLicense.log" ); // Read the text from a file
 
   file.open( QIODevice::WriteOnly );
+  */
+  QString env = QDir::homePath();
+  QFile file( env + "/ReadLicense.log" );
+  if (!file.open( QIODevice::WriteOnly ))
+    reject();
 
   QTextStream ts( &file );
   ts << "OK" << endl;