iOS: Replace device and simulator makespecs with single makespec

And use configure's -sdk argument to choose between the iphoneos and the
iphonesimulator SDK. xcodebuild -showsdks can be used to list the
available SDKs. Passing an SDK without a version postfix implies
the latest version of the SDK.

Change-Id: I881df754d522fc91aaa16ba3e39cf0c37a21a1f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Make Xcode output the default for GUI applications

As long as Qt Creator does not provide any iOS integration, and the
app bundle we create using the Makefile generator is not good enough
to deploy to a device anyways, producing Xcode projects make the most
sense.

We base the decicion on whether or not the project depends
on QtGui and has app_bundles enabled. This prevents configure
tests and other tools from having Xcode projects, but allows
examples and demos to build out of the box.

Instead of setting the generator unconditionally we unset it in
default_pre so that we can detect if the user set it manually. This
means the user won't be able to inspect the MAKEFILE_GENERATOR variable
from the pro file, but this is less of a use-case then overriding the
generator from the command line or prooject file.

Change-Id: I881cf3e29631445f83ea4ff0979f7a566e4810f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Link to the platform plugin and iosmain plugin and define main

Ideally we'd only have to do QTPLUGIN += ios, but this doesn't work as
we need to link with the force_load linker option. Even trying to build
on QTPLUGIN and then replace the -l line with what we need will fail, as
the prl logic in qmake which runs after all the prf files does not know
about the force_load option and will then fail to resolve dependencies
from the prl file.

Since we load the platform plugin using -force_load, 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: I0381a3c9ed7f8d41a4121e1fc0b7c0e210a8b832
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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>
iOS: Target both iPhone and iPad by default

Change-Id: I3122b9391c6187da17389c889a456c58210dca09
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Write default code signing identify for iOS in Xcode generator

Change-Id: Ic04da6063863585665c9133caba0279ba478fbb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ian Dean <ian@mediator-software.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Build ios platform plugin when appropriate

Defining QT_QPA_DEFAULT_PLATFORM_NAME in qplatformdefs.h is not
neccecary, as qconfig.h will already have this define written by
configure.

Change-Id: I89d9191533f6b4e6bfd5eade6cc0dced02b50f81
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Build platform plugin like other platform plugins

... by loading(qt_plugin)

Change-Id: I9be438b72be986a991a81c2cf1a3e5047bcf0a60
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Don't link ios platform plugin to Cocoa

Change-Id: I2348b19617d3e342cd344bf7d0fa894118cbfae8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Add missing QuartzCore dependency to platform plugin

Change-Id: Ic69a5a7faa9b7f9907d0325260b6b6e2389a4c3a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: network should not link against CoreServices on iOS

Change-Id: Ia3e21a3d73f696f0e77c427bdb263333646c48d3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: Add required public dependencies of the CoreText font database

CoreText and CoreGraphics are available on iOS as stand-alone
frameworks, but on Mac OS X they are part of the ApplicationServices
umbrella framework.

Mac OS 10.8 actually introduced both as stand-alone frameworks,
but for simplicity we link to ApplicationServices, as there's
still symlinks from ApplicationServices to the real frameworks.

Change-Id: I7f7ef795629cc37da85857d5c42283754acc4474
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Don't include QtPrintSupport dialogs on iOS

It pulls in a dependency on Cocoa.

Change-Id: I293063adfdef8b92f80ffda0c66ac6e6d12958ff
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Don't add to OBJECTIVE_HEADERS, there's no such thing

We should add to HEADERS, so that moc will realize it needs to run on
the headers.

Change-Id: I582e989e4faf0835c4bf9a677cbd8ac075559319
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
iOS: Change member variable style to be consistent with Qt's de facto standard

Change-Id: Idd65ad9cbb77114466c5b69a799b98a7fee5068f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Get rid of singleton instance accessor in platform plugin

None of the other platform plugins have one, and it's not used anywhere.

Change-Id: Id46ab5f75c9819511c3e9d123d0338c3c8799869
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Add screen like other platform plugins

We may add support for external displays at a later point, but for now
we follow the same pattern as the other platform plugins. Either way we
should call screenAdded() to let the platform integration know about the
screen.

Change-Id: Id01785a5262df0180caf957c7de8ecbbf169f233
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Keep UIScreen* for current QIOSScreen instead of looking up each time

Also, add enum for screen numbers, for better code readability.

Change-Id: Id5162c34e80ff5efb149ae86b49f51df183d1c1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Style nitpicking, rename m_fontDb to m_fontDatabase

Change-Id: I9d92843af9018d51b73fadcc7c20d792fad772fa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Add ability to get the UIView for a QWindow through QPlatformNativeInterface

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