DolphinQt: Display game list file sizes with an asterisk when file-size differs from volume-size (e.g. when they are compressed).
This commit is contained in:
parent
ff5e296576
commit
efd5c36773
|
@ -135,7 +135,15 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
|
|||
break;
|
||||
case COL_SIZE:
|
||||
if (role == Qt::DisplayRole)
|
||||
return QString::fromStdString(UICommon::FormatSize(game.GetFileSize()));
|
||||
{
|
||||
std::string str = UICommon::FormatSize(game.GetFileSize());
|
||||
|
||||
// Add asterisk to size of compressed files.
|
||||
if (game.GetFileSize() != game.GetVolumeSize())
|
||||
str += '*';
|
||||
|
||||
return QString::fromStdString(str);
|
||||
}
|
||||
if (role == Qt::InitialSortOrderRole)
|
||||
return static_cast<quint64>(game.GetFileSize());
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue