From 815df1f9c38a293984fcd2758c6084a623511539 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 21 Aug 2007 09:17:48 +0000 Subject: [PATCH] *** empty log message *** --- src/SUITApp/SUITApp.cxx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 5779af2f1..81bab394b 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -44,7 +44,7 @@ #include -QString salomeVersion() +static QString salomeVersion() { QString path( ::getenv( "GUI_ROOT_DIR" ) ); if ( !path.isEmpty() ) @@ -73,6 +73,29 @@ QString salomeVersion() return ver; } +static void MessageOutput( QtMsgType type, const char* msg ) +{ + switch ( type ) + { + case QtDebugMsg: +#ifdef _DEBUG_ + printf( "Debug: %s\n", msg ); +#endif + break; + case QtWarningMsg: +#ifdef _DEBUG_ + printf( "Warning: %s\n", msg ); +#endif + break; + case QtFatalMsg: +#ifdef _DEBUG_ + printf( "Fatal: %s\n", msg ); +#endif + break; + default: + break; + } +} /* XPM */ static const char* pixmap_not_found_xpm[] = { @@ -138,6 +161,8 @@ int main( int args, char* argv[] ) PySys_SetArgv( args, argv ); #endif + qInstallMsgHandler( MessageOutput ); + QStringList argList; bool noExceptHandling = false; bool iniFormat = false; -- 2.39.2