aboutsummaryrefslogtreecommitdiff
path: root/launcher/translations
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/translations')
-rw-r--r--launcher/translations/POTranslator.cpp2
-rw-r--r--launcher/translations/TranslationsModel.cpp14
2 files changed, 5 insertions, 11 deletions
diff --git a/launcher/translations/POTranslator.cpp b/launcher/translations/POTranslator.cpp
index c77ae45d..910a7f2c 100644
--- a/launcher/translations/POTranslator.cpp
+++ b/launcher/translations/POTranslator.cpp
@@ -334,7 +334,7 @@ POTranslator::~POTranslator()
delete d;
}
-QString POTranslator::translate(const char* context, const char* sourceText, const char* disambiguation, int n) const
+QString POTranslator::translate(const char* context, const char* sourceText, const char* disambiguation, [[maybe_unused]] int n) const
{
if(disambiguation)
{
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;
}