diff --git a/src/psiiconset.cpp b/src/psiiconset.cpp index 8f8d66414..87b864f95 100644 --- a/src/psiiconset.cpp +++ b/src/psiiconset.cpp @@ -109,7 +109,7 @@ class PsiIconset::Private { Private(PsiIconset *_psi) { psi = _psi; } - QString iconsetPath(QString name, Iconset::Format format = Iconset::Format::Psi) + QString iconsetPath(QString name, Iconset::Format format = Iconset::Format::Psi, bool silent = false) { if (format == Iconset::Format::Psi) { const auto &dataDirs = ApplicationInfo::dataDirs(); @@ -132,7 +132,9 @@ class PsiIconset::Private { } } - qWarning("PsiIconset::Private::iconsetPath(\"%s\"): not found", qPrintable(name)); + if (!silent) { + qWarning("PsiIconset::Private::iconsetPath(\"%s\"): not found", qPrintable(name)); + } return QString(); } @@ -326,14 +328,18 @@ class PsiIconset::Private { const auto names = PsiOptions::instance()->getOption("options.iconsets.emoticons").toStringList(); for (const QString &name : names) { - Iconset *is = new Iconset; - if (is->load(iconsetPath("emoticons/" + name))) { - // PsiIconset::removeAnimation(is); - is->addToFactory(); - emo.append(is); - continue; + auto isPath = iconsetPath("emoticons/" + name, Iconset::Format::Psi, true); + Iconset *is = nullptr; + if (!isPath.isEmpty()) { + is = new Iconset; + if (is->load(iconsetPath("emoticons/" + name))) { + is->addToFactory(); + emo.append(is); + continue; + } + delete is; } - delete is; + is = new Iconset; if (is->load(iconsetPath(name, Iconset::Format::KdeEmoticons), Iconset::Format::KdeEmoticons)) { is->addToFactory(); diff --git a/src/translationmanager.cpp b/src/translationmanager.cpp index 9887babaa..ecaea74be 100644 --- a/src/translationmanager.cpp +++ b/src/translationmanager.cpp @@ -91,8 +91,11 @@ bool TranslationManager::loadQtTranslation(const QString &language) return true; } } - +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) return loadQtTranslationHelper(language, QLibraryInfo::location(QLibraryInfo::TranslationsPath), qt_translator_); +#else + return loadQtTranslationHelper(language, QLibraryInfo::path(QLibraryInfo::TranslationsPath), qt_translator_); +#endif } void TranslationManager::loadTranslation(const QString &language)