QmlPluginDump: Prevent crash if run without WM
authorKai Koehne <kai.koehne@nokia.com>
Fri, 30 Nov 2012 09:55:07 +0000 (10:55 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 30 Nov 2012 10:10:59 +0000 (11:10 +0100)
Make sure that the minimal platform plugin is used by default.

Change-Id: I2362649dafaf823b00ab37519b516aef9ac3166b
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
tools/qmlplugindump/main.cpp

index 27b7fe5..f7404c4 100644 (file)
@@ -568,6 +568,9 @@ int main(int argc, char *argv[])
     QtSimulatorPrivate::SimulatorConnection::createStubInstance();
 #endif
 
+    // don't require a window manager even though we're a QGuiApplication
+    qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
+
     QGuiApplication app(argc, argv);
     const QStringList args = app.arguments();
     const QString appName = QFileInfo(app.applicationFilePath()).baseName();