Solved Problem opening projects on a different computer
-
Hi everyone,
I have been having this problem for a while. I have the 32 bit version of Qt Creator 5.4.0 both at my university and at home. I create a non-Qt project at uni, copy the whole folder with all files and paste it on my laptop but the file does not open. It simply appears under Projects.
Today I tried to delete all the .user from the Qt Widgets Application I did the other and it was better. I could compile the file and run it. However, when I make changes to the file they do not appear on my application and I constantly get "Cannot retrieve debugging output."
Could someone tell me how I can open projects on different computers and be able to edit them ? Thank you in advance,
-
Are you opening two qt creator instance same a time ?
-
@jefazo92 please make sure you don't copy:
- build results
- Makefiles
- .pro.user files
Then it should work easily.
PS: Best is to use git to share projects between computer, it takes care of platform differrences like line endings.
Regards
-
@aha_1980 said in Problem opening projects on a different computer:
PS: Best is to use git to share projects between computer, it takes care of platform differrences like line endings.
Good advice to use git. But I wasn't aware of this: how can it possibly know whether my file named
fred
is or isn't a text file? Or does it assume if you store something in git it must be a text file?? -
@JonB No, you can check in binary too (if that is usefull at all, is another question).
So git seems to have some heuristics to detect text vs. binary files.
Regards
-
So git seems to have some heuristics to detect text vs. binary files.
GULP!!! :( :( I don't care what their "heuristics" might be, they are totally inadequate. git is being used for source control, it's vital they get things 100% correct, not "mostly right" which might be acceptable in other software cases. Can you give a documentation reference of where you have seen this behaviour for git, please?
-
@JonB You should google up that yourself - I'm too lazy.
All I can say for now is, that the line ending mechanism does work and that you can check in binary files.
So there must be something that let's git distinguish between both.
-
@aha_1980
Thanks ;-)
You've opened a can of worms (for me). Git does indeed decide whether a file is text or binary, possibly viafile
on Linux, goodness knows what on Windows, or perhaps with its own code, I don't know.You can influence it via
.gitattributes
, plus various command-line options to various commands as usual, documentation at https://git-scm.com/docs/gitattributes.Now that you've brought this to my attention, I see how many web questions are being asked over it not making the correct guesses. I wish I'd never heard of this... :)
-
Hi @JonB,
I wish I'd never heard of this... :)
If it helps you, I haven't had problems with that the last 6 years I've been using git. So most often it should "just work".
-
@aha_1980 you were totally right. As soon as I deleted all the Makefiles and .pro.user files , I started to be able to see the files under the projects section and make changes to my file. Also, for anyone who reads this, you must also unclick shadow build since it is activated again even if you coded your program without the build. Now it works totally fine. Thanks
-
Hi @jefazo92,
Ehem... unclicking shadow build leads to the situation that Makefiles and object files are generated in you source directory.
In 99% of cases, you should just leave them enabled and it will keep your source directory clean.
Regards
-
@aha_1980 thanks for telling me this. I didn't know that one. I unclick it because that is what I have been taught at uni and because you have all files under one same folder.