Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix compilation on Qt6
Dmitry Kazakovb1fa34262ce2
diff --git a/plugins/dockers/textproperties/TagFilterProxyModelQmlWrapper.cpp b/plugins/dockers/textproperties/TagFilterProxyModelQmlWrapper.cppindex 14d74fae2f..11c20e183d 100644--- a/plugins/dockers/textproperties/TagFilterProxyModelQmlWrapper.cpp+++ b/plugins/dockers/textproperties/TagFilterProxyModelQmlWrapper.cpp@@ -345,10 +345,12 @@ QVariant FontFamilyTagFilterModel::data(const QModelIndex &index, int role) consconst QString fallBack = sourceModel()->data(sourceIdx, Qt::UserRole + KisAbstractResourceModel::Name).toString();QString name = fallBack.isEmpty()? localizedNames.value("en").toString(): fallBack;- Q_FOREACH(const QLocale locale, KLocalizedString::languages()) {+ // the return type of KLocalizedString::languages() is different+ // between Qt5 and Qt6, so just use `auto` to ignore that+ for (const auto &locale : KLocalizedString::languages()) {bool found = false;Q_FOREACH(const QString key, localizedNames.keys()) {- if (QLocale(key) == locale) {+ if (QLocale(key) == QLocale(locale)) {name = localizedNames.value(key, name).toString();found = true;break;