try to fix ios build

This commit is contained in:
Andrei Yankovich 2024-01-21 10:58:07 +01:00
parent ad27b38b10
commit b7b0f330c6

View File

@ -7,19 +7,19 @@
#include "qaplatformutils.h" #include "qaplatformutils.h"
#ifdef Q_OS_LINUX #if defined(Q_OS_LINUX)
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#elif Q_OS_ANDROID #elif defined(Q_OS_ANDROID)
#elif Q_OS_WIN32 #elif defined(Q_OS_WIN32)
#elif Q_OS_MACOS #elif defined(Q_OS_MACOS)
#elif Q_OS_IOS #elif defined(Q_OS_IOS)
#endif #endif
namespace QuasarAppUtils { namespace QuasarAppUtils {
#ifdef Q_OS_LINUX #if defined(Q_OS_LINUX)
bool PlatformUtils::isSnap() { bool PlatformUtils::isSnap() {
return QProcessEnvironment::systemEnvironment().value("SNAP").size(); return QProcessEnvironment::systemEnvironment().value("SNAP").size();
} }
@ -54,7 +54,8 @@ bool PlatformUtils::checkSystemBakupSnapInterface() {
return QDir(snapRootFS()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).size(); return QDir(snapRootFS()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).size();
} }
#elif Q_OS_ANDROID #elif defined(Q_OS_ANDROID)
bool PlatformUtils::isSnap() { return false;} bool PlatformUtils::isSnap() { return false;}
QString PlatformUtils::snapRootFS() { return "";} QString PlatformUtils::snapRootFS() { return "";}
@ -62,7 +63,9 @@ QString PlatformUtils::snapRootFS() { return "";}
QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; } QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; }
bool PlatformUtils::checkSystemBakupSnapInterface() { return false; } bool PlatformUtils::checkSystemBakupSnapInterface() { return false; }
#elif Q_OS_WIN32
#elif defined(Q_OS_WIN32)
bool PlatformUtils::isSnap() { return false;} bool PlatformUtils::isSnap() { return false;}
QString PlatformUtils::snapRootFS() { return "";} QString PlatformUtils::snapRootFS() { return "";}
@ -70,7 +73,9 @@ QString PlatformUtils::snapRootFS() { return "";}
QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; } QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; }
bool PlatformUtils::checkSystemBakupSnapInterface() { return false; } bool PlatformUtils::checkSystemBakupSnapInterface() { return false; }
#elif Q_OS_MACOS
#elif defined(Q_OS_MACOS)
bool PlatformUtils::isSnap() { return false;} bool PlatformUtils::isSnap() { return false;}
QString PlatformUtils::snapRootFS() { return "";} QString PlatformUtils::snapRootFS() { return "";}
@ -78,7 +83,9 @@ QString PlatformUtils::snapRootFS() { return "";}
QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; } QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; }
bool PlatformUtils::checkSystemBakupSnapInterface() { return false; } bool PlatformUtils::checkSystemBakupSnapInterface() { return false; }
#elif Q_OS_IOS
#elif defined(Q_OS_IOS)
bool PlatformUtils::isSnap() { return false;} bool PlatformUtils::isSnap() { return false;}
QString PlatformUtils::snapRootFS() { return "";} QString PlatformUtils::snapRootFS() { return "";}
@ -86,6 +93,7 @@ QString PlatformUtils::snapRootFS() { return "";}
QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; } QString PlatformUtils::transportPathToSnapRoot(const QString &path) { return path; }
bool PlatformUtils::checkSystemBakupSnapInterface() { return false; } bool PlatformUtils::checkSystemBakupSnapInterface() { return false; }
#endif #endif
} }