~feng-kylin/unity8/fix-lp1413791

« back to all changes in this revision

Viewing changes to src/Dash/main.cpp

  • Committer: Michael Zanetti
  • Date: 2015-06-17 12:14:27 UTC
  • mfrom: (1595.1.214 unity8)
  • mto: (1595.1.232 unity8)
  • mto: This revision was merged to the branch mainline in revision 1608.
  • Revision ID: michael.zanetti@canonical.com-20150617121427-lgc70azrbtsanejb
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    parser.process(*application);
59
59
 
60
60
    ApplicationArguments qmlArgs;
61
 
    if (parser.isSet(windowGeometryOption) &&
62
 
        parser.value(windowGeometryOption).split('x').size() == 2)
63
 
    {
64
 
        QStringList geom = parser.value(windowGeometryOption).split('x');
65
 
        qmlArgs.setSize(QSize(geom.at(0).toInt(), geom.at(1).toInt()));
66
 
    }
67
61
 
68
62
    if (getenv("QT_LOAD_TESTABILITY")) {
69
63
        QLibrary testLib(QLatin1String("qttestability"));
85
79
 
86
80
    QQuickView* view = new QQuickView();
87
81
    view->setResizeMode(QQuickView::SizeRootObjectToView);
 
82
 
 
83
    if (parser.isSet(windowGeometryOption) &&
 
84
        parser.value(windowGeometryOption).split('x').size() == 2)
 
85
    {
 
86
        QStringList geom = parser.value(windowGeometryOption).split('x');
 
87
        QSize windowSize(geom.at(0).toInt(), geom.at(1).toInt());
 
88
        if (windowSize.isValid()) {
 
89
            view->setWidth(windowSize.width());
 
90
            view->setHeight(windowSize.height());
 
91
        }
 
92
    }
 
93
 
88
94
    view->setTitle("Scopes");
89
95
    view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
90
96