<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" class="" style="word-wrap:break-word">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Jürgen,<br>
<br>
> We currently never use a QQuickView and normally require the root item to be a Window or if not to create a Window and reparent the item.<br>
<br>
Does this mean you do not actively use the embedded in-bench view nowadays? IIUC loading a QML component with Window as the root item always creates a separate window, not embedded in the bench.<br>
<br>
BR,<br>
Martin<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF16285"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Juergen Ryannel [juergen.bocklage-ryannel@pelagicore.com]<br>
<b>Sent:</b> Tuesday, August 09, 2016 9:43 PM<br>
<b>To:</b> Martin Kampas<br>
<b>Cc:</b> automotive@qt-project.org; Dominik Holland<br>
<b>Subject:</b> Re: QmlLive: Is LiveNodeEngine::RecreateView mode really needed?<br>
</font><br>
</div>
<div></div>
<div>Hi Martin,
<div class=""><br class="">
</div>
<div class="">Thanks for the proposal, sounds exactly like I would like to go forward with. I would even like to get ride of the QQuickView altogether (so on (3) not even optional. We currently never use a QQuickView and normally require the root item to be
 a Window or if not to create a Window and reparent the item.</div>
<div class=""><br class="">
</div>
<div class="">I’m currently on holiday, but I’m happy to review your patches. Thanks for looking into this.</div>
<div class=""><br class="">
</div>
<div class="">/ jryannel<br class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 09.08.2016, at 17:29, Martin Kampas <<a href="redir.aspx?REF=6-yQkrNfDkaxtwPL2vE6wvyM57BRBC_OVdwhvffwtT05bbSpE8HTCAFtYWlsdG86bWFydGluLmthbXBhc0Bqb2xsYS5jb20." class="" target="_blank">martin.kampas@jolla.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; direction:ltr; font-family:Tahoma; font-size:10pt">
Hi Jürgen,<br class="">
<br class="">
> We had some issues where content (e.g. QML, images, …) where cached and survived a clearComponentCache call. [...]<br class="">
<br class="">
You are right, images need additional handling in addition to clearComponentCache - there is QQuickWindow::releaseResources() which fixes it. Verified with a QML Image element<span class="Apple-converted-space"> </span><a href="redir.aspx?REF=uFO-hgrs5YBl9zd6UF_xKZ5jarfnUwURuDO2WsHSvMo5bbSpE8HTCAFodHRwczovL2NvZGVyZXZpZXcucXQtcHJvamVjdC5vcmcvIy9jLzE2NzQ4My8." class="" target="_blank">https://codereview.qt-project.org/#/c/167483/</a><br class="">
<br class="">
> Ideally we would not use a QQuickView at all and just depend on a QQmlEngine.<br class="">
<br class="">
Also my opinion - proposed in my reply to Dominik Holland.<br class="">
<div class=""><br class="">
> Additionally we would like to create the out-of-process option, where we control a remote process. This makes it easier to survive crashes from C++ plugins.<br class="">
<br class="">
I understand this feature to be rather orthogonal to the mechanism of reloading. Maybe as a last sort mechanism when things go bad. I would see it better to be implemented somewhere above LiveNodeEngine.<br class="">
<br class="">
Here is my proposal I wrote in my reply to Dominik Holland extended w.r.t your comments:<br class="">
<br class="">
I propose to<br class="">
<br class="">
1) remove the RecreateView mode and only rely on QQmlEngine::clear/trimComponentCache() and QQuickWindow::releaseResources()<br class="">
2) require to set QQmlEngine and make setting QQuickView optional (useless when the QML component instantiates QQuickWindow)<br class="">
3) only after that fix memory leaks in LiveNodeEngine :)<br class="">
4) remove the UpdateMode enum as no mode selection is needed anymore. Single implementation works in all cases; out-of-process control would be implemented as a feature orthogonal to the mechanism of reloading, not as another mutualy exclusive option.<br class="">
<br class="">
If you agree I will contribute patches for this.<br class="">
<br class="">
BR,<br class="">
Martin</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</body>
</html>