From a9067e3479dffa5e3e18d42be7c3863eb19415ef Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@orfeo-toolbox.org> Date: Mon, 28 Mar 2011 17:18:26 +0200 Subject: [PATCH] COMP: Fixing compilation errors --- .../QtWidget/otbWrapperQtWidgetIntParameterFactory.cxx | 10 ++++++---- .../QtWidget/otbWrapperQtWidgetParameterFactory.cxx | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameterFactory.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameterFactory.cxx index d455ae79d2..3840d6f60e 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameterFactory.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameterFactory.cxx @@ -32,13 +32,13 @@ QtWidgetIntParameterFactory::QtWidgetIntParameterFactory() QtWidgetIntParameterFactory::~QtWidgetIntParameterFactory() {} -static QWidget * QtWidgetIntParameterFactory::CreateQtWidget(Parameter * param) +QWidget * QtWidgetIntParameterFactory::CreateQtWidget(Parameter * param) { // Try to cast to int parameter IntParameter * intParam = dynamic_cast<IntParameter *>(param); // Check if dynamic cast succeeds - if(param.IsNull()) + if(!param) { return 0; } @@ -50,9 +50,9 @@ static QWidget * QtWidgetIntParameterFactory::CreateQtWidget(Parameter * param) QSpinBox* input = new QSpinBox; input->setRange(intParam->GetMinimumValue(), intParam->GetMaximumValue()); - input->setToolTip(intParam->GetDescription().c_str()); + input->setToolTip(intParam->GetDescription()); - QString optionID(intParam->GetName().c_str()); + QString optionID(intParam->GetName()); hLayout->addWidget(input); hLayout->addStretch(); @@ -61,3 +61,5 @@ static QWidget * QtWidgetIntParameterFactory::CreateQtWidget(Parameter * param) paramHGroup->setLayout(hLayout); return paramHGroup; } +} +} diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx index 4a200434ec..5914eb16e7 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx @@ -20,6 +20,7 @@ //#include "otbWrapperQtWidgetNumericalParameterFactory.h" #include "otbWrapperQtWidgetEmptyParameterFactory.h" +#include "otbWrapperQtWidgetIntParameterFactory.h" //#include "otbWrapperQtWidgetStringParameterFactory.h" //#include "otbWrapperQtWidgetChoiceParameterFactory.h" -- GitLab