mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-04-26 09:44:38 +00:00
fix qt 6.6 warnings
This commit is contained in:
parent
4d445ef7fc
commit
334e209ff4
@ -22,7 +22,7 @@ using namespace QuasarAppUtils;
|
||||
bool QuasarAppUtils::Locales::findQmPrivate(const QString &prefix,
|
||||
QList<QTranslator*> &qmFiles) {
|
||||
|
||||
for (const auto &location: qAsConst(_locations)) {
|
||||
for (const auto &location: std::as_const(_locations)) {
|
||||
|
||||
const auto availableFiles = QDir(location).entryInfoList(
|
||||
{prefix + ".qm"}, QDir::Files);
|
||||
@ -82,7 +82,7 @@ bool QuasarAppUtils::Locales::findQm(QString localePrefix,
|
||||
|
||||
void QuasarAppUtils::Locales::installTranslations( QList<QTranslator *> &qmFiles)
|
||||
{
|
||||
for (const auto & translator: qAsConst(qmFiles)) {
|
||||
for (const auto & translator: std::as_const(qmFiles)) {
|
||||
if (!QCoreApplication::installTranslator(translator)) {
|
||||
|
||||
QuasarAppUtils::Params::log("Failed to install translation file : " + translator->filePath(),
|
||||
@ -205,7 +205,7 @@ bool Locales::initPrivate(const QList<QLocale> &locales, const QSet<QString> &lo
|
||||
}
|
||||
|
||||
void Locales::clearCache(const QLocale &locale) {
|
||||
for (const auto & tr :qAsConst(_translations[locale])) {
|
||||
for (const auto & tr :std::as_const(_translations[locale])) {
|
||||
QCoreApplication::removeTranslator(tr);
|
||||
delete tr;
|
||||
}
|
||||
@ -226,7 +226,7 @@ Locales *Locales::instance() {
|
||||
}
|
||||
|
||||
void Locales::removeOldTranslation(const QLocale &locale) {
|
||||
for (const auto & tr :qAsConst(_translations[locale])) {
|
||||
for (const auto & tr :std::as_const(_translations[locale])) {
|
||||
QCoreApplication::removeTranslator(tr);
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ Help::Section Params::getHelpOfInputOptions() {
|
||||
}
|
||||
|
||||
Help::Options help;
|
||||
for (const auto &optionData: qAsConst(inputOptions) ) {
|
||||
for (const auto &optionData: std::as_const(inputOptions) ) {
|
||||
help.unite(optionData.toHelp());
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ void Params::parseAvailableOptions(const OptionsDataList &availableOptionsListIn
|
||||
for (auto it = availableOptionsListIn.begin(); it != availableOptionsListIn.end(); ++it) {
|
||||
|
||||
if (availableOptionsListOut) {
|
||||
for (const auto &name : qAsConst(it.value().names())) {
|
||||
for (const auto &name : std::as_const(it.value().names())) {
|
||||
availableOptionsListOut->insert(name, it.value());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user