diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/show_packet_bytes_dialog.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 62a6e03de7..a5c5a77069 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -161,7 +161,11 @@ void FollowStreamDialog::addCodecs(const QMap<QString, QTextCodec *> &codecMap) // Make the combobox respect max visible items? //ui->cbCharset->setStyleSheet("QComboBox { combobox-popup: 0;}"); ui->cbCharset->insertSeparator(ui->cbCharset->count()); +#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) for (const auto &codec : qAsConst(codecMap)) { +#else + foreach (const QTextCodec *codec, codecMap) { +#endif // This is already in the menu and handled separately if (codec->name() != "US-ASCII" && codec->name() != "UTF-8") ui->cbCharset->addItem(tr(codec->name()), SHOW_CODEC); diff --git a/ui/qt/show_packet_bytes_dialog.cpp b/ui/qt/show_packet_bytes_dialog.cpp index 6b6d6da09b..ce800c6236 100644 --- a/ui/qt/show_packet_bytes_dialog.cpp +++ b/ui/qt/show_packet_bytes_dialog.cpp @@ -107,7 +107,11 @@ void ShowPacketBytesDialog::addCodecs(const QMap<QString, QTextCodec *> &codecMa // Make the combobox respect max visible items? //ui->cbShowAs->setStyleSheet("QComboBox { combobox-popup: 0;}"); ui->cbShowAs->insertSeparator(ui->cbShowAs->count()); +#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) for (const auto &codec : qAsConst(codecMap)) { +#else + foreach (const QTextCodec *codec, codecMap) { +#endif // This is already placed in the menu and handled separately if (codec->name() != "US-ASCII" && codec->name() != "UTF-8") ui->cbShowAs->addItem(tr(codec->name()), ShowAsCodec); |