summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-25 19:53:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-25 19:53:30 (GMT)
commitef5891755bf760b68df1fc387e08a1b16980d6ad (patch)
treeffacc13c82dcadd1dda588e703ba43e440d9454c /examples
parent5a7223450d0ebd4eaa47f263005c6d1c2e142a76 (diff)
parenta32c96e753c2f5a123e518a92762ec9c9ff3b0b7 (diff)
downloadQt-ef5891755bf760b68df1fc387e08a1b16980d6ad.zip
Qt-ef5891755bf760b68df1fc387e08a1b16980d6ad.tar.gz
Qt-ef5891755bf760b68df1fc387e08a1b16980d6ad.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (50 commits) Dont crash when assigning the same input context twice. Fixed a typo in variable name in qlocale data generator. Fix for Norwegian and Korean languages on symbian. Remove unused function in QDBusConnectionPrivate Doc: Fixing bugs in HTML generator Updating 4.7.0 change log. Doc: Correcting style to class lists qdoc: Improved class index page. Added MSVC 2010 project files to .gitignore Fix architecture detection on GNU/Hurd. Revert "tst_bic: make it possible to test for cross-compilation" fix typo in documentation Improve Bearer Management related documentation in QNetworkAccessManager Compile with QT_NO_ACTION. Unbreak compilation outside Mac QDBusAbstractInterface: don't set lastError outside the object's own thread tst_bic: make it possible to test for cross-compilation Remove Q_PACKED from QChar and QLocale::Data. QDebug operator for QFlags Removing unneeded qDebug statement. ...
Diffstat (limited to 'examples')
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp6
-rw-r--r--examples/script/context2d/main.cpp6
-rw-r--r--examples/widgets/wiggly/main.cpp15
3 files changed, 9 insertions, 18 deletions
diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp
index e8e0c8d..4a81696 100644
--- a/examples/draganddrop/fridgemagnets/main.cpp
+++ b/examples/draganddrop/fridgemagnets/main.cpp
@@ -44,16 +44,14 @@
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(fridgemagnets);
- bool smallScreen = false;
- for (int i=0; i<argc; i++)
- if (QString(argv[i]) == "-small-screen")
- smallScreen = true;
QApplication app(argc, argv);
#ifdef QT_KEYPAD_NAVIGATION
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
#endif
DragWidget window;
+
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
if (smallScreen)
window.showFullScreen();
else
diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp
index d9ae4e7..1c5b8ac 100644
--- a/examples/script/context2d/main.cpp
+++ b/examples/script/context2d/main.cpp
@@ -45,14 +45,10 @@ int main(int argc, char **argv)
{
Q_INIT_RESOURCE(context2d);
- bool smallScreen = false;
- for (int i = 0; i < argc; i++)
- if (QString(argv[i]) == "-small-screen")
- smallScreen = true;
-
QApplication app(argc, argv);
Window win;
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
if (!smallScreen) {
win.show();
} else {
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();
}