Don't default to XCB if it is not enabled.

Default to wayland unless it's not enabled.
Default to minimal otherwise.

Change-Id: I0fa523eae395821a7cb0cabbb27ca073e594246f
Reviewed-on: http://codereview.qt-project.org/5945
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Lincoln Ramsay 2011-10-04 13:28:44 +10:00 committed by Qt by Nokia
parent 614b9efcf5
commit a7d80babb5
2 changed files with 7 additions and 1 deletions

2
configure vendored
View File

@ -6273,6 +6273,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
exit 1
else
CFG_WAYLAND=no
QMakeVar add DEFINES QT_NO_WAYLAND
fi
fi
@ -6304,6 +6305,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
exit 1
fi
CFG_XCB=no
QMakeVar add DEFINES QT_NO_XCB
fi
fi

View File

@ -238,8 +238,12 @@ static void init_platform(const QString &pluginArgument, const QString &platform
const QString defaultPlatform = QLatin1String("cocoa");
#elif defined (Q_OS_WIN)
const QString defaultPlatform = QLatin1String("windows");
#else
#elif !defined (QT_NO_XCB)
const QString defaultPlatform = QLatin1String("xcb");
#elif !defined (QT_NO_WAYLAND)
const QString defaultPlatform = QLatin1String("wayland");
#else
const QString defaultPlatform = QLatin1String("minimal");
#endif
if (keys.contains(defaultPlatform)) {
qWarning("No platform plugin argument was specified, defaulting to \"%s\".",