D7580: Support loading by stream and restoring state on reload

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Sep 22 22:55:38 UTC 2017


kossebau added a comment.


  Thanks for quick reaction :) Will push now, even if we discovered another item which needs some more clarification. Would do a follow-up fix then if we find one is needed,

INLINE COMMENTS

> dfaure wrote in svgpart.cpp:191
> When I reload in konqueror (with KHTML or WebEngine), the yOffset is preserved.
> Looking at KonqView::restoreHistory this is because restoreState is only called when reload==false.
> 
> It might be a good idea for kate/kdevelop to do the same, they have the actual information of whether reload was pressed, while parts can only guess.

This is actually another item I am slightly unsure about and you now added to this unsureness. The API dox of OpenUrlArguments::reload() <https://api.kde.org/frameworks/kparts/html/classKParts_1_1OpenUrlArguments.html#a75c903644fed82bc1982cededcb1c05a> flag says:
"part should reload the URL, i.e. the cache shouldn't be used (forced reload). "

So far I asked I would have said this flag responds to whether "If-Modified-Since" should be added to the HTTP request header or that ETag be used (`reload=false`) or whether not (`reload=true`). And that "reload" should have rather been named "forcedReload".

So in the case of Kate/KDevelop (or rather the ktexteditor preview plugin, as this is the one who cares about feeding the new document data to the kparts plugin), setting the reload flag to `true` would mean the forced reload also of embedded document resources, like images, fonts or whatever external resources a document might include, right?
But actually we just want the new version of the text document to be loaded again. Which either

- is passed via a file, which has a newer filestamp then, thus indicates there is newer data inside, or
- is feed via a data stream, where one would assume the pushing side already made sure only an updated data version is pushed.

So previously I would have thought `reload=false` would be the correct thing to do, as there is no need for forced reload. Have I been missing something?

REPOSITORY
  R383 SVGPart

BRANCH
  supportstreamandreload

REVISION DETAIL
  https://phabricator.kde.org/D7580

To: kossebau, #frameworks, dfaure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170922/6ff0f595/attachment.html>


More information about the Kde-frameworks-devel mailing list