aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItay Grudev <itay+89bf5c@grudev.com>2019-10-13 10:39:37 +0300
committerGitHub <noreply@github.com>2019-10-13 10:39:37 +0300
commit16ea64b2548b02f59bf49b255466278c3ff0ace8 (patch)
tree0c0dd7c454c77870a9cee75ee9da4aacf3ea1dce
parentUpdate CHANGELOG.md (diff)
parentv3.0.18 (diff)
downloadsingleapplication-16ea64b2548b02f59bf49b255466278c3ff0ace8.tar.xz
Merge pull request #76 from itay-grudev/android_fallback3.0.18
Android and iOS fallback
-rw-r--r--CHANGELOG.md6
-rw-r--r--singleapplication.cpp7
2 files changed, 13 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 684d260..9efd3fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,12 @@
Changelog
=========
+__3.0.18__
+----------
+
+* Fallback to standard QApplication class on iOS and Android systems where
+ the library is not supported.
+
__3.0.17__
----------
diff --git a/singleapplication.cpp b/singleapplication.cpp
index bc9e059..ba35c3a 100644
--- a/singleapplication.cpp
+++ b/singleapplication.cpp
@@ -41,6 +41,13 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda
{
Q_D(SingleApplication);
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
+ // On Android and iOS since the library is not supported fallback to
+ // standard QApplication behaviour by simply returning at this point.
+ qWarning() << "SingleApplication is not supported on Android and iOS systems.";
+ return;
+#endif
+
// Store the current mode of the program
d->options = options;