diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-11-29 03:00:34 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-11-29 03:53:26 +0000 |
commit | e29378b030dc58948263abead03f7e1a49e3f415 (patch) | |
tree | 236466c3345fe43230972f21636993929d561857 | |
parent | 18b240d7d2d8a138a1837dcbcd3b0706353a007f (diff) |
Qt: fix role check in AStringListListUrlProxyModel::data
Change-Id: I7c683449155f7dcb63731e6575cf92c30be78934
Fixes: v2.5.0rc0-1841-gd865871627 ("Qt: About Dialog move to QTreeView and fix copy")
Reviewed-on: https://code.wireshark.org/review/24637
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | ui/qt/models/astringlist_list_model.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/models/astringlist_list_model.cpp b/ui/qt/models/astringlist_list_model.cpp index 8da5a3b0a4..87c9cf84aa 100644 --- a/ui/qt/models/astringlist_list_model.cpp +++ b/ui/qt/models/astringlist_list_model.cpp @@ -175,7 +175,7 @@ QVariant AStringListListUrlProxyModel::data(const QModelIndex &index, int role) if ( urls_.contains(index.column()) ) { - if ( Qt::ForegroundRole ) + if ( role == Qt::ForegroundRole ) { if ( result.canConvert(QVariant::Brush) ) { @@ -183,7 +183,7 @@ QVariant AStringListListUrlProxyModel::data(const QModelIndex &index, int role) selected.setColor(QApplication::palette().link().color()); return selected; } - } else if ( Qt::TextColorRole ) { + } else if ( role == Qt::TextColorRole ) { return QApplication::palette().link().color(); } } |