Permalink
Browse files

Qt: Show disc number

  • Loading branch information...
spycrab committed May 4, 2018
1 parent 00de41b commit 67f874250aebb57b0ef69071b54200952f6b1404
Showing with 12 additions and 1 deletion.
  1. +12 −1 Source/Core/DolphinQt2/GameList/GameListModel.cpp
@@ -74,7 +74,18 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
break;
case COL_TITLE:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
return QString::fromStdString(game.GetName());
{
QString name = QString::fromStdString(game.GetName());
const int disc_nr = game.GetDiscNumber() + 1;
if (disc_nr > 1)
{
if (!name.contains(QRegExp(QStringLiteral("disc ?%1").arg(disc_nr), Qt::CaseInsensitive)))
{
name.append(tr(" (Disc %1)").arg(disc_nr));
}
}
return name;
}
break;
case COL_ID:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)

0 comments on commit 67f8742

Please sign in to comment.