@@ -61,8 +61,8 @@ int startShell(int argc, const char** argv, void* server)
61 "Allow the mouse to provide touch input");
61 "Allow the mouse to provide touch input");
62 parser.addOption(mousetouchOption);
62 parser.addOption(mousetouchOption);
64− QCommandLineOption windowGeometryOption("windowgeometry",
64+ QCommandLineOption windowGeometryOption(QStringList() << "windowgeometry",
65− "Specify the window geometry as [<width>x<height>]");
65+ "Specify the window geometry as [<width>x<height>]", "windowgeometry", "1");
66 parser.addOption(windowGeometryOption);
66 parser.addOption(windowGeometryOption);
68 QCommandLineOption testabilityOption("testability",
68 QCommandLineOption testabilityOption("testability",
@@ -98,8 +98,16 @@ Load the testability driver");
99 resolveIconTheme();
99 resolveIconTheme();
101+ std::auto_ptr<ApplicationArguments> appArgs;
102+ if (parser.isSet(windowGeometryOption) &&
103+ parser.value(windowGeometryOption).split('x').size() == 2) {
101− QStringList args = application->arguments();
104+ QStringList geom =
105+ parser.value(windowGeometryOption).split('x');
106+ appArgs.reset(new ApplicationArguments(geom.at(0).toInt(), geom.at(1).toInt()));
108+ appArgs.reset(new ApplicationArguments());
102− ApplicationArguments qmlArgs(args);
110+ ApplicationArguments& qmlArgs = *appArgs;
104 // The testability driver is only loaded by QApplication but not by QGuiApplication.
112 // The testability driver is only loaded by QApplication but not by QGuiApplication.
105 // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
113 // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.