diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-29 20:23:35 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-29 20:23:41 +0200 |
commit | cde658cb271afb1484ddc89bde6a1979046a239d (patch) | |
tree | e1489987b652b89293e96002779d982b5c41efdb | |
parent | Merge pull request #4600 from lioncash/prototype (diff) | |
download | yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.gz yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.bz2 yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.lz yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.xz yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.tar.zst yuzu-cde658cb271afb1484ddc89bde6a1979046a239d.zip |
-rw-r--r-- | src/yuzu/game_list_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index 0cd0054c8..eb1bf0775 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h @@ -49,10 +49,10 @@ class GameListItem : public QStandardItem { public: // used to access type from item index - static const int TypeRole = Qt::UserRole + 1; - static const int SortRole = Qt::UserRole + 2; + static constexpr int TypeRole = Qt::UserRole + 1; + static constexpr int SortRole = Qt::UserRole + 2; GameListItem() = default; - GameListItem(const QString& string) : QStandardItem(string) { + explicit GameListItem(const QString& string) : QStandardItem(string) { setData(string, SortRole); } }; @@ -65,10 +65,10 @@ public: */ class GameListItemPath : public GameListItem { public: - static const int TitleRole = SortRole + 1; - static const int FullPathRole = SortRole + 2; - static const int ProgramIdRole = SortRole + 3; - static const int FileTypeRole = SortRole + 4; + static constexpr int TitleRole = SortRole + 1; + static constexpr int FullPathRole = SortRole + 2; + static constexpr int ProgramIdRole = SortRole + 3; + static constexpr int FileTypeRole = SortRole + 4; GameListItemPath() = default; GameListItemPath(const QString& game_path, const std::vector<u8>& picture_data, @@ -131,7 +131,7 @@ public: class GameListItemCompat : public GameListItem { Q_DECLARE_TR_FUNCTIONS(GameListItemCompat) public: - static const int CompatNumberRole = SortRole; + static constexpr int CompatNumberRole = SortRole; GameListItemCompat() = default; explicit GameListItemCompat(const QString& compatibility) { setData(type(), TypeRole); @@ -181,7 +181,7 @@ public: */ class GameListItemSize : public GameListItem { public: - static const int SizeRole = SortRole; + static constexpr int SizeRole = SortRole; GameListItemSize() = default; explicit GameListItemSize(const qulonglong size_bytes) { @@ -217,7 +217,7 @@ public: class GameListDir : public GameListItem { public: - static const int GameDirRole = Qt::UserRole + 2; + static constexpr int GameDirRole = Qt::UserRole + 2; explicit GameListDir(UISettings::GameDir& directory, GameListItemType dir_type = GameListItemType::CustomDir) |