Support loading by stream and restoring state on reload

Authored by kossebau on Aug 27 2017, 11:17 PM.

Description

Support loading by stream and restoring state on reload

Summary:
The KTextEditor Preview plugin repeatedly feeds new
versions to the same kpart instance, to allow instant
preview of changes. To avoid stressing of the filesystem
the stream API of the kpart is used if available.

This patch adds support for the stream API.
Additionally it remembers the view state on closing an url,
and if the same url is loaded again, the view state is restored.
The latter allows continuous display of the same, but
updated file as e.g. happening with the preview plugin.

Test Plan:
Editing SVG files in Kate/KDevelop using the KTextEditor Preview plugin will
no longer reset the offset to 0,0 each time the view is updated on
changes, also is the filesystem no longer used on updates.

Reviewers: Frameworks, dfaure

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D7580

Details

Committed
kossebauSep 22 2017, 11:04 PM
Reviewer
dfaure
Differential Revision
D7580: Support loading by stream and restoring state on reload
Parents
R383:f8ee697f5173: Fix .arcconfig
Branches
Unknown
Tags
Unknown