9 #include <QCoreApplication>
12 #include <QLibraryInfo>
13 #include <QStandardPaths>
14 #include <QStringBuilder>
28 static QString getPath()
30 #if defined(Q_OS_ANDROID)
31 return QStringLiteral(
"assets:");
33 #elif defined(Q_OS_MACOS)
34 const auto& path = QCoreApplication::applicationDirPath() + QStringLiteral(
"/../Resources");
36 #if !defined(QT_NO_DEBUG)
37 if (!QFile::exists(path))
39 return QCoreApplication::applicationDirPath();
46 return QCoreApplication::applicationDirPath();
52 static QString
getPath(
const QString& pFilename,
53 QStandardPaths::LocateOption pOption = QStandardPaths::LocateFile,
54 QStandardPaths::StandardLocation pStandard = QStandardPaths::AppDataLocation)
56 #if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_BSD4) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS))
57 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
58 if (pFilename.compare(QStringLiteral(
"translations")) == 0)
60 return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
64 if (
const auto& match = QStandardPaths::locate(pStandard, pFilename, pOption); !match.isNull())
69 qDebug() << pFilename <<
"not found in following destinations |" << pOption;
70 const auto defaultLocations = QStandardPaths::standardLocations(pStandard);
71 for (
const auto& location : defaultLocations)
80 return getPath() % QLatin1Char(
'/') % pFilename;
Definition: FileDestination.h:21
static QString getPath(const QString &pFilename, QStandardPaths::LocateOption pOption=QStandardPaths::LocateFile, QStandardPaths::StandardLocation pStandard=QStandardPaths::AppDataLocation)
Definition: FileDestination.h:52
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16