From 8438506206af6f9bb7bcf2303d55913edb5579a0 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 21 Oct 2022 23:32:52 +1000 Subject: [PATCH] Qt: Crash fix --- src/duckstation-qt/gamelistmodel.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/duckstation-qt/gamelistmodel.cpp b/src/duckstation-qt/gamelistmodel.cpp index 96b1d11d1..c54f3fd19 100644 --- a/src/duckstation-qt/gamelistmodel.cpp +++ b/src/duckstation-qt/gamelistmodel.cpp @@ -15,8 +15,8 @@ #include static constexpr std::array s_column_names = { - {"Type", "Serial", "Title", "File Title", "Developer", "Publisher", "Genre", "Year", "Players", "Size", "Region", - "Compatibility", "Cover"}}; + {"Type", "Serial", "Title", "File Title", "Developer", "Publisher", "Genre", "Year", "Players", "Time Played", + "Last Played", "Size", "Region", "Compatibility", "Cover"}}; static constexpr int COVER_ART_WIDTH = 512; static constexpr int COVER_ART_HEIGHT = 512; @@ -302,12 +302,12 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const return QString("%1 MB").arg(static_cast(ge->total_size) / 1048576.0, 0, 'f', 2); case Column_TimePlayed: - { - if (ge->total_played_time == 0) - return {}; - else - return QtUtils::StringViewToQString(GameList::FormatTimespan(ge->total_played_time)); - } + { + if (ge->total_played_time == 0) + return {}; + else + return QtUtils::StringViewToQString(GameList::FormatTimespan(ge->total_played_time)); + } case Column_LastPlayed: return QtUtils::StringViewToQString(GameList::FormatTimestamp(ge->last_played_time));