From 43833239fc2fc0e109743abc69dd39226b0caf7b Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Mon, 15 Jan 2018 08:53:55 +0100 Subject: Qt: change obsolete qVariantFromValue into QVariant::fromValue. Change-Id: I767b06c0e316347cdb28b769f1032e6d44cba45b Reviewed-on: https://code.wireshark.org/review/25321 Petri-Dish: Roland Knall Tested-by: Roland Knall Reviewed-by: Roland Knall Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/widgets/byte_view_text.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui/qt/widgets/byte_view_text.cpp') diff --git a/ui/qt/widgets/byte_view_text.cpp b/ui/qt/widgets/byte_view_text.cpp index 232ee46f8a..d38dd62bc8 100644 --- a/ui/qt/widgets/byte_view_text.cpp +++ b/ui/qt/widgets/byte_view_text.cpp @@ -84,13 +84,13 @@ void ByteViewText::createContextMenu() QActionGroup * format_actions = new QActionGroup(this); action = format_actions->addAction(tr("Show bytes as hexadecimal")); - action->setData(qVariantFromValue(BYTES_HEX)); + action->setData(QVariant::fromValue(BYTES_HEX)); action->setCheckable(true); if (recent.gui_bytes_view == BYTES_HEX) { action->setChecked(true); } action = format_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as bits")); - action->setData(qVariantFromValue(BYTES_BITS)); + action->setData(QVariant::fromValue(BYTES_BITS)); action->setCheckable(true); if (recent.gui_bytes_view == BYTES_BITS) { action->setChecked(true); @@ -103,19 +103,19 @@ void ByteViewText::createContextMenu() QActionGroup * encoding_actions = new QActionGroup(this); action = encoding_actions->addAction(tr("Show text based on packet")); - action->setData(qVariantFromValue(BYTES_ENC_FROM_PACKET)); + action->setData(QVariant::fromValue(BYTES_ENC_FROM_PACKET)); action->setCheckable(true); if (recent.gui_bytes_encoding == BYTES_ENC_FROM_PACKET) { action->setChecked(true); } action = encoding_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as ASCII")); - action->setData(qVariantFromValue(BYTES_ENC_ASCII)); + action->setData(QVariant::fromValue(BYTES_ENC_ASCII)); action->setCheckable(true); if (recent.gui_bytes_encoding == BYTES_ENC_ASCII) { action->setChecked(true); } action = encoding_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as EBCDIC")); - action->setData(qVariantFromValue(BYTES_ENC_EBCDIC)); + action->setData(QVariant::fromValue(BYTES_ENC_EBCDIC)); action->setCheckable(true); if (recent.gui_bytes_encoding == BYTES_ENC_EBCDIC) { action->setChecked(true); -- cgit v1.2.3