From 7d2cc9900c6fda1a1b7caec6498b5792143fca4a Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Sat, 12 Sep 2020 13:19:06 +0200 Subject: [PATCH] fix warnings on Qt connect --- src/HYDROGUI/HYDROGUI_Operation.cxx | 15 +++++++++++---- src/HYDROGUI/HYDROGUI_Overview.cxx | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_Operation.cxx b/src/HYDROGUI/HYDROGUI_Operation.cxx index aeb8e452..90340106 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.cxx +++ b/src/HYDROGUI/HYDROGUI_Operation.cxx @@ -40,6 +40,9 @@ #include +#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; } diff --git a/src/HYDROGUI/HYDROGUI_Overview.cxx b/src/HYDROGUI/HYDROGUI_Overview.cxx index 354e7e23..b6dd6ee8 100644 --- a/src/HYDROGUI/HYDROGUI_Overview.cxx +++ b/src/HYDROGUI/HYDROGUI_Overview.cxx @@ -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* ) ), -- 2.39.2