From be8916d1ff4979e78fb724a83f78fa52499609d8 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 4 Mar 2009 07:04:59 +0000 Subject: [PATCH] Issue 0020193: add path to Qt plugins --- src/SUITApp/SUITApp.cxx | 5 +++++ src/Session/SALOME_Session_Server.cxx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 9fefe90f0..0613d15c5 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -203,6 +203,11 @@ int main( int argc, char* argv[] ) argList.append( QString( argv[i] ) ); } + // add $QTDIR/plugins to the pluins search path for image plugins + QString qtdir( ::getenv( "QTDIR" ) ); + if ( !qtdir.isEmpty() ) + QApplication::addLibraryPath( QDir( qtdir ).absoluteFilePath( "plugins" ) ); + SUITApp_Application app( argc, argv ); int result = -1; diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 6bb4668f2..4e60a9da4 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -339,6 +339,11 @@ int main( int argc, char **argv ) // Install Qt debug messages handler qInstallMsgHandler( MessageOutput ); + // add $QTDIR/plugins to the pluins search path for image plugins + QString qtdir( ::getenv( "QTDIR" ) ); + if ( !qtdir.isEmpty() ) + QApplication::addLibraryPath( QDir( qtdir ).absoluteFilePath( "plugins" ) ); + // Create Qt application instance; // this should be done the very first! SALOME_QApplication _qappl( argc, argv ); -- 2.39.2