diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-12-10 21:44:12 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-12-10 21:44:12 +0000 |
commit | c8c5ea164720a04ff5eb33bc2ac92560df74bb0f (patch) | |
tree | d70fcbbdc328daf3de833dd5b3cf164f84b617cc /ui/qt/decode_as_dialog.cpp | |
parent | ed80d7a807b130348114cf24ab7611b65f5b4a31 (diff) | |
download | wireshark-c8c5ea164720a04ff5eb33bc2ac92560df74bb0f.tar.gz |
QComboBox::setCurrentText() exits in Qt3 and Qt5 but not Qt4.
svn path=/trunk/; revision=53920
Diffstat (limited to 'ui/qt/decode_as_dialog.cpp')
-rw-r--r-- | ui/qt/decode_as_dialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/decode_as_dialog.cpp b/ui/qt/decode_as_dialog.cpp index b6125d41ea..19e4d3f47c 100644 --- a/ui/qt/decode_as_dialog.cpp +++ b/ui/qt/decode_as_dialog.cpp @@ -244,7 +244,7 @@ void DecodeAsDialog::on_decodeAsTreeWidget_itemActivated(QTreeWidgetItem *item, selector_combo_box_ = new QComboBox(); selector_combo_box_->setEditable(true); - selector_combo_box_->setCurrentText(item->text(selector_col_)); + selector_combo_box_->lineEdit()->setText(item->text(selector_col_)); connect(selector_combo_box_, SIGNAL(destroyed()), this, SLOT(selectorDestroyed())); connect(selector_combo_box_, SIGNAL(editTextChanged(QString)), this, SLOT(selectorEditTextChanged(QString))); @@ -258,7 +258,7 @@ void DecodeAsDialog::on_decodeAsTreeWidget_itemActivated(QTreeWidgetItem *item, this, SLOT(curProtoCurrentIndexChanged(const QString &))); connect(cur_proto_combo_box_, SIGNAL(destroyed()), this, SLOT(curProtoDestroyed())); - table_names_combo_box_->setCurrentText(current_text); + table_names_combo_box_->setCurrentIndex(table_names_combo_box_->findText(current_text)); tableNamesCurrentIndexChanged(current_text); connect(table_names_combo_box_, SIGNAL(currentIndexChanged(const QString &)), @@ -450,7 +450,7 @@ void DecodeAsDialog::tableNamesCurrentIndexChanged(const QString &text) cur_proto_combo_box_->addItem(DECODE_AS_NONE); cur_proto_combo_box_->insertSeparator(cur_proto_combo_box_->count()); cur_proto_combo_box_->addItems(proto_list); - cur_proto_combo_box_->setCurrentText(current_text); + cur_proto_combo_box_->setCurrentIndex(cur_proto_combo_box_->findText(current_text)); } void DecodeAsDialog::selectorDestroyed() |