summaryrefslogtreecommitdiff
path: root/ui/qt/sequence_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-05-31 08:24:12 -0700
committerGerald Combs <gerald@wireshark.org>2016-05-31 16:18:12 +0000
commitf786c7a3838f75c7363d5a6f5a3ebb1c4e3daa85 (patch)
tree7bb755dd36b074e6365b4a9d4ff404d641981210 /ui/qt/sequence_dialog.cpp
parent5e9b5d94c148572edf047eb715fbee5cca47ef2d (diff)
downloadwireshark-f786c7a3838f75c7363d5a6f5a3ebb1c4e3daa85.tar.gz
Qt: Fix compilation for Qt 4.
QString::toHtmlEscaped was introduced in Qt 5. Change-Id: I50b2df2f6ef441ec95972173a852d7950aedc028 Reviewed-on: https://code.wireshark.org/review/15644 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/sequence_dialog.cpp')
-rw-r--r--ui/qt/sequence_dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp
index 22f2706699..27d45f4048 100644
--- a/ui/qt/sequence_dialog.cpp
+++ b/ui/qt/sequence_dialog.cpp
@@ -292,8 +292,12 @@ void SequenceDialog::mouseMoved(QMouseEvent *event)
seq_analysis_item_t *sai = seq_diagram_->itemForPosY(event->pos().y());
if (sai) {
packet_num_ = sai->frame_number;
- QString raw_comment = sai->comment;
- hint = QString("Packet %1: %2").arg(packet_num_).arg(raw_comment.toHtmlEscaped());
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ QString raw_comment = Qt::escape(sai->comment);
+#else
+ QString raw_comment = QString(sai->comment).toHtmlEscaped();
+#endif
+ hint = QString("Packet %1: %2").arg(packet_num_).arg(raw_comment);
}
}