Commit 0f874ef7 authored by Julien Michel's avatar Julien Michel

COV: Fixing coverity issues in QtWidget

parent 20670d79
......@@ -28,6 +28,7 @@ namespace Wrapper
{
QtWidgetProgressReport::QtWidgetProgressReport(QtWidgetModel * model)
: m_CurrentProcess()
{
m_Model = model;
connect(model, SIGNAL(SetProgressReportBegin()), this, SLOT(show()) );
......@@ -61,11 +62,14 @@ QtWidgetProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
{
if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
{
const AddProcessToWatchEvent* eventToWacth = dynamic_cast< const AddProcessToWatchEvent*> ( &event );
m_CurrentProcess = eventToWacth->GetProcess();
m_CurrentDescription = eventToWacth->GetProcessDescription();
emit AddNewProcessToReport();
const AddProcessToWatchEvent* eventToWatch = dynamic_cast< const AddProcessToWatchEvent*> ( &event );
if(eventToWatch)
{
m_CurrentProcess = eventToWatch->GetProcess();
m_CurrentDescription = eventToWatch->GetProcessDescription();
emit AddNewProcessToReport();
}
}
}
......
......@@ -28,6 +28,7 @@ namespace Wrapper
{
QtWidgetSimpleProgressReport::QtWidgetSimpleProgressReport(QtWidgetModel * model)
: m_CurrentProcess()
{
m_Model = model;
connect(model, SIGNAL(SetProgressReportBegin()), this, SLOT(show()) );
......@@ -68,11 +69,14 @@ QtWidgetSimpleProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
{
if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
{
const AddProcessToWatchEvent* eventToWacth = dynamic_cast< const AddProcessToWatchEvent*> ( &event );
m_CurrentProcess = eventToWacth->GetProcess();
m_CurrentDescription = eventToWacth->GetProcessDescription();
emit AddNewProcessToReport();
const AddProcessToWatchEvent* eventToWatch = dynamic_cast< const AddProcessToWatchEvent*> ( &event );
if(eventToWatch)
{
m_CurrentProcess = eventToWatch->GetProcess();
m_CurrentDescription = eventToWatch->GetProcessDescription();
emit AddNewProcessToReport();
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment