From 36b12746b6fae3d451b62d2a529a4effda43af57 Mon Sep 17 00:00:00 2001 From: vsr Date: Sat, 15 Oct 2011 13:52:00 +0000 Subject: [PATCH] Change way to obtain GUI version --- src/SUITApp/SUITApp.cxx | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index e47dc0993..c7a391d57 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -40,15 +40,14 @@ //#endif //#if defined WIN32 +#include "GUI_version.h" #include "SUITApp_Application.h" - -#include -#include -#include -#include -#include - -#include +#include "SUIT_Desktop.h" +#include "SUIT_LicenseDlg.h" +#include "SUIT_ResourceMgr.h" +#include "SUIT_Session.h" +#include "Style_Salome.h" +#include "QtxSplash.h" #include #include @@ -64,31 +63,7 @@ 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 ) -- 2.39.2