Commit 78711fb9 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #4493 from dogmaphobic/mobileFlag

Set mobile flag based on the actual define.
parents 736eba15 35a76260
...@@ -42,34 +42,35 @@ public: ...@@ -42,34 +42,35 @@ public:
Q_INVOKABLE int mouseX(void) { return QCursor::pos().x(); } Q_INVOKABLE int mouseX(void) { return QCursor::pos().x(); }
Q_INVOKABLE int mouseY(void) { return QCursor::pos().y(); } Q_INVOKABLE int mouseY(void) { return QCursor::pos().y(); }
#if defined(__mobile__)
bool isMobile () { return true; }
#else
bool isMobile () { return qgcApp()->fakeMobile(); }
#endif
#if defined (__android__) #if defined (__android__)
bool isAndroid () { return true; } bool isAndroid () { return true; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return true; }
bool isLinux () { return false; } bool isLinux () { return false; }
bool isMacOS () { return false; } bool isMacOS () { return false; }
#elif defined(__ios__) #elif defined(__ios__)
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return true; } bool isiOS () { return true; }
bool isMobile () { return true; }
bool isLinux () { return false; } bool isLinux () { return false; }
bool isMacOS () { return false; } bool isMacOS () { return false; }
#elif defined(__macos__) #elif defined(__macos__)
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return qgcApp()->fakeMobile(); }
bool isLinux () { return false; } bool isLinux () { return false; }
bool isMacOS () { return true; } bool isMacOS () { return true; }
#elif defined(Q_OS_LINUX) #elif defined(Q_OS_LINUX)
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return qgcApp()->fakeMobile(); }
bool isLinux () { return true; } bool isLinux () { return true; }
bool isMacOS () { return false; } bool isMacOS () { return false; }
#else #else
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return qgcApp()->fakeMobile(); }
bool isLinux () { return false; } bool isLinux () { return false; }
bool isMacOS () { return false; } bool isMacOS () { return false; }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment