aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/models')
-rw-r--r--ui/qt/models/astringlist_list_model.cpp17
-rw-r--r--ui/qt/models/profile_model.cpp2
2 files changed, 6 insertions, 13 deletions
diff --git a/ui/qt/models/astringlist_list_model.cpp b/ui/qt/models/astringlist_list_model.cpp
index 9d91fea9b3..2a66071949 100644
--- a/ui/qt/models/astringlist_list_model.cpp
+++ b/ui/qt/models/astringlist_list_model.cpp
@@ -266,19 +266,12 @@ QVariant AStringListListUrlProxyModel::data(const QModelIndex &index, int role)
{
QVariant result = QIdentityProxyModel::data(index, role);
- if (urls_.contains(index.column()))
+ if (role == Qt::ForegroundRole && urls_.contains(index.column())
+ && result.canConvert(QVariant::Brush))
{
- if (role == Qt::ForegroundRole)
- {
- if (result.canConvert(QVariant::Brush))
- {
- QBrush selected = result.value<QBrush>();
- selected.setColor(ColorUtils::themeLinkBrush().color());
- return selected;
- }
- } else if (role == Qt::TextColorRole) {
- return QApplication::palette().link().color();
- }
+ QBrush selected = result.value<QBrush>();
+ selected.setColor(ColorUtils::themeLinkBrush().color());
+ return selected;
}
return result;
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp
index ae6284d0b8..68079b1b00 100644
--- a/ui/qt/models/profile_model.cpp
+++ b/ui/qt/models/profile_model.cpp
@@ -582,7 +582,7 @@ QVariant ProfileModel::data(const QModelIndex &index, int role) const
return dataDisplay(index);
case Qt::FontRole:
return dataFontRole(index);
- case Qt::BackgroundColorRole:
+ case Qt::BackgroundRole:
return dataBackgroundRole(index);
case Qt::ToolTipRole:
return dataToolTipRole(index);