From 475d3d3d3693669042c7ccd3a858d6a873d9999a Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 22 Feb 2006 06:30:16 +0000 Subject: [PATCH] no message --- src/TOOLSGUI/ToolsGUI_HelpWindow.h | 2 + src/TOOLSGUI/ToolsGUI_IntervalWindow.h | 2 + src/TOOLSGUI/ToolsGUI_RegWidget.cxx | 59 ++++++++++++-------------- src/TOOLSGUI/ToolsGUI_RegWidget.h | 27 +++++------- 4 files changed, 40 insertions(+), 50 deletions(-) diff --git a/src/TOOLSGUI/ToolsGUI_HelpWindow.h b/src/TOOLSGUI/ToolsGUI_HelpWindow.h index 22c06ca11..61ff116c6 100755 --- a/src/TOOLSGUI/ToolsGUI_HelpWindow.h +++ b/src/TOOLSGUI/ToolsGUI_HelpWindow.h @@ -36,6 +36,8 @@ class QTextView; class ToolsGUI_HelpWindow : public QMainWindow { + Q_OBJECT + public: ToolsGUI_HelpWindow( QWidget* parent = 0, const char* name = 0); ~ToolsGUI_HelpWindow(); diff --git a/src/TOOLSGUI/ToolsGUI_IntervalWindow.h b/src/TOOLSGUI/ToolsGUI_IntervalWindow.h index 40c1f1af1..3b53d7de8 100755 --- a/src/TOOLSGUI/ToolsGUI_IntervalWindow.h +++ b/src/TOOLSGUI/ToolsGUI_IntervalWindow.h @@ -22,6 +22,8 @@ using namespace std; class ToolsGUI_IntervalWindow : public QDialog { + Q_OBJECT + public: ToolsGUI_IntervalWindow( QWidget* parent = 0 ); ~ToolsGUI_IntervalWindow(); diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx index b36f8fdda..332454c73 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx @@ -150,23 +150,23 @@ Registry::Components_var MakeRegistry( CORBA::ORB_var &orb ) // Recuperation de la reference de l'objet CORBA::Object_var object = 0 ; try - { - SCRUTE(registryName) ; - object = naming.Resolve( registryName ) ; - if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ; - } - catch( const ServiceUnreachable &ex ) - { - MESSAGE( ex.what() ) - exit( EXIT_FAILURE ) ; - } - catch( const CORBA::Exception &exx ) - { - exit( EXIT_FAILURE ) ; - } - + { + SCRUTE(registryName) ; + object = naming.Resolve( registryName ) ; + if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ; + } + catch( const ServiceUnreachable& ) + { + MESSAGE( ex.what() ) + exit( EXIT_FAILURE ) ; + } + catch( const CORBA::Exception& ) + { + exit( EXIT_FAILURE ) ; + } + // Specialisation de l'objet generique - + return Registry::Components::_narrow( object ) ; } @@ -782,29 +782,22 @@ QString findFile( QString filename ) // Try CSF_SaloameResources env.var directory ( or directory list ) cenv = getenv( "CSF_SalomeResources" ); if ( cenv ) { - dir.sprintf( "%s", cenv ); - if ( !dir.isEmpty() ) { - QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries - for ( int i = 0; i < dirList.count(); i++ ) { - QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename ); - if ( fileInfo.isFile() && fileInfo.exists() ) - return fileInfo.filePath(); + dir.sprintf( "%s", cenv ); + if ( !dir.isEmpty() ) + { + QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries + for ( int i = 0; i < (int)dirList.count(); i++ ) + { + QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename ); + if ( fileInfo.isFile() && fileInfo.exists() ) + return fileInfo.filePath(); } } } return filename; } + QString addSlash( const QString& path ) { return Qtx::addSlash( path ); -// if (!path.isNull()) { -//#ifdef WNT -// QChar slash ('\\'); -//#else -// QChar slash ('/'); -//#endif -// if ( path.at(path.length()-1) != slash ) -// return path + slash; -// } -// return path; } diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index b2ff85087..6d3a66f04 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -# ifndef __REGWIDGET_H__ -# define __REGWIDGET_H__ -# include -# include +#ifndef __REGWIDGET_H__ +#define __REGWIDGET_H__ +#include +#include #include #include CORBA_CLIENT_HEADER(SALOME_Registry) @@ -50,7 +50,10 @@ class QPushButton; class ToolsGUI_HelpWindow; class ToolsGUI_IntervalWindow; -class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow { +class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow +{ + Q_OBJECT + public: ToolsGUI_InfoWindow( QWidget* parent = 0, const char* name = 0); @@ -64,9 +67,8 @@ private: QTextView* myTextView; }; -class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow +class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow { - Q_OBJECT public: @@ -114,13 +116,4 @@ private: static ToolsGUI_RegWidget* myRegWidgetPtr; }; -# endif /* # ifndef __REGWIDGET_H__ */ - - - - - - - - - +#endif -- 2.39.2