From: vsr Date: Mon, 17 Jun 2013 06:54:02 +0000 (+0000) Subject: Small fix to process absolute file paths properly X-Git-Tag: B4KillOfAutomake~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_new_bop3;p=modules%2Fgui.git Small fix to process absolute file paths properly --- diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 2e06646ce..669a16669 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -334,15 +334,22 @@ const QtxResourceMgr::Section QtxResourceMgr::Resources::section( const QString& QString QtxResourceMgr::Resources::fileName( const QString& sect, const QString& prefix, const QString& name ) const { QString path; - if ( hasValue( sect, prefix ) ) + if ( !QFileInfo( name ).isRelative() ) { - path = value( sect, prefix, true ); - if ( !path.isEmpty() ) + path = name; + } + else + { + if ( hasValue( sect, prefix ) ) { - if ( QFileInfo( path ).isRelative() ) - path = Qtx::addSlash( Qtx::dir( myFileName, true ) ) + path; - - path = Qtx::addSlash( path ) + name; + path = value( sect, prefix, true ); + if ( !path.isEmpty() ) + { + if ( QFileInfo( path ).isRelative() ) + path = Qtx::addSlash( Qtx::dir( myFileName, true ) ) + path; + + path = Qtx::addSlash( path ) + name; + } } } if( !path.isEmpty() )