summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-04-18 15:57:00 -0700
committerQt by Nokia <qt-info@nokia.com>2012-04-19 16:40:29 +0200
commit0074cc5d34a8ee314e864ba488dab1f0d0f94995 (patch)
treee770ac258fbd0f3083021ff3cb4d2c5eedaf39a9 /src/gui/kernel
parent14ea50598fb7217de5336ba33302a0ed151327a2 (diff)
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>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 6e54b366b3..fac466b0fd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -624,33 +624,6 @@ static void init_platform(const QString &pluginArgument, const QString &platform
}
}
- if (name.isEmpty()) {
- const QStringList keys = QPlatformIntegrationFactory::keys(platformPluginPath);
-#if defined(Q_OS_MAC)
- const QString defaultPlatform = QLatin1String("cocoa");
-#elif defined (Q_OS_WIN)
- const QString defaultPlatform = QLatin1String("windows");
-#elif defined (Q_OS_QNX)
- const QString defaultPlatform = QLatin1String("qnx");
-#elif !defined (QT_NO_XCB)
- const QString defaultPlatform = QLatin1String("xcb");
-#elif !defined (QT_NO_WAYLAND)
- const QString defaultPlatform = QLatin1String("wayland");
-#elif !defined (QT_NO_EGLFS)
- const QString defaultPlatform = QLatin1String("eglfs");
-#else
- const QString defaultPlatform = QLatin1String("minimal");
-#endif
- if (keys.contains(defaultPlatform)) {
- qWarning("No platform plugin argument was specified, defaulting to \"%s\".",
- qPrintable(defaultPlatform));
- name = defaultPlatform;
- } else {
- qFatal("No platform plugin argument was specified and the default plugin \"%s\" is not available",
- qPrintable(defaultPlatform));
- }
- }
-
// Create the platform integration.
QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, platformPluginPath);
if (QGuiApplicationPrivate::platform_integration) {