From 41fdc1cad1777aeb4569c49a72d28b6a3b099093 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 14 Apr 2013 19:50:15 +0200 Subject: [PATCH] overviewpage: make some code Qt5 compatible - that changes will be fine for Qt4 also --- src/qt/overviewpage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 528c93bd..ad2d682b 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -46,9 +46,10 @@ public: bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool(); QVariant value = index.data(Qt::ForegroundRole); QColor foreground = option.palette.color(QPalette::Text); - if(qVariantCanConvert(value)) + if(value.canConvert()) { - foreground = qvariant_cast(value); + QBrush brush = qvariant_cast(value); + foreground = brush.color(); } painter->setPen(foreground);