summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index a9986422c8..aa039cc947 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -665,18 +665,11 @@ QString QGuiApplication::platformName()
static void init_platform(const QString &pluginArgument, const QString &platformPluginPath)
{
// Split into platform name and arguments
- QString name;
- QStringList arguments;
- foreach (const QString &token, pluginArgument.split(QLatin1Char(':'))) {
- if (name.isEmpty()) {
- name = token;
- } else {
- arguments.push_back(token);
- }
- }
+ QStringList arguments = pluginArgument.split(QLatin1Char(':'));
+ const QString name = arguments.takeFirst().toLower();
// Create the platform integration.
- QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, platformPluginPath);
+ QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, arguments, platformPluginPath);
if (QGuiApplicationPrivate::platform_integration) {
QGuiApplicationPrivate::platform_name = new QString(name);
} else {