mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:15:15 +00:00
UI: TrafListModel: Simplify headerData()
This commit is contained in:
parent
05b8670e50
commit
96cd249c6f
@ -117,7 +117,9 @@ int TrafListModel::columnCount(const QModelIndex &parent) const
|
||||
|
||||
QVariant TrafListModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (orientation == Qt::Horizontal && (role == Qt::DisplayRole || role == Qt::ToolTipRole)) {
|
||||
const bool isDisplayRole = (role == Qt::DisplayRole || role == Qt::ToolTipRole);
|
||||
|
||||
if (orientation == Qt::Horizontal && isDisplayRole) {
|
||||
switch (section) {
|
||||
case 0:
|
||||
return tr("Date");
|
||||
|
Loading…
Reference in New Issue
Block a user