Fixes in model set form as described by RP

https://swift-project.slack.com/archives/G96QTUBEG/p1544353355002400

* fixed missing radio button groups
* return values for some functions to detect "changes"
* minor style fixes
This commit is contained in:
Klaus Basan
2018-12-10 01:35:04 +01:00
parent 9b06a159f2
commit 9f408e8319
9 changed files with 176 additions and 115 deletions

View File

@@ -49,7 +49,7 @@ namespace BlackGui
QVariant CListModelDbObjects<ObjectType, ContainerType, KeyType, UseCompare>::data(const QModelIndex &index, int role) const
{
if (role != Qt::BackgroundRole) { return CListModelBase<ObjectType, ContainerType, UseCompare>::data(index, role); }
if (isHighlightedIndex(index)) { return QBrush(m_highlightColor); }
if (isHighlightedIndex(index) ) { return QBrush(m_highlightColor); }
return CListModelBase<ObjectType, ContainerType, UseCompare>::data(index, role);
}
@@ -91,10 +91,10 @@ namespace BlackGui
}
template <typename ObjectType, typename ContainerType, typename KeyType, bool UseCompare>
void COrderableListModelDbObjects<ObjectType, ContainerType, KeyType, UseCompare>::setSortColumnToOrder()
bool COrderableListModelDbObjects<ObjectType, ContainerType, KeyType, UseCompare>::setSortColumnToOrder()
{
// force sorted by order, otherwise display looks confusing
this->setSorting(IOrderable::IndexOrder);
return this->setSorting(IOrderable::IndexOrder);
}
template <typename ObjectType, typename ContainerType, typename KeyType, bool UseCompare>