Skip to content
Snippets Groups Projects
Commit b67a8f54 authored by akiraohgaki's avatar akiraohgaki
Browse files

Set parent

parent 83562c4e
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ void XdgUrl::process() ...@@ -43,7 +43,7 @@ void XdgUrl::process()
} }
QString url = metadata_["url"].toString(); QString url = metadata_["url"].toString();
qtlibs::NetworkResource *resource = new qtlibs::NetworkResource(url, QUrl(url)); qtlibs::NetworkResource *resource = new qtlibs::NetworkResource(url, QUrl(url), true, this);
connect(resource, &qtlibs::NetworkResource::downloadProgress, this, &XdgUrl::downloadProgress); connect(resource, &qtlibs::NetworkResource::downloadProgress, this, &XdgUrl::downloadProgress);
connect(resource, &qtlibs::NetworkResource::finished, this, &XdgUrl::downloaded); connect(resource, &qtlibs::NetworkResource::finished, this, &XdgUrl::downloaded);
resource->get(); resource->get();
......
...@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) ...@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
// Setup QML // Setup QML
QQmlApplicationEngine qmlAppEngine; QQmlApplicationEngine qmlAppEngine;
QQmlContext *qmlContext = qmlAppEngine.rootContext(); QQmlContext *qmlContext = qmlAppEngine.rootContext();
qmlContext->setContextProperty("xdgUrlHandler", new handlers::XdgUrl(xdgUrl, config)); qmlContext->setContextProperty("xdgUrlHandler", new handlers::XdgUrl(xdgUrl, config, qmlAppEngine));
qmlAppEngine.load(QUrl("qrc:/qml/main.qml")); qmlAppEngine.load(QUrl("qrc:/qml/main.qml"));
return app.exec(); return app.exec();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment