Salome HOME
fix warnings on Qt connect
authorPaul RASCLE <paul.rascle@openfields.fr>
Sat, 12 Sep 2020 11:19:06 +0000 (13:19 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:08:09 +0000 (17:08 +0100)
src/HYDROGUI/HYDROGUI_Operation.cxx
src/HYDROGUI/HYDROGUI_Overview.cxx

index aeb8e4527e2068a4ae2fecd5e1410ef536485ea7..90340106c13cf39ad60f30c967a1165ebc7f114f 100644 (file)
@@ -40,6 +40,9 @@
 
 #include <QApplication>
 
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
 HYDROGUI_Operation::HYDROGUI_Operation( HYDROGUI_Module* theModule )
 : LightApp_Operation(),
   myModule( theModule ),
@@ -72,13 +75,17 @@ const QString& HYDROGUI_Operation::getName() const
 
 HYDROGUI_InputPanel* HYDROGUI_Operation::inputPanel() const
 {
+  DEBTRACE("inputPanel");
   if( !myPanel )
   {
     ( ( HYDROGUI_Operation* )this )->myPanel = createInputPanel();
-    connect( myPanel, SIGNAL( panelApplyAndClose() ), this, SLOT( onApplyAndClose() ) );
-    connect( myPanel, SIGNAL( panelApply() ),  this, SLOT( onApply() ) );
-    connect( myPanel, SIGNAL( panelCancel() ), this, SLOT( onCancel() ) );
-    connect( myPanel, SIGNAL( panelHelp() ), this, SLOT( onHelp() ) );
+    if (myPanel)
+    {
+               connect( myPanel, SIGNAL( panelApplyAndClose() ), this, SLOT( onApplyAndClose() ) );
+               connect( myPanel, SIGNAL( panelApply() ),  this, SLOT( onApply() ) );
+               connect( myPanel, SIGNAL( panelCancel() ), this, SLOT( onCancel() ) );
+               connect( myPanel, SIGNAL( panelHelp() ), this, SLOT( onHelp() ) );
+    }
   }
   return myPanel;
 }
index 354e7e23dccb1aee0c8e184a54d4a8f5cb748d8d..b6dd6ee800aa326d28ced970c22c0aa4edaa66d8 100644 (file)
@@ -333,7 +333,6 @@ void HYDROGUI_Overview::setMainView( OCCViewer_ViewFrame* theMainView )
            this,       SLOT( OnTransformation() ) ); 
 
   connect( myMainView, SIGNAL(destroyed()),  this,  SLOT( onMainViewDestr() ) );
-  connect( myViewPort, SIGNAL(destroyed()),  this,  SLOT( onViewPortDestr() ) );
 
   if( !myViewPort )
   {
@@ -343,6 +342,7 @@ void HYDROGUI_Overview::setMainView( OCCViewer_ViewFrame* theMainView )
     {
       myViewPort->setBackgroundColor( myMainView->getViewPort()->backgroundColor() );
 
+      connect( myViewPort, SIGNAL(destroyed()),  this,  SLOT( onViewPortDestr() ) );
       connect( myViewPort, SIGNAL( vpMouseEvent( QMouseEvent* ) ), 
               this,       SLOT( OnMouseEvent( QMouseEvent* ) ) );
       connect( myViewPort, SIGNAL( vpResizeEvent( QResizeEvent* ) ),