summaryrefslogtreecommitdiffstats
path: root/examples/widgets/wiggly/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/wiggly/main.cpp')
-rw-r--r--examples/widgets/wiggly/main.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
index 163c231..b8b523f 100644
--- a/examples/widgets/wiggly/main.cpp
+++ b/examples/widgets/wiggly/main.cpp
@@ -45,16 +45,13 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- bool smallScreen = false;
- for (int i=0; i<argc; i++)
- if (QString(argv[i]) == "-small-screen")
- smallScreen = true;
- Dialog dialog(0,smallScreen);
- if (!smallScreen){
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
+
+ Dialog dialog(0, smallScreen);
+
+ if (!smallScreen)
dialog.show();
- }
- else{
+ else
dialog.showFullScreen();
- }
return app.exec();
}