Feature request Qt Creator
-
On the other hand, using sessions solves this problem, as a session cares not only for open projects, but also for open files.
-
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?
-
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?
-
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.
-
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.
-
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).
-
@ghal_maraz: closing all files that are not "owned" by one of the remaining projects would be wrong.
-
[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.
-
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!
-
[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]
-
How about using Ctrl-Shift-W (or File->Close All) to close all open editors?