D6838: Fix duplicated annotation context menus & entries on repeated border show

Sven Brauch noreply at phabricator.kde.org
Mon Jul 31 18:08:19 UTC 2017


brauch requested changes to this revision.
brauch added a comment.
This revision now requires changes to proceed.


  Hm, yes, it seems plausible to me that we need to do something like this ... I wonder though, wouldn't it be better if KTE took ownership of the model passed in, and deleted it when the border was hidden?

INLINE COMMENTS

> vcspluginhelper.cpp:397
>                      this, SLOT(annotationContextMenuAboutToShow(KTextEditor::View*,QMenu*,int)));
> +            connect(doc->activeTextView(), SIGNAL(annotationBorderVisibilityChanged(View*,bool)),
> +                    this, SLOT(removeAnnotationModel(View*,bool)));

Why do you use string-based connect here...?
I think you can simply qobject_cast the view to AnnotationViewInterface* and use the modern function-pointer variant.

REPOSITORY
  R33 KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D6838

To: kossebau, #kdevelop, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170731/fd4901a0/attachment.html>


More information about the KDevelop-devel mailing list