KDevelop plugin
Sven Brauch
mail at svenbrauch.de
Thu Oct 7 15:54:34 BST 2021
Hi,
On 10/4/21 8:00 PM, Stefan Yohansson wrote:
> There's any signal/slot or event system anyway to receive edit, save,
> open events? at least know which line number was changed at the file
> when saving it.
sorry I've gotten quite rusty with KDevelop's code, so I can't give you
an exact snippet, but what you want goes something like this: get the
list of open documents from the document controller, obtain the
KTextEditor::Document instance from those, and connect to the notifier
signals (e.g. textChanged) of that class.
Look at e.g. problemreporterplugin.cpp in kdevelop's repository, it does
something similar.
See also
https://api.kde.org/frameworks/ktexteditor/html/classKTextEditor_1_1Document.html,
you can obtain this object type from KDevelop's "TextDocument" wrapper
type. As you can see it provides a lot of features to do the things you
mention.
Greetings!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA4AAD0019BE03F15.asc
Type: application/pgp-keys
Size: 3139 bytes
Desc: OpenPGP public key
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20211007/a9c4e364/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20211007/a9c4e364/attachment.sig>
More information about the KDevelop-devel
mailing list