Commit c5c8777e authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'combo-box-editable'

8177fe4f Set combo-box text if it is editable
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !19
parents b5324a21 8177fe4f
......@@ -67,15 +67,13 @@ bool pqComboBoxEventPlayer::playEvent(
comboBox->setCurrentIndex(index);
if (command == "activated")
{
#if QT_VERSION >= 0x050000
emit comboBox->activated(index);
#else
QObject::connect(this, SIGNAL(activated(int)), comboBox, SIGNAL(activated(int)));
emit this->activated(index);
QObject::disconnect(this, SIGNAL(activated(int)), comboBox, SIGNAL(activated(int)));
#endif
}
}
else if (comboBox->isEditable() && command == "editTextChanged")
{
comboBox->setCurrentText(arguments);
}
else
{
QString possibles;
......@@ -89,13 +87,6 @@ bool pqComboBoxEventPlayer::playEvent(
<< possibles;
error = true;
}
if (command == "set_string")
{
// Legacy support
qCritical() << "set_string should be handled by pqAbstractStringEventTranslator already, "
"something hase gone wrong";
error = true;
}
}
return true;
}
......
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