KTextEditor::ModificationInterface in connect

Christoph Cullmann christoph at cullmann.io
Tue Aug 20 08:42:12 BST 2019

On 2019-08-20 09:28, Daan De Meyer wrote:
> connect requires `ModificationInterface` to contain a `Q_OBJECT` call
> when using the new signal/slot syntax (which it doesn't contain).
> Otherwise, we need to cast to the actual private implementation class
> to use the slot (assuming that class does contain `Q_OBJECT`) but from
> what I can understand from KTextEditor's design this might not be
> possible or desirable.
> Putting `Q_OBJECT` in all the interface classes might work but then we
> get into the issue again that we'd have to rely on the latest version
> of frameworks to be able to rely on that being there.

I don't think that is the solution, as the interfaces are no QObjects
on their own.

Actually, perhaps signal/slot refactoring is not the best thing to
start with, given that might only introduce regressions (e.g. you need
to be careful to have all connect/disconnect in the same style, we had
issues with that before).

Perhaps it would be easier if you start with taking a look
at some bugs we have open and if there is something "easy" to fix.

That is normally nicely testable (at least if the reported bug got 
if it introduces regressions is an other thing).


Ignorance is bliss...
https://cullmann.io | https://kate-editor.org

More information about the KWrite-Devel mailing list