Project files deleted when running program in Qt Creator
I have a very strange problem. I do not seem to find anyone who has a similar problem.
For a year now I have developed a program and Qt Creator + Qt has always worked nicely.
Recently I started to get a problem. Periodically when running my program in Qt Creator all my project files has been deleted. Only the program's exe file remains. I am puzzled as I have nothing in the program that warrents this behaviour. I can only imagine that it is Qt Creator that is doing something but no one else seems to experience this problem.
I recently upgraded from Qt Creator 4.5.2 to 4.6, I can not recall if the problem came after or before, but I am quite sure it was after.
I tried to install Qt Creator 4.5.2 seperatly but it did not want to import my project properly due to missing kit setup
I have not tried to see what happens if I run the application through terminal instead of using Qt Creator.
Does anyone know what to do when faced with this kind of problem?
Hi and welcome to the forums.
You mean files are removed from the project folder ?
Your .cpp etc ?
Or do you mean it removes the stuff from the build folder ?
It does sound odd.
Also, can you make it do the "thing" using a plain GUI default project?
Every file is removed. My .cpp, .h, .ui files. My files under release and debug folders. My .pro and .pro.user.
Even my mercurial .hg folder is removed.
Everything except for my executable file, .exe
There are a few folders that are left but their content is gone.
@SAslund One moment: you have source files (*.h, *.cpp) inside release/debug folders? These folders are temporary folders used for building your project. You should NOT store anything there!
Yea. I can see how that sentence can be misunderstood. Thats what you get from answering late in the evening.
Don't worry. My source files are stored in my src folder.
Let me rephrase. Everything is deleted. My source files and build files. Even files that are not part of the Qt project are deleted. My mercurial .hg folder. My documentation folder with the manual. My exe folder with Qt libraries and InnoSetup script.
It seems very strange. Reminds me of a good old rm -r from Linux.
AS far as i know QCreator do not clean anything up by its own.
Can you reproduce it with a NEW default GUI project ?
I suspect you have some extra build commands that cleans.
It is a periodically problem. Monday I was using the program for testing several times without fail. Tuesday suddenly the files got deleted when running the program. Just once though.
Yesterday I did some debugging on the program and I did not experience any issue.
As a note. I have only experienced it when I run the program through Qt Creator. It is also my main way of running it.
I have other projects. I must wait and see if they promt same behaviour.
Ok so its not reproducible with a NEW default GUI project very easy.
I have never seen such issue or seen post about it. I have 6 people using Creator
8 hours a day and not seen anything like it.
So very strange indeed.
@SAslund Could it be your app which deletes the files?