Commit 705dbc0a authored by Nicolas Fella's avatar Nicolas Fella

Load qml after setting context properties

parent 4188514e
......@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
KLocalizedString::setApplicationDomain("ktrip");
QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:/qml/main.qml")));
QQmlApplicationEngine engine;
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
qRegisterMetaType<KPublicTransport::LocationRequest>();
......@@ -83,5 +83,7 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty(QStringLiteral("_isAndroid"), false);
#endif
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
return app.exec();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment