X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUIT%2FSUIT_ResourceMgr.cxx;h=6da123a541d1d483d90376f4397e1dd596e9b4ed;hb=ad7fc8bd40bfd2931eed40c848cea393ddde3490;hp=2e127d376ede6cd500e50cf73837be1bcd50f26e;hpb=48b5edbee3573695a152ac4a9b079bde7a7b77d2;p=modules%2Fgui.git diff --git a/src/SUIT/SUIT_ResourceMgr.cxx b/src/SUIT/SUIT_ResourceMgr.cxx index 2e127d376..6da123a54 100644 --- a/src/SUIT/SUIT_ResourceMgr.cxx +++ b/src/SUIT/SUIT_ResourceMgr.cxx @@ -82,12 +82,11 @@ QString SUIT_ResourceMgr::userFileName( const QString& appName, const bool for_l { QString pathName; - QStringList arguments; - if ( SUIT_Session::session() ) arguments = SUIT_Session::session()->arguments(); // Try config file, given in arguments - for (int i = 1; i < arguments.count(); i++) { + QStringList args = QApplication::arguments(); + for (int i = 1; i < args.count(); i++) { QRegExp rx ("--resources=(.+)"); - if ( rx.indexIn( arguments[i] ) >= 0 && rx.captureCount() > 0 ) { + if ( rx.indexIn( args[i] ) >= 0 && rx.captureCount() > 0 ) { QString file = rx.cap(1); QFileInfo fi (file); pathName = fi.absoluteFilePath(); @@ -185,15 +184,16 @@ long SUIT_ResourceMgr::userFileId( const QString& ) const */ QString SUIT_ResourceMgr::defaultLanguage() const { - QStringList arguments; QString language; - if ( SUIT_Session::session() ) arguments = SUIT_Session::session()->arguments(); + // Try language, given in arguments - for (int i = 1; i < arguments.count(); i++) { + QStringList args = QApplication::arguments(); + for (int i = 1; i < args.count(); i++) { QRegExp rx ("--language=(.+)"); - if ( rx.indexIn( arguments[i] ) >= 0 && rx.captureCount() > 0 ) { + if ( rx.indexIn( args[i] ) >= 0 && rx.captureCount() > 0 ) { language = rx.cap(1); } } + return language; }