iOS: remove unneeded and faulty gles2 include path

The $$QMAKE_IOS_SDK is never defined, so the QMAKE_INCDIR_OPENGL_ES2
variable was wrong in the first place. Since the OpenGLES.framework
is already found using the sdk default include path, this path is
never really used anyway. So just remove it.

Change-Id: I73e9999eddba249fd2956b96ec66b24f0fcf8df2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: Allow projects to disable the main wrapper

In case they provide their own main that calls UIApplicationMain.

Change-Id: Ia050277ae5cbcbf01bc57b87ec37a74db9568059
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode

We already assume that if a source is buildable and should end up in OBJECTS we
can let Xcode build it, so we prevent this extra compiler from running
as part of the preprocess step.

Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Remove obsolete key from Info.plist

Change-Id: Ie191df7fc7a3859be7827851c0098adcbe9e26d6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Remove traces of MAC_SDK_FLAG which is no longer used

Change-Id: Ic206cf938270cbdddef968610643d3c4ca075149
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Fix style nitpicks

Change-Id: I670567f1793b5548393a3b315650bf34a0a3880e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Don't check for existing window in QIOSMainWrapperApplicationDelegate

The delegate is only used when we control the application, so we know
that there isn't any window yet.

Change-Id: Ibd774cb4fd8ceaab6a181769d2792b569f490495
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Auto-release the UIWindow and root view-controller

They are retained properties.

Change-Id: Id1808d93fe30950fc05e41375f00183e098bff0b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Don't init our own base view for the root viewcontroller

This is handled automatically by the default implementation.

Change-Id: Ia9bd0143490e6f2507ede03f3654a2b0b00e3e3d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Move debug background color setting and guard for release builds

Change-Id: Ie9131c3dfe16045805b37bf8af9381f4f9929da6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Don't build qiosviewcontroller.mm into qtmain plugin

It's already built as part of the iOS platform plugin.

Change-Id: I5a97e8723b566b9ef15aafce374be35f01e6cf08
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Move handling of FBOs to QIOSContext instead of QIOSWindow

The lifetime of an FBO is tied to its context, so letting each window
manage its own FBO failed when the window tried to delete the FBO
at destruction time without the proper context being current, or
even available anymore.

We solve this by moving all handling of FBOs to the context itself,
which is fine as we're exposing the necessary bits from the window
to allocate storage based on its layer.

Change-Id: I8c7c96cf63d6b667527c816f10ac2f4ff6a05e0c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Ensure that arch.test for host runs with option(host_build)

So that mkspecs and features may rely on the host_build test.

Change-Id: I18fee4820d9e2904285afcc7ddb8f1cc3d025fef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
qmake: Use PBXResourcesBuildPhase for QMAKE_BUNDLE_DATA without a path

The PBXResourcesBuildPhase will optimize resources, such as turning XIB
files into NIB files, running pngcrush on images, turning string files
into binary plists, etc, so we prefer that if possible.

Unfortunatly this phase does not support custom paths, so whenever we
encounter bundle data with a custom path we fall back to the regular
PBXCopyFilesBuildPhase.

Change-Id: I539db03dd7982fd37293123b6428cdb695f64d2b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Don't assume QSurfaceFormat's stencil buffer size is >= 0

The value -1 is used to indicate no stencil buffer, so we have to check
for sizes <= 0 when deciding whether or not to triangulate the path in
QOpenGL2PaintEngineExPrivate::fill().

This fixes an issue where filling a path would end up filling the whole
outline of the path, which was very visible with fonts over a certain
size (when we go from using the glyph cache to drawing filled paths
for each glyph).

Change-Id: Iafa96124481936db1e5109bba6166a6038c7ca83
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
qmake: Let Xcode handle sanitizion of CFBundleIdentifier

Xcode generates the same identifier for new projects.

Change-Id: Iebddf2e36ede8807a9fda2897939a56d8b2f2827
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Merge remote-tracking branch 'gerrit/dev' into ios

Conflicts:
	mkspecs/features/configure.prf
	mkspecs/features/qt.prf
	mkspecs/features/qt_plugin.prf
	qmake/generators/mac/pbuilder_pbx.cpp

Change-Id: I8d5f3899c23d6b56fb4c57251b7c0244c7388ae6
iOS: transfer focus to the window touched

Since our QWindows are UIViews rather than UIWindows, we need to
implement window activation manually. This patch will ensure that
the window touched by the user also gets keyboard focus.

Change-Id: I9390c5c8e50a4b066cd1320a2a044e02f2a9f75d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: Don't use QTPLUGIN for platform plugin and main-wrapper library

We load the platform plugin using -force_load, so there's no need to
generate a cpp file that does the plugin import.

The main wrapper is not a real Qt plugin, and doesn't have an import
function that we can call, so we link it manually instead of relying
on QTPLUGIN.

Change-Id: I00f137497319e15a18a5289e03f92e95bb877c09
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Use 72 DPI for font size conversion

This matches how UIKit behaves

Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>