[app] Set context properties prior to loading QML

This commit is contained in:
Slava Monich 2015-08-18 17:37:34 +03:00
parent f30d83bf39
commit 7042dbff79

View file

@ -166,14 +166,13 @@ void ZLibrary::run(ZLApplication* aApp)
HDEBUG("qml file" << qPrintable(qml));
QQuickView* view = SailfishApp::createView();
view->setSource(QUrl::fromLocalFile(qml));
QQmlContext* root = view->rootContext();
root->setContextProperty("PointsPerInch", BOOKS_PPI);
root->setContextProperty("MaximumHintCount", 1);
root->setContextProperty("DoubleClickInterval",
qApp->styleHints()->mouseDoubleClickInterval());
view->setSource(QUrl::fromLocalFile(qml));
view->show();
HDEBUG("started");
qApp->exec();