diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-03-11 18:14:12 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-03-16 10:37:10 +0000 |
commit | d3d258a1b2aab8dd3be4d6ce27e0a664a681a840 (patch) | |
tree | 451171c079ae10043baf37a918fbe753dec19932 /src/plugins/platforms/ios/qiosintegration.mm | |
parent | 2094903a146f150a977b954a439f9f0185be24dc (diff) |
iOS: Add platform plugin option to debug window management
When the 'debugWindowManagement' option is enabled, e.g. by passing the
argument -platform ios:debugWindowManagement to the application, the
plugin will add a background color and outline to all QUIViews, as
well as draw a grid for the underlying QUIViewController. This makes
it easier to see where windows are placed when the window itself
doesn't draw anything, e.g. in unit tests.
Change-Id: If9a59822e0b320b154ad8e338f9fb5ec7cf191a2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index fcfd6c7cc8..e395c832f1 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -67,6 +67,7 @@ QIOSIntegration::QIOSIntegration() , m_inputContext(0) , m_platformServices(new QIOSServices) , m_accessibility(0) + , m_debugWindowManagement(false) { if (![UIApplication sharedApplication]) { qFatal("Error: You are creating QApplication before calling UIApplicationMain.\n" \ @@ -249,6 +250,16 @@ void *QIOSIntegration::nativeResourceForWindow(const QByteArray &resource, QWind return 0; } +void QIOSIntegration::setDebugWindowManagement(bool enabled) +{ + m_debugWindowManagement = enabled; +} + +bool QIOSIntegration::debugWindowManagement() const +{ + return m_debugWindowManagement; +} + // --------------------------------------------------------- #include "moc_qiosintegration.cpp" |