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.cpp12
2 files changed, 5 insertions, 9 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 6054b4b6..70d8726e 100644
--- a/launcher/translations/TranslationsModel.cpp
+++ b/launcher/translations/TranslationsModel.cpp
@@ -267,9 +267,7 @@ 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;
}
@@ -307,9 +305,7 @@ void readIndex(const QString & path, QMap<QString, Language>& languages)
languages.insert(lang.key, lang);
}
- }
- catch (Json::JsonException & e)
- {
+ } catch ([[maybe_unused]] Json::JsonException& e) {
qCritical() << "Translations Download Failed: index file could not be parsed as json";
}
}
@@ -498,12 +494,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;
}