Fix detection of default platform plugin.
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Wed, 18 Apr 2012 22:57:00 +0000 (15:57 -0700)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Apr 2012 14:40:29 +0000 (16:40 +0200)
commit0074cc5d34a8ee314e864ba488dab1f0d0f94995
treee770ac258fbd0f3083021ff3cb4d2c5eedaf39a9
parent14ea50598fb7217de5336ba33302a0ed151327a2
Fix detection of default platform plugin.

Let configure generate the QT_QPA_DEFAULT_PLATFORM_NAME in
qconfig.h. This allows us to override the platform name
using a configure argument.

This commit adds -qpa <platform> that lets the user specify
the default platform at configure time. Note that the default
platform is not checked against the tree since plugins are
allowed to exist outside the Qt source tree.

In the absence of -qpa argument, configure checks the mkspec
for a variable named QT_QPA_DEFAULT_PLATFORM. This check is
implemented only in the unix configure because it will be primarily
used in custom mkspecs (devices, boards).

If -qpa argument is absent and the mkspec variable is absent,
the default value is determined based on the OS as below:
    Unix - "xcb"
    Windows - "windows"
    Mac - "cocoa"
    QNX - "qnx"

Done-with: Jørgen Lind

Change-Id: I0df31811a1b901a3242bfada1232e596ebda04f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
configure
src/gui/kernel/qguiapplication.cpp
tools/configure/configureapp.cpp