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