QFileSystemModel: properly align file size column

The file size column was not properly horizontally aligned. The model
only returned Qt::AlignRight with no horizontal alignment. This lead
to a top alignment within QStyle::alignedRect().

Task-number: QTBUG-64098
Change-Id: Iaef30200a63bd0975c88a67d0af2eb1d5254f588
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Christian Ehrlicher 2017-12-10 18:06:05 +01:00
parent e055efb445
commit eff7a5f38c

View File

@ -747,7 +747,7 @@ QVariant QFileSystemModel::data(const QModelIndex &index, int role) const
break;
case Qt::TextAlignmentRole:
if (index.column() == 1)
return Qt::AlignRight;
return QVariant(Qt::AlignTrailing | Qt::AlignVCenter);
break;
case FilePermissions:
int p = permissions(index);