diff options
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 1 | ||||
-rw-r--r-- | tools/qmlviewer/main.cpp | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index e266a91..44b17e6 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -588,6 +588,7 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, bind->m_mePtr = &bindValues.values[bindValues.count - 1]; bind->setTarget(mp); bind->addToObject(target); + bind->setSourceLocation(comp->url, instr.line); } break; 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(); |