Make layoutDirection pass with new expose behavior

A QMenu with no actions gets a size of (0, 0) on OS X.
With the new stricter expose event behavior this
is considered invalid geometry and the platform plugin
won't send an expose event, causing the qWaitForWindowExposed
test to fail.

Add a menu entry since the layoutDirection test is
not really interested in testing the special case of
empty menus.

Change-Id: I5221dc3f0472ac13edf821df08bacc3a4eb5cd9d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Improve expose event handling.

Prevent the cocoa platform plugin from sending expose
events for windows that are off-screen or has invalid
geometry.

Differentiate between initial exposes and geometry
update exposes, in order that e.g. geometry updates
that happen before setVisible() don't trigger expose
events. After the initial expose geometry updates
to and from invalid geometry will trigger obscure
and expose events.

Task-number: QTBUG-35143
Task-number: QTBUG-35091
Change-Id: Ibbff20c69974f098ea7635e9ca38620597840a05
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
iOS: Disable drag and drop completely instead of enabling simple d'n'd

The drag and drop event filters do not play nicely with touch events
or virtual keyboards.

Task-number: QTBUG-35348
Change-Id: Id4d079ae72882f48750d394f13e10700d60e4532
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: fix assert when using QOffscreenSurface

Qt defaults to creating a QWindow as offscreen surface
if QPlatformIntegration::createPlatformOffscreenSurface
returns 0. Using an offscreen surface is often done
in a background thread, which is problematic, since then
a QIOSWindow will also be created in a background thread.
According to Apple docs, working with a UIView from other
threads than the main thread should not be done. In our
case, we instead hit an assert in QApplication that
checks for the same.

As a quick fix for Qt 5.2, we remove the offending call that
causes the assert, since we anyway will call the same function
lazily when becoming first responder.

Task-number: QTBUG-35378

Change-Id: Id35462f99783a9748c688b163f6497de9bfff73e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Revert "Cocoa (OpenGL): If no view is attached, makeCurrent() should return false"

This reverts commit 2eb1e28a90eaf82f4405dc65584021f16415014b,
which makes several of the OpenGL examples crash on startup.
(textures, hellogl_es2)

Change-Id: Id47d2df6f57b2396c333e478b3c062f4cb4becb5
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Doc: Adjust description of the qreal typedef

Change-Id: I038df8034ee00868eeee18b1ed09f7a70e3dd77a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
iOS: Handle statusbar changes to child windows

Going through the platform window failed when the parent wasn't created
yet. We can still get the window state of an yet-to-be-created top level
window.

Change-Id: Iaa61ddc50df037ac0bd2fd0884884c2bfce1dd9a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: don't show statusbar if hidden from Info.plist

Currently there is no way to always hide the statusbar
on iOS other than showing a window in fullscreen. This
patch will check if the statusbar is (initially) hidden
from the Info.plist, and respect that in the application.

SubAttack is an example of an app that (because
of styling issues with MainWindow margins) manually
sets the geometry larger than fullsreen, and calls
showNormal(). In that case we still want the statusbar to be
hidden.

Change-Id: Ia365d14971978360d0b39621ff0f8f82f74b57e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: move infoPlistValue to qiosglobal

Change-Id: If237f08683290105413dc47923e23a496765bb22
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>