diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-08-13 13:10:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-13 13:10:58 +0100 |
commit | a44cb6430eac81e6e89283c50b57142ca7f05747 (patch) | |
tree | f51678d129432b0a68d22de0178ccb8fd4f9a927 /launcher/translations/TranslationsModel.cpp | |
parent | 44153a28e369943ea16545146fec81f7a62e44dd (diff) | |
parent | 35358f8180468af1572c35425b1f60c899d6b07d (diff) | |
download | PrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.tar.gz PrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.tar.bz2 PrismLauncher-a44cb6430eac81e6e89283c50b57142ca7f05747.zip |
Merge pull request #1107 from Ryex/chore/add-compiler-warnings
Introduce more strict compiler warnings and fix them
Diffstat (limited to 'launcher/translations/TranslationsModel.cpp')
-rw-r--r-- | launcher/translations/TranslationsModel.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp index 2763cca2..4c633e15 100644 --- a/launcher/translations/TranslationsModel.cpp +++ b/launcher/translations/TranslationsModel.cpp @@ -268,14 +268,11 @@ void readIndex(const QString & path, QMap<QString, Language>& languages) try { data = FS::read(path); - } - catch (const Exception &e) - { + } catch ([[maybe_unused]] const Exception& e) { qCritical() << "Translations Download Failed: index file not readable"; return; } - int index = 1; try { auto toplevel_doc = Json::requireDocument(data); @@ -308,11 +305,8 @@ void readIndex(const QString & path, QMap<QString, Language>& languages) lang.file_size = Json::requireInteger(langObj, "size"); languages.insert(lang.key, lang); - index++; } - } - catch (Json::JsonException & e) - { + } catch ([[maybe_unused]] Json::JsonException& e) { qCritical() << "Translations Download Failed: index file could not be parsed as json"; } } @@ -502,12 +496,12 @@ QVariant TranslationsModel::headerData(int section, Qt::Orientation orientation, return QAbstractListModel::headerData(section, orientation, role); } -int TranslationsModel::rowCount(const QModelIndex& parent) const +int TranslationsModel::rowCount([[maybe_unused]] const QModelIndex& parent) const { return d->m_languages.size(); } -int TranslationsModel::columnCount(const QModelIndex& parent) const +int TranslationsModel::columnCount([[maybe_unused]] const QModelIndex& parent) const { return 2; } |