<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 #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D7580#144557" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D7580#144557</a>, <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> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D7580#144518" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D7580#144518</a>, <a href="https://phabricator.kde.org/p/kossebau/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@kossebau</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>When I read this initially, I guessed this method is just about the view state. But is also bound to data-pulling by the kpart, given that the default implementation explicitely calls openUrl() with the url stored in the datastream. Which might make sense for simple-to-use API with the non-stream use cases. But leaves out the stream-based data-pushing usage.</p></div>
</blockquote>

<p>It does indeed. Two incompatible features...</p>

<p>I think all we need is for the part to remember that it opened the URL via the stream api, and add that to the data saved by saveState(). Then in restoreState() we can skip openUrl() when that bool is true. It'll be up to the caller to redo the openStream/writeStream/closeStream sequence.</p></div>
</blockquote>

<p>Might work, yes. One issue: changing the content layout of the state QDataStream is currently not protected by any versioning, so existing stored history (like from session restore) would be parsed wrongly if suddenly the base implementation of restore also tries to extract such a bool? Might need some handling, though not sure if serious data would be lost.</p>

<p>As said, myself might look into improving this only later this year, so if you (or someone else) feels inspired to play with this, please go ahead already.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">BTW: can you tell if Falkon will/does support kparts?</pre></div></blockquote>

<p>It doesn't, and I don't think it will, but you can try to convince David Rosca ;)</p></blockquote>

<p>Too bad. Having a cross-media/format navigator like with Konqueror had been one of the things that attracted me to KDE.<br />
Okay, so nothing where I should extend my testing coverage to.</p>

<p>With the latest update then this patch would represent the blue-print for KParts plugins as I see it when it comes to supporting both state restoring and support for streams, at least for what is possible currently with the existing KParts API.</p>

<p>Any patterns which you see running against the ideas of the API? Or can this patch be applied as is, and be pointed to as template?</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>