X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSUITApp%2FSUITApp.cxx;h=979783334852ad305733f82479eb07a5278fa09e;hb=d6bd12111347879cd8dbe1a15ac4d6ba32ce0d6b;hp=861f9df0a55366a43a7cd936abee47e1d8fed62d;hpb=dd84f523512abc26fbd5ad99430ddf432482b4fb;p=modules%2Fgui.git diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 861f9df0a..979783334 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -46,7 +46,9 @@ #include "SUIT_LicenseDlg.h" #include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" +#ifdef USE_SALOME_STYLE #include "Style_Salome.h" +#endif // USE_SALOME_STYLE #include "QtxSplash.h" #include @@ -177,17 +179,20 @@ int main( int argc, char* argv[] ) } } - // add $QTDIR/plugins to the pluins search path for image plugins - QString qtdir( ::getenv( "QTDIR" ) ); + // add /plugins directory to the pluins search path for image plugins + QString qtdir = Qtx::qtDir( "plugins" ); if ( !qtdir.isEmpty() ) - QApplication::addLibraryPath( QDir( qtdir ).absoluteFilePath( "plugins" ) ); + QApplication::addLibraryPath( qtdir ); +// TODO (QT5 PORTING) Below is a temporary solution, to allow compiling with Qt 5 +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) //Set a "native" graphic system in case if application runs on the remote host QString remote(::getenv("REMOTEHOST")); QString client(::getenv("SSH_CLIENT")); if(remote.length() > 0 || client.length() > 0 ) { QApplication::setGraphicsSystem(QLatin1String("native")); } +#endif SUITApp_Application app( argc, argv ); QString cfgAppName = getAppName( argList.isEmpty() ? QString() : argList.first() ); @@ -272,9 +277,11 @@ int main( int argc, char* argv[] ) SUIT_Application* theApp = aSession.startApplication( argList.first() ); if ( theApp ) { +#ifdef USE_SALOME_STYLE Style_Salome::initialize( theApp->resourceMgr() ); if ( theApp->resourceMgr()->booleanValue( "Style", "use_salome_style", true ) ) Style_Salome::apply(); +#endif // USE_SALOME_STYLE if ( !noExceptHandling ) app.setHandler( aSession.handler() );