Handle INCLUDE and LIB environment variables in config.tests for MinGW

Fix ICU compile test for MinGW by adding the INCLUDE and LIB environment
variables to the compiler flags. The logic is the same as in qmodule.pri.

Task-number: QTBUG-34971
Change-Id: I192e06643517087587ec4a5dffe4698c2078011a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
iOS: Fix linking against QtCore

After introducing support for QSysInfo::macVersion() for iOS we need
clients to link to UIKit when using QtCore, as that's where the UIDevice
class lives.

Change-Id: I0a9c2e2506c61ac5619fd000ebd10c2ab9e037cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix race condition between destruction of QObjects

If the two QObjecs are connected and destroyed at the same time, it
is possible to hit a case where QObject::metaObject and QObject::disconnectNotify
is called on a destroyed object.

This patch moves the calls up before the removal of the connection. This
ensure the sender object will have to block on the receivers connection
mutex and can not finish destruction before disconnectNotify is called.

Task-number: QTBUG-34131
Change-Id: I398116fe7bc6a195991aff9961d89a8b0ac8d53c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Disable threaded GL for nouveau drivers.

Task-number: QTCREATORBUG-10875
Change-Id: I25f3abc6ef15bba78fa9ec27de2c1e5e0bcc7fae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Android: make the default font size bigger

The default font size turned out to be slightly too small for
comfort on touch devices. This tweaks the size from a 12-point equivalent
to a 14-point equivalent. (Point sizes aren't real point sizes because of
compatibility with iOS.)

Change-Id: I6d970fdd5bba8199cabdf1aaaaac10d19c53c654
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Add convenience macros for checking OS X and iOS platform SDK and target

Allows us to skip passing __MAC_NA and __IPHONE_NA when we don't care
about that platform.

Change-Id: Ie265beb457d057de06ae64970684d67e59062b1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
iOS: Fix when and how we send geometry and expose events

Geometry changes may come from Qt itself, or spontaneously from the windowing
system. In both cases we deal with them through the layoutSubviews callback,
which we now ensure gets called after we set a new geometry on the UIView
frame, by using the setNeedsLayout message.

We take care to persist the requested geometry from Qt immediately in our
setGeometry() function, so that subsequent calls to QWindow::geometry()
will report back the requested geometry. Clients can however not rely
on this geometry until they've received a corresponding resize event,
which we trigger from layoutSubviews.

Since the new geometry reported in layoutSubviews may be different from
what the user requested, we ensure to pass on both the new and the "old"
geometry, so that Qt will send the appropriate resize and move events.

Instead of building expose events on top of the existing layout
mechanism provided by iOS, we hook into the more logical point,
which is the display-phase. Since a EAGL view normally doesn't
need to "display" anything this takes a few overrides on UIView.

Once we have the hooks we need, we can distinguish between a QWindow
backing needing layout, and needing displaying.

Finally, we flush both the resize and expose events, as that's what
iOS expects of us when asking us to layout or display. The result
is that Qt is able to synchronously resize subwindows and prepare
new GL rendering for the next frame.

Change-Id: I4c03e3db3fe886163284ba1a342699e217e88cbb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Take position of root viewcontroller into account for geometry changes

When setting the geometry on our UIView, or when reporting it back to Qt
in our layoutSubviews callback, we need to take into account that the
root viewcontroller may be not be positioned at 0,0 in the screen's
window. Even when using the wantsFullScreenLayout property of the view
controller this may be the case on iOS7 when the in-call status-bar is
visible.

Change-Id: I0ca706c1c9aff8ba4f3b4ccdf83dba713bd5c9c2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Change show() to imply maximize, and showFullScreen() to hide status bar

Matches the Android behavior, and gives an easy and predictable way to
show true fullscreen windows that is similar to how one would do it on
a desktop platform.

We keep the statusbar visibility in sync with the window state of the
active window.

Change-Id: Ia4b99e03f83e19f9ef56cc99b9d477cc6da4c734
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Use separate release pool for qt_ios_version()

QSysInfo::MacintoshVersion is initialized before the main thread's release
pool has been set up, so we have to wrap the UIKit usage in our own pool.

Change-Id: I80e2c068339e0251f38ecf55fcfb764594eb3ad7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Fix build against iOS 5 SDK and auto-rotation on iOS 5

Change-Id: I3acc2d3780a9440bedf48db3fed0046b06300b9e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Allow QBackingStore::flush() without beginPaint()

The QBackingStore API doesn't require clients to precede flush() with a
beginPaint() call, but our backingstore is backed by a GL context, so
it's up to us to ensure it's current before swapping.

Change-Id: Ia6119bf0e835448b1fd383d933df6f88fa4f298a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
iOS: Deliver resize events synchronously after setGeometry for QtWidgets

QWidget::show_sys() assumes synchronous geometry behavior by trying to
resize both the platform window and the backing store if the widget's
view of what the geometry is doesn't match the platform window's.

The problem with that is that it's the widget which is not up to date,
not the window, as the widget is not waiting for resize events before
applying any resize logic. Instead of trying to fix widgets, we throw
our hands in the air and give QtWidgets the synchronous behavior it
assumes from the platform.

Change-Id: I1b9241b9b13df661dc7f41c4cb8ecd02f5572256
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Re-enable kEAGLDrawablePropertyRetainedBacking

Having it disabled caused issues with our backing-store implementation,
which assumes that the backing store is retained, but for us is backed
by a GL context.

Change-Id: I18d05e226c7cf949adcd3b71801ffd845fa6d83d
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>