diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-03-18 09:42:14 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-03-18 09:45:20 (GMT) |
commit | 4234ea4479ca858d058840eec01760a387e4afb1 (patch) | |
tree | e50235f69ccb9431fecd548ffb133f5d97639c07 /src/gui/kernel/qapplication_qpa.cpp | |
parent | 7b0d9bbbe766e5f2aa7408b35707592d369acb36 (diff) | |
download | Qt-4234ea4479ca858d058840eec01760a387e4afb1.zip Qt-4234ea4479ca858d058840eec01760a387e4afb1.tar.gz Qt-4234ea4479ca858d058840eec01760a387e4afb1.tar.bz2 |
Lighthouse: Make it possible to compile in default platform plugin
Diffstat (limited to 'src/gui/kernel/qapplication_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_qpa.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index cb5439c..1d4400a 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -514,7 +514,14 @@ void qt_init(QApplicationPrivate *priv, int type) QList<QByteArray> pluginList; QString platformPluginPath = QLatin1String(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH")); - QString platformName = QLatin1String(qgetenv("QT_QPA_PLATFORM")); + QByteArray platformName; +#ifdef QT_QPA_DEFAULT_PLATFORM_NAME + platformName = QT_QPA_DEFAULT_PLATFORM_NAME; +#endif + QByteArray platformNameEnv = qgetenv("QT_QPA_PLATFORM"); + if (!platformNameEnv.isEmpty()) { + platformName = platformNameEnv; + } // Get command line params @@ -533,7 +540,7 @@ void qt_init(QApplicationPrivate *priv, int type) platformPluginPath = QLatin1String(argv[i]); } else if (arg == "-platform") { if (++i < argc) - platformName = QLatin1String(argv[i]); + platformName = argv[i]; } else if (arg == "-plugin") { if (++i < argc) pluginList << argv[i]; @@ -554,7 +561,7 @@ void qt_init(QApplicationPrivate *priv, int type) } #endif - init_platform(platformName, platformPluginPath); + init_platform(QLatin1String(platformName), platformPluginPath); init_plugins(pluginList); QColormap::initialize(); |