54 static QString
getPath(
const QString& pFilename,
55 QStandardPaths::LocateOption pOption = QStandardPaths::LocateFile,
56 QStandardPaths::StandardLocation pStandard = QStandardPaths::AppDataLocation)
58#if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_BSD4) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS))
59#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
60 if (pFilename.compare(QStringLiteral(
"translations")) == 0)
62 return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
66 if (
const auto& match = QStandardPaths::locate(pStandard, pFilename, pOption); !match.isNull())
71 qDebug() << pFilename <<
"not found in following destinations |" << pOption;
72 const auto defaultLocations = QStandardPaths::standardLocations(pStandard);
73 for (
const auto& location : defaultLocations)
82 return getPath() % QLatin1Char(
'/') % pFilename;