From 9504aa19d53d1e4ebec23ef07031832938cd365f Mon Sep 17 00:00:00 2001 From: zhupengfei Date: Sat, 26 May 2018 22:27:59 +0800 Subject: [PATCH] game_list: rewrite format --- src/citra_qt/game_list_p.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/citra_qt/game_list_p.h b/src/citra_qt/game_list_p.h index c0a71df09..1546709aa 100644 --- a/src/citra_qt/game_list_p.h +++ b/src/citra_qt/game_list_p.h @@ -173,7 +173,7 @@ public: &extension); QString title = data(TitleRole).toString(); QString second_name = QString::fromStdString(filename + extension); - QRegExp installed_system_pattern( + static QRegExp installed_system_pattern( QString::fromStdString( FileUtil::GetUserPath(D_SDMC_IDX) + "Nintendo " @@ -182,9 +182,10 @@ public: .replace("\\", "\\\\")); if (installed_system_pattern.exactMatch(QString::fromStdString(path))) { // Use a different mechanism for system / installed titles showing program ID - second_name = "000" + - QString::number(data(ProgramIdRole).toULongLong(), 16).toUpper() + - "-" + QString::fromStdString(filename); + second_name = QString("%1-%2") + .arg(data(ProgramIdRole).toULongLong(), 16, 16, QChar('0')) + .toUpper() + .arg(QString::fromStdString(filename)); } return title + (title.isEmpty() ? "" : "\n ") + second_name; } else {