-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <QPushButton>
#include <QTextStream>
#include <QFile>
+#include <QDir>
#include <QPrinter>
//#include <QSimpleRichText>
#include <QTextDocument>
#include <math.h>
+#include <Qtx.h>
+
#ifdef WIN32
#include <UserEnv.h>
#endif
{
setObjectName( name );
setModal( modal );
- QString env;
- if ( ::getenv( "SALOME_LICENSE_FILE" ) )
- env = ::getenv( "SALOME_LICENSE_FILE" );
-
+ QString env = Qtx::getenv( "SALOME_LICENSE_FILE" );
QFile file( env ); // Read the text from a file
if ( !file.exists() || !file.open( QIODevice::ReadOnly ) )
void SUIT_LicenseDlg::onAgree()
{
+ /*
QString env;
#ifdef WIN32
DWORD aLen=1024;
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;