Commit d16869d1 by Paweł Wegner

cloudbrowser: root item owned by JavaScript.

parent 75d420de
......@@ -137,7 +137,9 @@ QObject* CloudContext::root(QVariant provider) {
auto label = provider.toMap()["label"].toString().toStdString();
for (auto&& i : provider_)
if (i.label_ == label) {
return new CloudItem(i.provider_, i.provider_->rootDirectory(), this);
auto item = new CloudItem(i.provider_, i.provider_->rootDirectory());
QQmlEngine::setObjectOwnership(item, QQmlEngine::JavaScriptOwnership);
return item;
}
return nullptr;
}
......
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