Commit e9fa8283 authored by Julien Malik's avatar Julien Malik

ENH: do not use Qt fromStdString since it causes runtime issues with VC2010

parent 9355632a
......@@ -58,7 +58,7 @@ void QtWidgetChoiceParameter::DoCreateWidget()
for (unsigned int i = 0; i < m_ChoiceParam->GetNbChoices(); ++i)
{
QString key = QString::fromStdString( m_ChoiceParam->GetChoiceName(i) );
QString key = m_ChoiceParam->GetChoiceName(i).c_str();
m_ComboBox->addItem( key, QVariant(key) );
ParameterGroup::Pointer param = m_ChoiceParam->GetChoiceParameterGroupByIndex(i);
......
......@@ -81,7 +81,7 @@ void QtWidgetComplexInputImageParameter::SetFileName(const QString& value)
m_ComplexInputImageParam->SetFromFileName(value.toStdString());
// notify of value change
QString key( QString::fromStdString(m_ComplexInputImageParam->GetKey()) );
QString key( m_ComplexInputImageParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -93,7 +93,7 @@ void QtWidgetComplexOutputImageParameter::SetFileName(const QString& value)
m_OutputImageParam->SetFileName(m_FileName);
// notify of value change
QString key( QString::fromStdString(m_OutputImageParam->GetKey()) );
QString key( m_OutputImageParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -35,7 +35,7 @@ QtWidgetDirectoryParameter::~QtWidgetDirectoryParameter()
void QtWidgetDirectoryParameter::DoUpdateGUI()
{
// Update the lineEdit
QString text( QString::fromStdString(m_DirectoryParam->GetValue() ));
QString text( m_DirectoryParam->GetValue().c_str() );
m_Input->setText(text);
}
......@@ -83,7 +83,7 @@ void QtWidgetDirectoryParameter::SetFileName(const QString& value)
m_DirectoryParam->SetValue(value.toStdString());
// notify of value change
QString key( QString::fromStdString(m_DirectoryParam->GetKey()) );
QString key( m_DirectoryParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -35,7 +35,7 @@ QtWidgetInputFilenameParameter::~QtWidgetInputFilenameParameter()
void QtWidgetInputFilenameParameter::DoUpdateGUI()
{
// Update the lineEdit
QString text( QString::fromStdString(m_FilenameParam->GetValue() ));
QString text( m_FilenameParam->GetValue().c_str() );
m_Input->setText(text);
}
......@@ -98,7 +98,7 @@ void QtWidgetInputFilenameParameter::SetFileName(const QString& value)
m_FilenameParam->SetValue(value.toStdString());
// notify of value change
QString key( QString::fromStdString(m_FilenameParam->GetKey()) );
QString key( m_FilenameParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -267,7 +267,7 @@ QtWidgetInputImageListParameter::UpdateFileList( std::map<unsigned int, unsigned
this->update();
// notify of value change
QString key( QString::fromStdString(m_InputImageListParam->GetKey()) );
QString key( m_InputImageListParam->GetKey() );
emit ParameterChanged(key);
}
......@@ -366,7 +366,7 @@ void QtWidgetInputImageListParameter::RecreateImageList()
emit Change();
// notify of value change
QString key( QString::fromStdString(m_InputImageListParam->GetKey()) );
QString key( m_InputImageListParam->GetKey() );
emit ParameterChanged(key);
}
}
......
......@@ -87,7 +87,7 @@ bool QtWidgetInputImageParameter::SetFileName(const QString& value)
if(m_InputImageParam->SetFromFileName(value.toStdString()) == true )
{
// notify of value change
QString key( QString::fromStdString(m_InputImageParam->GetKey()) );
QString key( m_InputImageParam->GetKey() );
emit ParameterChanged(key);
}
else
......
......@@ -263,7 +263,7 @@ QtWidgetInputVectorDataListParameter::UpdateFileList( std::map<unsigned int, uns
this->update();
// notify of value change
QString key(QString::fromStdString(m_InputVectorDataListParam->GetKey()));
QString key( m_InputVectorDataListParam->GetKey() );
emit ParameterChanged(key);
}
......@@ -361,7 +361,7 @@ void QtWidgetInputVectorDataListParameter::RecreateVectorDataList()
emit Change();
// notify of value change
QString key(QString::fromStdString(m_InputVectorDataListParam->GetKey()));
QString key( m_InputVectorDataListParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -88,7 +88,7 @@ bool QtWidgetInputVectorDataParameter::SetFileName(const QString& value)
if(m_InputVectorDataParam->SetFromFileName(value.toStdString()) == true )
{
// notify of value change
QString key( QString::fromStdString(m_InputVectorDataParam->GetKey()) );
QString key( m_InputVectorDataParam->GetKey() );
emit ParameterChanged(key);
}
else
......
......@@ -46,7 +46,7 @@ void QtWidgetListViewParameter::DoUpdateGUI()
for (unsigned int i = 0; i < m_ListViewParam->GetNbChoices(); ++i)
{
// Add listBox items
QString key = QString::fromStdString( m_ListViewParam->GetChoiceKey(i) );
QString key = m_ListViewParam->GetChoiceKey(i).c_str();
m_ListView->addItem( key);
}
......
......@@ -35,7 +35,7 @@ QtWidgetOutputFilenameParameter::~QtWidgetOutputFilenameParameter()
void QtWidgetOutputFilenameParameter::DoUpdateGUI()
{
// Update the lineEdit
QString text( QString::fromStdString(m_FilenameParam->GetValue() ));
QString text( m_FilenameParam->GetValue().c_str() );
m_Input->setText(text);
}
......@@ -98,7 +98,7 @@ void QtWidgetOutputFilenameParameter::SetFileName(const QString& value)
m_FilenameParam->SetValue(value.toStdString());
// notify of value change
QString key( QString::fromStdString(m_FilenameParam->GetKey()) );
QString key( m_FilenameParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -98,7 +98,7 @@ void QtWidgetOutputImageParameter::SetFileName(const QString& value)
m_OutputImageParam->SetFileName(m_FileName);
// notify of value change
QString key( QString::fromStdString(m_OutputImageParam->GetKey()) );
QString key( m_OutputImageParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -82,7 +82,7 @@ void QtWidgetOutputVectorDataParameter::SetFileName(const QString& value)
m_OutputVectorDataParam->SetFileName(m_FileName);
// notify of value change
QString key( QString::fromStdString(m_OutputVectorDataParam->GetKey()) );
QString key( m_OutputVectorDataParam->GetKey() );
emit ParameterChanged(key);
}
......
......@@ -278,7 +278,7 @@ QtWidgetStringListParameter::UpdateStringList( std::map<unsigned int, unsigned i
this->update();
// notify of value change
QString key( QString::fromStdString(m_StringListParam->GetKey()) );
QString key( m_StringListParam->GetKey() );
emit ParameterChanged(key);
}
......@@ -287,7 +287,7 @@ void QtWidgetStringListParameter::SetString(const QString& value)
{
m_StringListParam->AddString(value.toStdString());
m_StringListParam->SetUserValue(true);
QString key( QString::fromStdString(m_StringListParam->GetKey()) );
QString key( m_StringListParam->GetKey() );
emit ParameterChanged(key);
}
......@@ -383,7 +383,7 @@ void QtWidgetStringListParameter::RecreateStringList()
emit Change();
// notify of value change
QString key( QString::fromStdString(m_StringListParam->GetKey()) );
QString key( m_StringListParam->GetKey() );
emit ParameterChanged(key);
}
}
......
......@@ -38,7 +38,7 @@ void QtWidgetStringParameter::DoUpdateGUI()
m_Input->setToolTip(m_StringParam->GetDescription());
// Update the lineEdit
QString text( QString::fromStdString(m_StringParam->GetValue() ));
QString text( m_StringParam->GetValue().c_str() );
m_Input->setText(text);
}
......@@ -68,7 +68,7 @@ void QtWidgetStringParameter::SetValue(const QString& value)
{
m_StringParam->SetValue(value.toStdString());
m_StringParam->SetUserValue(true);
QString key( QString::fromStdString(m_StringParam->GetKey()) );
QString key( m_StringParam->GetKey() );
emit ParameterChanged(key);
}
......
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