From: ouv Date: Thu, 24 Feb 2011 15:33:15 +0000 (+0000) Subject: To get the latest fix from V6_main (revision 1.17.2.2.8.4) X-Git-Tag: DIAGRAM_1_0~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f1c8fc3ee25ac0f9bfbecd4f973585b66b4e825;p=modules%2Fgui.git To get the latest fix from V6_main (revision 1.17.2.2.8.4) --- diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 63c16bf90..a6bc30ef7 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -2382,8 +2382,14 @@ void QtxResourceMgr::loadLanguage( const bool loadUser, const QString& pref, con 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" ) ); + if ( !qt_dir_trpath.isEmpty() ) + qt_dir_trpath = QDir( qt_dir_trpath ).absoluteFilePath( "translations" ); + QTranslator* trans = new QtxTranslator( 0 ); - if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) ) + if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) || trans->load( QString("qt_%1").arg( lang ), qt_dir_trpath ) ) QApplication::instance()->installTranslator( trans ); }