Review Request 127241: Change default CTRL+Click jump to definition instead of declaration

Pedro Ferreira esteaqui at hotmail.com
Tue Mar 1 15:50:33 UTC 2016



> On March 1, 2016, 3:43 p.m., Sven Brauch wrote:
> > Good change.
> > 
> > I dislike QPair<> API very much, but maybe it's just me. I think a struct JumpLocation { QUrl url; Cursor location; } is much nicer to read. With QPair you always end up with a lot of .first() .second() and you never know what the first and the second thing is.

Thats actually a great idea. I'll do that now.


> On March 1, 2016, 3:43 p.m., Sven Brauch wrote:
> > plugins/contextbrowser/browsemanager.cpp, line 297
> > <https://git.reviewboard.kde.org/r/127241/diff/1/?file=446206#file446206line297>
> >
> >     I think it's a bit weird to first calculate all the things and then check if it's actually the event we calculated it for. First do this check and then calculate the jump location.

Because we need to know if the jump would be valid. Note that we are changing the mouse cursor. I suppose it could be refactored to be less heavy... I'll see what I can do.


- Pedro


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127241/#review93008
-----------------------------------------------------------


On March 1, 2016, 3:49 p.m., Pedro Ferreira wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127241/
> -----------------------------------------------------------
> 
> (Updated March 1, 2016, 3:49 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> The current default behaviour on CTRL+Click causes the editor do jump to the function's declaration. This patch changes that to jump to definition instead.
> I initially wrote this as a personal hack, but from IRC conversations, it seems that I'm not the only one who's annoyed at this behaviour, so here's my upstream attempt.
> Do note that I know little of the sorrounding code. If you believe further changes are required, I'll need some guidance on that.
> 
> 
> Diffs
> -----
> 
>   plugins/contextbrowser/browsemanager.h f631189 
>   plugins/contextbrowser/browsemanager.cpp 1c5cc70 
> 
> Diff: https://git.reviewboard.kde.org/r/127241/diff/
> 
> 
> Testing
> -------
> 
> It works on my projects and on my KDevPlatform project.
> 
> 
> Thanks,
> 
> Pedro Ferreira
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160301/5742df09/attachment-0001.html>


More information about the KDevelop-devel mailing list