11#include <QCoreApplication>
14#include <QLibraryInfo>
15#include <QStandardPaths>
16#include <QStringBuilder>
30 static QString getPath()
32#if defined(Q_OS_ANDROID)
33 return QStringLiteral(
"assets:");
35#elif defined(Q_OS_MACOS)
36 const auto& path = QCoreApplication::applicationDirPath() + QStringLiteral(
"/../Resources");
38 #if !defined(QT_NO_DEBUG)
39 if (!QFile::exists(path))
41 return QCoreApplication::applicationDirPath();
48 return QCoreApplication::applicationDirPath();
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;
Definition: FileDestination.h:23
static QString getPath(const QString &pFilename, QStandardPaths::LocateOption pOption=QStandardPaths::LocateFile, QStandardPaths::StandardLocation pStandard=QStandardPaths::AppDataLocation)
Definition: FileDestination.h:54
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16