9 #include <QCoreApplication> 11 #include <QStandardPaths> 12 #include <QStringBuilder> 24 static QString getPath()
26 #if defined(Q_OS_ANDROID) 27 return QStringLiteral(
"assets:");
29 #elif defined(Q_OS_MACOS) && defined(QT_NO_DEBUG) 30 return QCoreApplication::applicationDirPath() + QStringLiteral(
"/../Resources");
33 return QCoreApplication::applicationDirPath();
39 static QString
getPath(
const QString& pFilename,
40 QStandardPaths::LocateOption pOption = QStandardPaths::LocateFile,
41 QStandardPaths::StandardLocation pStandard = QStandardPaths::AppDataLocation)
43 #if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_BSD4) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS)) 44 const auto match = QStandardPaths::locate(pStandard, pFilename, pOption);
50 qDebug() << pFilename <<
"not found in following destinations |" << pOption;
51 const auto defaultLocations = QStandardPaths::standardLocations(pStandard);
52 for (
const auto& location : defaultLocations)
61 return getPath() % QLatin1Char(
'/') % pFilename;
static QString getPath(const QString &pFilename, QStandardPaths::LocateOption pOption=QStandardPaths::LocateFile, QStandardPaths::StandardLocation pStandard=QStandardPaths::AppDataLocation)
Definition: FileDestination.h:39
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
Definition: FileDestination.h:17