KTextEditor::ModificationInterface in connect

Daan De Meyer daan.j.demeyer at gmail.com
Tue Aug 20 18:02:52 BST 2019


I searched a little more and it seems there's no way to use the new
style connect with signals in interfaces so I'm going to drop this for
now.

Regards,

Daan


On Tue, 20 Aug 2019 at 09:42, Christoph Cullmann <christoph at cullmann.io> wrote:
>
> 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
> fixed,
> if it introduces regressions is an other thing).
>
> Greetings
> Christoph
>
> --
> Ignorance is bliss...
> https://cullmann.io | https://kate-editor.org


More information about the KWrite-Devel mailing list