summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-05-20 09:03:12 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-05-20 09:04:45 (GMT)
commita72c6f403435e5cc7aff501b1e1ee990dfb24969 (patch)
treedc6ea15c5abcf7564737fe9115486a111ba6e51e /demos
parente61b3eb9903e9a63f107074c0e8d60e3ee689a52 (diff)
downloadQt-a72c6f403435e5cc7aff501b1e1ee990dfb24969.zip
Qt-a72c6f403435e5cc7aff501b1e1ee990dfb24969.tar.gz
Qt-a72c6f403435e5cc7aff501b1e1ee990dfb24969.tar.bz2
Use QApplication::arguments() to check for command line args
Use the Qt way to look up command line args, remove 5 lines of code per example. Also clean up badly indented code.
Diffstat (limited to 'demos')
-rw-r--r--demos/deform/main.cpp5
-rw-r--r--demos/pathstroke/main.cpp5
2 files changed, 2 insertions, 8 deletions
diff --git a/demos/deform/main.cpp b/demos/deform/main.cpp
index 4539973..bef075a 100644
--- a/demos/deform/main.cpp
+++ b/demos/deform/main.cpp
@@ -50,10 +50,7 @@ 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;
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
PathDeformWidget deformWidget(0, smallScreen);
diff --git a/demos/pathstroke/main.cpp b/demos/pathstroke/main.cpp
index 1465682..534b233 100644
--- a/demos/pathstroke/main.cpp
+++ b/demos/pathstroke/main.cpp
@@ -48,10 +48,7 @@ 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;
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
PathStrokeWidget pathStrokeWidget(smallScreen);
QStyle *arthurStyle = new ArthurStyle();