summaryrefslogtreecommitdiff
path: root/ui/qt/sparkline_delegate.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2016-06-25 10:12:21 -0700
committerAnders Broman <a.broman58@gmail.com>2016-06-26 06:23:59 +0000
commit5e8649bd59f2acac3a95c158f2ecba179ef6ae27 (patch)
tree831ca0075092bcf9ba810a289475927d9166d500 /ui/qt/sparkline_delegate.cpp
parent4addfc67b4cd35601d5f9c5ce134f23ea145934a (diff)
downloadwireshark-5e8649bd59f2acac3a95c158f2ecba179ef6ae27.tar.gz
Qt: Don't use QStyleOptionViewItemV4.
It was deprecated in Qt 5.7. Just use QStyleOptionViewItem. Change-Id: I890305a11393940e21bdc68d90ca6602ade16769 Reviewed-on: https://code.wireshark.org/review/16137 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/sparkline_delegate.cpp')
-rw-r--r--ui/qt/sparkline_delegate.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/qt/sparkline_delegate.cpp b/ui/qt/sparkline_delegate.cpp
index 3cc4069192..b4e565cc0d 100644
--- a/ui/qt/sparkline_delegate.cpp
+++ b/ui/qt/sparkline_delegate.cpp
@@ -59,25 +59,25 @@ void SparkLineDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
idx = idx + step_w;
}
- QStyleOptionViewItemV4 optv4 = option;
- QStyledItemDelegate::initStyleOption(&optv4, index);
+ QStyleOptionViewItem option_vi = option;
+ QStyledItemDelegate::initStyleOption(&option_vi, index);
painter->save();
if (QApplication::style()->objectName().contains("vista")) {
// QWindowsVistaStyle::drawControl does this internally. Unfortunately there
// doesn't appear to be a more general way to do this.
- optv4.palette.setColor(QPalette::All, QPalette::HighlightedText, optv4.palette.color(QPalette::Active, QPalette::Text));
+ option_vi.palette.setColor(QPalette::All, QPalette::HighlightedText, option_vi.palette.color(QPalette::Active, QPalette::Text));
}
- QPalette::ColorGroup cg = optv4.state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = option_vi.state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
- if (cg == QPalette::Normal && !(optv4.state & QStyle::State_Active))
+ if (cg == QPalette::Normal && !(option_vi.state & QStyle::State_Active))
cg = QPalette::Inactive;
- if (optv4.state & QStyle::State_Selected) {
- painter->setPen(optv4.palette.color(cg, QPalette::HighlightedText));
+ if (option_vi.state & QStyle::State_Selected) {
+ painter->setPen(option_vi.palette.color(cg, QPalette::HighlightedText));
} else {
- painter->setPen(optv4.palette.color(cg, QPalette::Text));
+ painter->setPen(option_vi.palette.color(cg, QPalette::Text));
}
painter->setRenderHint(QPainter::Antialiasing, true);