GameFile: Use enums for custom/length parameters

This commit is contained in:
JosJuice
2019-09-25 11:36:45 +02:00
parent 59f27ae4e1
commit d8958fbdf7
6 changed files with 32 additions and 18 deletions

View File

@ -73,7 +73,7 @@ QGroupBox* InfoWidget::CreateISODetails()
QLineEdit* country = CreateValueDisplay(DiscIO::GetName(m_game.GetCountry(), true));
const std::string game_maker = m_game.GetMaker(false);
const std::string game_maker = m_game.GetMaker(UICommon::GameFile::Variant::LongAndNotCustom);
QLineEdit* maker =
CreateValueDisplay((game_maker.empty() ? UNKNOWN_NAME.toStdString() : game_maker) + " (" +

View File

@ -442,7 +442,7 @@ void GameList::ExportWiiSave()
for (const auto& game : GetSelectedGames())
{
if (!WiiSave::Export(game->GetTitleID(), export_dir.toStdString()))
failed.push_back(game->GetName(true));
failed.push_back(game->GetName(UICommon::GameFile::Variant::LongAndPossiblyCustom));
}
if (!failed.isEmpty())

View File

@ -124,13 +124,17 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
case COL_DESCRIPTION:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
{
return QString::fromStdString(game.GetDescription(true))
return QString::fromStdString(
game.GetDescription(UICommon::GameFile::Variant::LongAndPossiblyCustom))
.replace(QLatin1Char('\n'), QLatin1Char(' '));
}
break;
case COL_MAKER:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
return QString::fromStdString(game.GetMaker(true));
{
return QString::fromStdString(
game.GetMaker(UICommon::GameFile::Variant::LongAndPossiblyCustom));
}
break;
case COL_FILE_NAME:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)