]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Change way to obtain GUI version
authorvsr <vsr@opencascade.com>
Sat, 15 Oct 2011 13:52:00 +0000 (13:52 +0000)
committervsr <vsr@opencascade.com>
Sat, 15 Oct 2011 13:52:00 +0000 (13:52 +0000)
src/SUITApp/SUITApp.cxx

index e47dc099341ccea9d4bd9532d3184e9e7c73e579..c7a391d57aa87db0d2e97c67e9130a4e48e8f642 100644 (file)
 
 //#endif //#if defined WIN32
 
+#include "GUI_version.h"
 #include "SUITApp_Application.h"
-
-#include <SUIT_Session.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_ResourceMgr.h>
-#include <Style_Salome.h>
-#include <QtxSplash.h>
-
-#include <SUIT_LicenseDlg.h>
+#include "SUIT_Desktop.h"
+#include "SUIT_LicenseDlg.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "Style_Salome.h"
+#include "QtxSplash.h"
 
 #include <QDir>
 #include <QFile>
 
 static QString salomeVersion()
 {
-  QString path( ::getenv( "GUI_ROOT_DIR" ) );
-  if ( !path.isEmpty() )
-    path += QDir::separator();
-
-  path += QString( "bin/salome/VERSION" );
-
-  QFile vf( path );
-  if ( !vf.open( QFile::ReadOnly ) )
-    return QString();
-
-  QString line = vf.readLine( 1024 );
-  vf.close();
-
-  if ( line.isEmpty() )
-    return QString();
-
-  while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
-    line.remove( line.length() - 1, 1 );
-
-  QString ver;
-  int idx = line.lastIndexOf( ":" );
-  if ( idx != -1 )
-    ver = line.mid( idx + 1 ).trimmed();
-
-  return ver;
+  return GUI_VERSION_STR;
 }
 
 // static void MessageOutput( QtMsgType type, const char* msg )