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
https://git.reviewboard.kde.org/r/129398/
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.
> 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...?
Moved the patch to https://phabricator.kde.org/D10587
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.