Specify generic QPA plugins via env variables

Introduce a mechanism to load comma separated generic QPA plugins via
exported environment variables. (Drastically simplifies QPA usage in custom
environments where a variety of plugins could be used and heuristics are
consequently a poor fit)

Change-Id: I292f3fbfc8b8ad2b4f416984ef0a10b9b59de531
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Donald Carr 2012-04-02 18:10:49 +00:00 committed by Qt by Nokia
parent 6dbaf9f536
commit 91e20c0eae

View File

@ -711,6 +711,10 @@ void QGuiApplicationPrivate::init()
argc = j;
}
// Load environment exported generic plugins
foreach (const QByteArray &plugin, qgetenv("QT_QPA_GENERIC_PLUGINS").split(','))
pluginList << plugin;
if (platform_integration == 0)
createPlatformIntegration();