path: root/src/plugins/platforms/ios/qiosapplicationstate.h
diff options
authorTor Arne Vestbø <>2016-06-16 15:39:33 +0200
committerTor Arne Vestbø <>2016-06-17 13:18:29 +0000
commit3e4f885f0c8f9d4e951241459d310ed977936806 (patch)
tree706f8cfc22a4dbb02b9ddbfe375e13d5376ec0a8 /src/plugins/platforms/ios/qiosapplicationstate.h
parent655687d84d6a5914227f2580889e20b7e1b31095 (diff)
UIKit: Ensure that Qt's application state is initialized at startup
Using dispatch_async to deliver the initial application state at startup was broken, as that would leave the application in the default application state, inactive, until the next runloop pass. This became a problem when an application was started backgrounded, eg. in response to location updates or a Bluetooth accessory waking it up, as it would have a small window of time at startup where it would think it was able to render content (since the window was exposed), while in fact the application was running in the background. iOS will in these situations kill the app for doing background rendering. Change-Id: I1ab4a6af08a154d8625c6451b4b5c8f4453e6b43 Reviewed-by: Richard Moe Gustavsen <>
Diffstat (limited to 'src/plugins/platforms/ios/qiosapplicationstate.h')
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiosapplicationstate.h b/src/plugins/platforms/ios/qiosapplicationstate.h
index 0564533043..710621c65b 100644
--- a/src/plugins/platforms/ios/qiosapplicationstate.h
+++ b/src/plugins/platforms/ios/qiosapplicationstate.h
@@ -35,10 +35,11 @@
#include <QtCore/qglobal.h>
+#include <QtCore/qvector.h>
-@class QIOSApplicationStateListener;
class QIOSApplicationState
@@ -46,7 +47,7 @@ public:
- QIOSApplicationStateListener *m_listener;
+ QVector<NSObject*> m_observers;