<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7580" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>As I see it, it's *either* openUrl/closeUrl *or* openStream/writeStream/closeStream.</p></blockquote>

<p>Hm, when I before did a quick search for how to use the stream API, I came across<br />
<a href="https://api.kde.org/frameworks/khtml/html/classKHTMLPart.html#details" class="remarkup-link" target="_blank" rel="noreferrer">https://api.kde.org/frameworks/khtml/html/classKHTMLPart.html#details</a><br />
which made me think the closeStream is more in the idea of QIODevice::close, to hint that there is no further data coming in.</p>

<p>The API dox of ReadOnlyPart enforced that idea with me:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://api.kde.org/frameworks/kparts/html/classKParts_1_1ReadOnlyPart.html#aa828fc225a2f32563624053f80f40257" class="remarkup-link" target="_blank" rel="noreferrer">ReadOnlyPart::closeStream()</a>: "Terminate the sending of data to the part."</li>
<li class="remarkup-list-item"><a href="https://api.kde.org/frameworks/kparts/html/classKParts_1_1ReadOnlyPart.html#a7c7633244f0419124ca52224379d4743" class="remarkup-link" target="_blank" rel="noreferrer">ReadOnlyPart::doCloseStream()</a>: "This is called by closeStream(), to indicate that all the data has been sent. Parts should ensure that all of the data is displayed at this point."</li>
</ul>

<p>And with that in mind the existing ReadOnlyPart code matched my expectations, as <tt style="background: #ebebeb; font-size: 13px;">ReadOnlyPart::openStream</tt>calls closeUrl, similar to how <tt style="background: #ebebeb; font-size: 13px;">ReadOnlyPart::openUrl</tt> calls it.</p>

<p>So openUrl would be only matched by openStream/writeStream/closeStream, with the latter triple being the push variant to the first. And closeUrl would be used with both, to tell the part to unload the current content, disconnect from the content source if needed and display some void, with the url being reset to invalid/none. So the whole purpose of closeStream would be to just signal that no more data will come in, so e.g. any "loading more" indicator can be hidden.</p>

<p>I now found the original discussion thread for the stream API (<a href="http://markmail.org/message/vn2wu7r3mowf2gya" class="remarkup-link" target="_blank" rel="noreferrer">KParts API: thinking about the future...</a>, just 15 years old :) ) which does not shed that much more light onto the idea of the API, though I could read into it my existing understanding of the API :)</p>

<p>But that's why I included you <a href="https://phabricator.kde.org/p/dfaure/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@dfaure</a> into this review, as there is no current implementation/usage of the API, so chance I just see what I need here :) And hope you(r memories) could correct me were wrong. Though now I see your initial memories conflicting with the API dox & code? Meh...</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R383 SVGPart</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7580" rel="noreferrer">https://phabricator.kde.org/D7580</a></div></div><br /><div><strong>To: </strong>kossebau, Frameworks, dfaure<br /></div>