51 static QString
getPath(
const QString& pFilename,
52 QStandardPaths::LocateOption pOption = QStandardPaths::LocateFile,
53 QStandardPaths::StandardLocation pStandard = QStandardPaths::AppDataLocation)
55#if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_BSD4) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS))
56#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
57 if (pFilename.compare(QStringLiteral(
"translations")) == 0)
59 return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
63 if (
const auto& match = QStandardPaths::locate(pStandard, pFilename, pOption); !match.isNull())
68 qDebug() << pFilename <<
"not found in following destinations |" << pOption;
69 const auto defaultLocations = QStandardPaths::standardLocations(pStandard);
70 for (
const auto& location : defaultLocations)
79 return getPath() % QLatin1Char(
'/') % pFilename;