Bug 369623

Summary: Kate Document dbus bindings missing
Product: [Applications] kate Reporter: Luke-Jr <luke-jr+kdebugs>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: critical CC: cullmann, simonandric5
Priority: NOR    
Version: 16.04   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luke-Jr 2016-10-02 04:07:04 UTC
I have a script I run when I'm concerned that my system may suddenly die. Among the various things it does, is go through all my open KWrite/Kate windows and dump the current contents of them to a temporary directory. However, the dbus bindings for documents seem to be missing since I switched from KDE 4 to 5, and I see no alternative way to access the text content of the editors.

Reproducible: Always
Comment 1 Luke-Jr 2016-11-14 09:12:21 UTC
https://git.reviewboard.kde.org/r/129398/
Comment 2 Christoph Cullmann 2017-07-24 23:00:39 UTC
Actually I would like to avoid having QDBus as dependency for the framework.

Exposing that to dbus might not be wanted by all applications embedding the part, as this allows "unwanted" modifications of the document content without any application control.

Actually, for your usecase, we always have swap files which will avoid any data-loss, even on sudden system crashs.
Comment 3 Luke-Jr 2018-02-16 16:24:27 UTC
> Exposing that to dbus might not be wanted by all applications embedding the
> part, as this allows "unwanted" modifications of the document content without
> any application control.

Perhaps the readonly attribute should be enforced on dbus access?

> Actually, for your usecase, we always have swap files which will avoid any
> data-loss, even on sudden system crashs.

Not for untitled/unsaved editors...?
Comment 4 Luke-Jr 2018-02-16 16:24:41 UTC
Moved the patch to https://phabricator.kde.org/D10587
Comment 5 Christoph Cullmann 2018-07-14 20:28:05 UTC
I still not see that such an interface makes sense.

I agree on the issue with no swap files for unsaved documents.
That is an issue.
There is bug 394833 for that and any solution is highly appreciated.

A solution for that will help all users, this will only help more or less one user and introduce again QtDBus dependencies + overhead for each document.

Any help for the other bug 394833 is appreciated, as I now wrote into the review request, too.