From: vsr Date: Mon, 2 Feb 2015 16:04:38 +0000 (+0300) Subject: Load Qt resources properly: take into account QT_ROOT_DIR instead of (QTDIR) X-Git-Tag: V7_6_0a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6d33c47851e68ae821a260aaf00732b5f581489b;p=modules%2Fgui.git Load Qt resources properly: take into account QT_ROOT_DIR instead of (QTDIR) --- diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 7b2688844..ccac83924 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -2697,9 +2697,9 @@ void QtxResourceMgr::loadLanguage( const QString& pref, const QString& l ) if ( pref.isEmpty() && lang != "en" ) { // load Qt resources QString qt_translations = QLibraryInfo::location( QLibraryInfo::TranslationsPath ); - QString qt_dir_trpath; - if ( ::getenv( "QTDIR" ) ) - qt_dir_trpath = QString( ::getenv( "QTDIR" ) ); + QString qt_dir_trpath = qgetenv( "QT_ROOT_DIR" ); + if ( qt_dir_trpath.isEmpty() ) + qt_dir_trpath = qgetenv( "QTDIR" ); if ( !qt_dir_trpath.isEmpty() ) qt_dir_trpath = QDir( qt_dir_trpath ).absoluteFilePath( "translations" ); diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 861f9df0a..f3b8df360 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -178,7 +178,9 @@ int main( int argc, char* argv[] ) } // add $QTDIR/plugins to the pluins search path for image plugins - QString qtdir( ::getenv( "QTDIR" ) ); + QString qtdir = qgetenv( "QT_ROOT_DIR" ); + if ( qtdir.isEmpty() ) + qtdir = qgetenv( "QTDIR" ); if ( !qtdir.isEmpty() ) QApplication::addLibraryPath( QDir( qtdir ).absoluteFilePath( "plugins" ) ); diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index dee5c6689..70bf7038a 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -351,7 +351,9 @@ int main( int argc, char **argv ) } // add $QTDIR/plugins to the pluins search path for image plugins - QString qtdir( ::getenv( "QTDIR" ) ); + QString qtdir = qgetenv( "QT_ROOT_DIR" ); + if ( qtdir.isEmpty() ) + qtdir = qgetenv( "QTDIR" ); if ( !qtdir.isEmpty() ) QApplication::addLibraryPath( QDir( qtdir ).absoluteFilePath( "plugins" ) );