Force reload of externally changed files in Qt Creator



  • I looked around in the options but didn't find one to automatically reload a file if it was changed by external forces. I have Perforce set up to added info to the header when a file gets checked in and it is very annoying to have Qt Creator always ask me if I want to reload the file.


  • Lifetime Qt Champion

    Hi
    In options.
    alt text


  • Qt Champions 2018

    @mrjj And I really wonder why "reload unchanged editors" is not the default.

    After I changed that, my life became easier.


  • Lifetime Qt Champion

    @aha_1980
    Well, it was finally time for the Yes to All button to get some action.
            All these years it had been the Ok button that had it all.
                   And the Developer saw a chance to change that.

    alt text


    I also wondered that when i found the setting.
    I cant see any reason except to give Dev complete control/options.


  • Qt Champions 2018

    @mrjj I wonder how the dialog could be improved?

    We would need a possibility to choose "Always reload" and "Always ignore" possibilities (e.g. checkboxes).

    Then it would be more obvious how to get rid of the dialog.

    That's how it looks now:

    0_1556362273297_8ef9b2e0-6246-4c6f-ab19-0ea25cd71f98-image.png


  • Lifetime Qt Champion

    Hi
    "Always reload" and "Always ignore" checkboxes would work great,
    however, we would be mixing
    concepts as Dialog is pr file whereas the setting is for all files.

    The dialog gives options to cherry pick but setting disables the dialog.
    So "Always reload" could read to the user as always reload this file or
    as we mean it, always reload all files.

    What that in mind, i was wondering if a label with
    "The File Change Dialog can be configured in Options\Inviroment\system"
    below the buttons would do it.


  • Qt Champions 2018

    @mrjj I guess that's the best we can do for now, as the dialog is modal and opening the settings from there would be complicated.

    Here's the patch: https://codereview.qt-project.org/259927


  • Lifetime Qt Champion

    @aha_1980
    So productive :)
    Well, i think it is very fine. Opening settings would be a nice touch but
    not worth the hassle. (IMO)
    But making the user aware it can be disabled/changed is excellent UX.


  • Qt Champions 2018

    @mrjj said in Force reload of externally changed files in Qt Creator:

    But making the user aware it can be disabled/changed is excellent UX.

    Full ack. Took me 6 or 7 years until I found it :)


  • Lifetime Qt Champion

    @aha_1980
    Hehe that is lots of clicks :)
    Well i was like 2 years to discover that you can ask it
    to insert base class function override with 2 clicks instead of
    go copy paste from the docs.


  • Qt Champions 2018

    @mrjj We're getting off-topic, but yes: with every function you integrate there is a possibility the end-user is not even aware of.

    Seems to be one the major problems (the other one is not-working functiona) in current programming industry.


  • Lifetime Qt Champion

    @aha_1980
    Indeed we are. It's just a shame that many? new users never see the true power of alt+enter.
    I mean the feature to sync function signature changes between h/cpp is priceless.
    The combination of Add Widget wizard and insert base function is a productivity booster.
    Pressing alt-enter on an undefined class to have it add #include automatically is very addictive.
    I have been contemplating a video called "Things You will like to know about QtCreator" quickly showing off the
    most beloved features. Just need a mic though.


  • Qt Champions 2018

    @mrjj That would surely be an awesome video! There are indeed some introducing videos on youtube, but the productivity boosters are missing.

    I can only encourage you to do it :)



  • @mrjj wow - crazy. I searched and searched and searched, including that very page, and did not notice that drop down. I knew it had to be there somewhere, but just glossed over it. Very odd.

    Thanks!


  • Qt Champions 2018

    @JonathanA the next release will have a hint in the messagebox :)


  • Moderators

    @aha_1980 said in Force reload of externally changed files in Qt Creator:

    @mrjj And I really wonder why "reload unchanged editors" is not the default.

    After I changed that, my life became easier.

    I'm actually thankful for that,
    twice now I have accidentally overwritten files with older backup ones, and having them still open in QtC saved my day ;)


  • Qt Champions 2018

    @J.Hilk Which again shows, the workflows are different.

    I extensively use Git, and having the prompts when you externally rebase etc. is disturbing for me.

    But good that you have the choice to use the workflow that suits you best.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.