summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-09-29 01:50:22 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-09-29 01:50:22 (GMT)
commit25ccab91fbcd9e61fa160b55fc23d6938ff589bd (patch)
tree2a5ffce788bd05dc483138c212961dd3eb5fe653 /tools
parentde7c740247b09332304e961b4e4ec8edbe4ee4f1 (diff)
parenta913e326409062bbc1cad4d5898181c7b81cba23 (diff)
downloadQt-25ccab91fbcd9e61fa160b55fc23d6938ff589bd.zip
Qt-25ccab91fbcd9e61fa160b55fc23d6938ff589bd.tar.gz
Qt-25ccab91fbcd9e61fa160b55fc23d6938ff589bd.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlviewer/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index 98a5d3a..f82867f 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -26,6 +26,7 @@ void usage()
qWarning(" options:");
qWarning(" -v, -version ............................. display version");
qWarning(" -frameless ............................... run with no window frame");
+ qWarning(" -maximized................................ run maximized");
qWarning(" -fullscreen............................... run fullscreen");
qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
qWarning(" \"list\" for a list of built-ins");
@@ -104,12 +105,15 @@ int main(int argc, char ** argv)
QString translationFile;
bool useGL = false;
bool fullScreen = false;
+ bool maximized = false;
for (int i = 1; i < argc; ++i) {
bool lastArg = (i == argc - 1);
QString arg = argv[i];
if (arg == "-frameless") {
frameless = true;
+ } else if (arg == "-maximized") {
+ maximized = true;
} else if (arg == "-fullscreen") {
fullScreen = true;
} else if (arg == "-skin") {
@@ -243,11 +247,13 @@ int main(int argc, char ** argv)
viewer.setRecordDither(dither);
if (recordargs.count())
viewer.setRecordArgs(recordargs);
+ if (fullScreen && maximized)
+ qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen.";
if (!fileName.isEmpty()) {
viewer.openQml(fileName);
- fullScreen ? viewer.showFullScreen() : viewer.show();
+ fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
} else {
- fullScreen ? viewer.showFullScreen() : viewer.show();
+ fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
viewer.open();
}
viewer.raise();