Qt Creator. Missing shortcut: Go to last edit



  • VS2017 have a shortcut to go to last edited code (really useful).

    After asking it in StackOverflow, they told me that this shortcut is missing in Qt Creator. I sent an email to Qt asking for this feature a month ago, but they doesn't reply.

    Do you know if Qt have some specific email for this sort of enhancements?

    Also, do you know if QtCreator provides the tools to develop this shortcut at my own, as a type of plugin or something like that?

    Thanks!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should open a feature request on the bug report system targeting the Qt Creator project.


  • Qt Champions 2018

    @wilem2 There is ongoing work to add this feature: https://codereview.qt-project.org/c/qt-creator/qt-creator/+/190374

    There are only a few open points, but hopefully this function can be added soon.

    Regards



  • @aha_1980 I'm (the author of those commits) not planning to work on this any time soon because I've managed to fix my previous IDE so my migration to QtCreator isn't a priority.

    If anyone wants to finish the work on this feature then feel free to proceed.



  • Hi @devel and @aha_1980 .
    For what it shows in 190374: EditorManager: add GotoLastEdit action (Here)
    A great part of the code seems to be done, but only remains a "more elaborated commit", is that all?
    Is there more work to do?
    TIA


  • Qt Champions 2018

    Hi @Wilem2,

    unfortunately I don't know that code well enough to finish the patch.

    I think most of the work is done and you could already integrate the patch into your self-build Creator.

    If you want to push the integration forward, you should comment directly on Gerrit and ask what is needed to be accepted.

    If you want to work on the patch, I can support you to my best knowledge.

    Btw, do you have a commercial license?

    Regards



  • Hi @aha_1980. No, I don't use the commercial license, do I need it to code Qt?
    Also, I work with Ubuntu, will it be a problem to compile qtCreator?
    Many thanks


  • Qt Champions 2018

    Hi @Wilem2,

    No, I don't use the commercial license, do I need it to code Qt?

    No, you don't need. But if you had one, you could easily contact commercial support for help ;)

    Also, I work with Ubuntu, will it be a problem to compile qtCreator?

    No, that make it indeed very easy - I use Ubuntu 18.04 for hacking. Just run git clone https://code.qt.io/qt-creator/qt-creator.git and afterwards open the qtcreator.pro file in QtCreator. Then you can compile, run and debug the program.

    If you got that, then I'll tell you how to integrate the patch :)

    Best regards



  • Hello @aha_1980 ,
    I followed your instructions and now I can run qtCreator in debug mode.
    How I integrate the patch of @devel ? Do I need a Jira and Gerrit accounts to push code?
    Thanks in advance!


  • Qt Champions 2018

    Hi @Wilem2,

    glad you got so far!

    How I integrate the patch of @devel ? Do I need a Jira and Gerrit accounts to push code?

    If you want to continue working on it and pushing a new version, yes. Please see below in that case.

    If you just want to try to patch in your repo, it should be enough to do (I cannot try that, as I have an account):

    git fetch "https://codereview.qt-project.org/qt-creator/qt-creator" refs/changes/74/190374/4 && git cherry-pick FETCH_HEAD
    

    To continue work on the patch, you need to set up Gerrit properly.

    You should follow https://wiki.qt.io/Gerrit_Introduction, roughly, the following is needed:

    1. Create a Gerrit/Jira account
    2. Confirm the CLA (contribution license agreement)
    3. Upload your public SSH key to gerrit
    4. Add gerrit as remote to your git repo git remote add gerrit ssh://<your-user-name>@codereview.qt-project.org:29418/qt-creator/qt-creator
    5. git fetch gerrit
    6. Modify code, commit
    7. git push gerrit HEAD:refs/for/master

    Regards



  • Hello @aha_1980

    Thanks for your guidelines.

    I follow your steps, but I messed up at the time of pushing code because I created 2 new tasks in gerrit and not modify the Original Task.
    The ones I created are this and this1.

    I think the problem is with the command: "git push gerrit HEAD:refs/for/master"
    which I copy-paste it in bash, but I think i have to put something in the "refs/for/master". Could you please tell me, in the case of the task, what I have to put there?

    Also, the Sanity Bot tells me that I have a supsicious name, but I change it, as you can see in my profile info:

    Profile.png

    Many thanks!


  • Qt Champions 2018

    We could solve the first part together in a chat session by:

    git reset HEAD~2
    git commit --amend
    
    git push HEAD:refs/for/master
    

Log in to reply