From 6a1ef75fcca2732b095e43f0837476c5a38c57e1 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 13 Jan 2017 13:57:49 +0300 Subject: [PATCH] Remove useless MESSAGEs --- src/SalomeApp/SalomeApp_Study.cxx | 38 +++++++++++++------------- src/Session/SALOME_Session_Server.cxx | 8 +++--- src/Session/Session_ServerLauncher.cxx | 24 ++++++++-------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 0bd5244e3..0bfe24dca 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -190,22 +190,22 @@ public: //aFatherDO->insertChild(suit_obj, pos); aFatherDO->updateItem(); - /* Define visibility state */ - bool isComponent = dynamic_cast( suit_obj ) != 0; - if ( suit_obj && !isComponent && myStudy->visibilityState( theID.c_str() ) == Qtx::UnpresentableState ) { - QString moduleTitle = ((CAM_Application*)myStudy->application())->moduleTitle(suit_obj->componentDataType()); - if (!moduleTitle.isEmpty()) { - LightApp_Displayer* aDisplayer = LightApp_Displayer::FindDisplayer(moduleTitle,false); - if (aDisplayer) { - if(aDisplayer->canBeDisplayed(theID.c_str())) { - myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState ); //hide the just added object - //MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!"); - } - else - MESSAGE("Object with entry : "<< theID <<" CAN'T be displayed !!!"); - } - } - } + /* Define visibility state */ + bool isComponent = dynamic_cast( suit_obj ) != 0; + if ( suit_obj && !isComponent && myStudy->visibilityState( theID.c_str() ) == Qtx::UnpresentableState ) { + QString moduleTitle = ((CAM_Application*)myStudy->application())->moduleTitle(suit_obj->componentDataType()); + if (!moduleTitle.isEmpty()) { + LightApp_Displayer* aDisplayer = LightApp_Displayer::FindDisplayer(moduleTitle,false); + if (aDisplayer) { + if(aDisplayer->canBeDisplayed(theID.c_str())) { + myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState ); //hide the just added object + //MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!"); + } + else + //MESSAGE("Object with entry : "<< theID <<" CAN'T be displayed !!!"); + } + } + } } // END: work with tree nodes structure else { // BEGIN: work with study structure EntryMapIter it = entry2SuitObject.find( theID ); @@ -335,7 +335,7 @@ public: //MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!"); } else - MESSAGE("Object with entry : "<< theID <<" CAN'T be displayed !!!"); + //MESSAGE("Object with entry : "<< theID <<" CAN'T be displayed !!!"); } } } @@ -344,8 +344,8 @@ public: #ifndef DISABLE_PYCONSOLE case 6: //NoteBook variables were modified { - myStudy->onNoteBookVarUpdate( QString( theID.c_str() ) ); - break; + myStudy->onNoteBookVarUpdate( QString( theID.c_str() ) ); + break; } #endif default:MESSAGE("Unknown event: " << event);break; diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index d84b326b9..021cc2643 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -213,8 +213,8 @@ protected: #endif QString fname = QFileInfo( _fname ).fileName(); if ( exp.exactMatch( fname ) ) { - long fid = Qtx::versionToId( exp.cap( 1 ) ); - if ( fid > 0 ) id = fid; + long fid = Qtx::versionToId( exp.cap( 1 ) ); + if ( fid > 0 ) id = fid; } } return id; @@ -550,8 +550,8 @@ int main( int argc, char **argv ) SALOME::StatSession stat = session->GetStatSession(); shutdownSession = stat.state == SALOME::shutdown; if ( shutdownSession ) { - _SessionMutex.lock(); // lock mutex before leaving loop - it will be unlocked later - break; + _SessionMutex.lock(); // lock mutex before leaving loop - it will be unlocked later + break; } // SUIT_Session creation diff --git a/src/Session/Session_ServerLauncher.cxx b/src/Session/Session_ServerLauncher.cxx index a5ba09822..4cfe26c20 100755 --- a/src/Session/Session_ServerLauncher.cxx +++ b/src/Session/Session_ServerLauncher.cxx @@ -111,8 +111,8 @@ void Session_ServerLauncher::CheckArgs() _argCopy.reserve(_argc); for (int iarg=0; iarg <_argc; iarg++) { - SCRUTE(iarg); - SCRUTE(_argv[iarg]); + //SCRUTE(iarg); + //SCRUTE(_argv[iarg]); _argCopy.push_back(_argv[iarg]); switch (argState) { @@ -124,16 +124,16 @@ void Session_ServerLauncher::CheckArgs() } case 1: // looking for server type { - // Temporary solution - // Issue 21337 - no more SalomeApp_Engine_i activation here - // TODO: To be removed as soon as any trace of SalomeAppEngine - // has been eliminated from KERNEL scripts - if (strcmp(_argv[iarg], "SalomeAppEngine")==0){ - argState = 0; - iarg += 2; // skipping "()" - break; - } - // Temporary solution + // Temporary solution + // Issue 21337 - no more SalomeApp_Engine_i activation here + // TODO: To be removed as soon as any trace of SalomeAppEngine + // has been eliminated from KERNEL scripts + if (strcmp(_argv[iarg], "SalomeAppEngine")==0){ + argState = 0; + iarg += 2; // skipping "()" + break; + } + // Temporary solution for (int i=0; i