Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Feature request Qt Creator
Qt 6.11 is out! See what's new in the release blog

Feature request Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
15 Posts 7 Posters 8.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Often when I close a project and open an other project all open editors from the already closed project are still open as well as some files are still not saved. So sometimes it happens that I'm changing the wrong file while the file name is the same as in the other project (i.e. mainwindow.cpp).
    So for me the expecting behavior would be to close all open editors while the project is unloading/closing.

    I have already created a feature request for "QtCreator":https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6593 .

    What do think about this?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Although I've never considered that to be a bug, now you talk about, I think you're right :)

      (Z(:^

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        On the other hand, using sessions solves this problem, as a session cares not only for open projects, but also for open files.

        (Z(:^

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          It's not a bug it's a feature request. You can vote for it ;-)
          I don't think the session can handle this. A simple switch in the settings would be great. So everyone can handle this on it's own.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            As usual this is more tricky than it sounds (as dt already pointed out when closing the report;-).

            Sessions should address your problem though. Are you using those?

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              In my opinion sessions are not the right way. I have a lot of totaly different projects. So why should I put this together in one session? The other problem I have seen in between this behavior is that some users close the project but the didn't recognize this because all file are still open!

              I don't want to have all projects I have and the projects of our costumors included in one session.
              I don't have one big project. I have a lot of "small" projects!

              What is the best way to handle this?

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                IMHO your suggestion sounds good. I'm regulary complaining about this missing feature.

                And I don't think that this is impossible like it's said in the bugreport. You could check if an opened file is in the closed project and in no other open project.

                Eclipse behaves similar.

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #8

                  I'm glade to see that I'm not the only one who think so ;-)

                  May be it's not so easy to implement this but I think it would be very handy and helpful for the workflow. A first step can be to close the open files and if there is a indeterminate file, let it open or ask what to do!? Just some thought about it.

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    I usually group related projects together in sessions. This way you don't need a session for every single project.

                    On the other hand, it surely would be fine to close all open files that undoubtedly belong to the project that has been closed (ie. all files listed in the .pro of that project).

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #10

                      @ghal_maraz: closing all files that are not "owned" by one of the remaining projects would be wrong.

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #11

                        [quote author="Scylla" date="1321947146"]Often when I close a project and open an other project all open editors from the already closed project are still open as well as some files are still not saved. So sometimes it happens that I'm changing the wrong file while the file name is the same as in the other project (i.e. mainwindow.cpp).
                        So for me the expecting behavior would be to close all open editors while the project is unloading/closing.

                        I have already created a feature request for "QtCreator":https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6593 .

                        What do think about this?
                        [/quote]

                        I think that for safety purpose is that, you must always Ctrl+s whenever you have edited a file, although it only a small modification. Before editing, make sure that you are currently working in the correct file. Every programmers must be able to do that.

                        To do that, simply hover the file that you want to edit in the drop down list. And you will see which project that file is referring to. I don't think it's a bug. It's just that you maybe after closing a project, you might want to do last edit to the file of the closed project.

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #12

                          bq. I think that for safety purpose is that, you must always Ctrl+s whenever you have edited a file, although it only a small modification. Before editing, make sure that you are currently working in the correct file. Every programmers must be able to do that.

                          I don't think so. If you close the project you can ask if the file should be saved a.s.o.

                          bq. @ghal_maraz: closing all files that are not “owned” by one of the remaining projects would be wrong.

                          That is not correct. You can open a file which doesn't belong to a project!

                          And again it's not a bugreport it's a feature request!

                          1 Reply Last reply
                          0
                          • ? Offline
                            ? Offline
                            A Former User
                            wrote on last edited by
                            #13

                            [quote author="Duck" date="1322589221"]@ghal_maraz: closing all files that are not "owned" by one of the remaining projects would be wrong.[/quote]

                            Of course it is wrong to close all files related to no open project. But this ain't what I said.

                            [quote author="ghal_maraz" date="1322227414"]You could check if an opened file is in the closed project AND in no other open project.[/quote]

                            1 Reply Last reply
                            0
                            • ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #14

                              After all, I had a deeper look at the session control and it works. But in my opinion it's not intuitive/obvious to use. So you have to change the session to close the open files. You need a empty session to close all.

                              1 Reply Last reply
                              0
                              • ? Offline
                                ? Offline
                                A Former User
                                wrote on last edited by
                                #15

                                How about using Ctrl-Shift-W (or File->Close All) to close all open editors?

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved