File has been removed ???
-
- Why am I getting this message ?
It seems at random. - isn't "moc" system generated so why saving it ?
- If it was removed - how can it be saved anyway?
Illogical Mr Spock
- Why am I getting this message ?
-
@AnneRanch said in File has been removed ???:
- Why am I getting this message ?
It seems at random.
You got this message because you opened
moc_mainwindow.cpp
in Qt Creator's code editor, and thenmoc_mainwindow.cpp
was deleted while it was still open.- isn't "moc" system generated so why saving it ?
The code editor doesn't differentiate between generated files vs. user-written files.
Normally, you don't want a file to disappear from disk while you're viewing/editing it, right? The code editor noticed that a file that you opened has disappeard. So, it's letting you know and asking how you'd like to proceed.
- If it was removed - how can it be saved anyway?
Illogical Mr Spock
Even though the file is no longer on disk, the file's contents are still in loaded into the code editor's memory. The code editor can use its memory to re-save a new copy of the file.
- Why am I getting this message ?
-
@JKSH said in File has been removed ???:
@AnneRanch said in File has been removed ???:
- Why am I getting this message ?
It seems at random.
You got this message because you opened
moc_mainwindow.cpp
in Qt Creator's code editor, and thenmoc_mainwindow.cpp
was deleted while it was still open.No, I am not editing opening moc file .
Even so - I am not deleting any file.- isn't "moc" system generated so why saving it ?
The code editor doesn't differentiate between generated files vs. user-written files.
If so - who what is deleting this file and why should I care if it is generated ?
It seem that the message is "just because" and has no purpose for the user.Normally, you don't want a file to disappear from disk while you're viewing/editing it, right? The code editor noticed that a file that you opened has disappeard. So, it's letting you know and asking how you'd like to proceed.
- If it was removed - how can it be saved anyway?
Illogical Mr Spock
Even though the file is no longer on disk, the file's contents are still in loaded into the code editor's memory. The code editor can use its memory to re-save a new copy of the file.
Again - the logic of the message is superfluous.
File which normally is not edited got deleted from disk, and not by the user and will be (hopefully) regenerated and can be restored / renamed (?) from memory.Basically nothing to write home about it...
- Why am I getting this message ?
-
@AnneRanch said in File has been removed ???:
No, I am not editing opening moc file .
In that case, we have a mystery on our hands.
If it happens again, please post a screenshot of the "File Has Been Removed" dialog, with the "Open Documents" pane visible:
Even so - I am not deleting any file.....
who what is deleting this fileGenerated files get deleted when you clean your project.
-
I am not sure if this will help.
Got the same error when attempting to "clear" the project.I will frelly admit I did not look inoto "moc" . My limited knowldge is that these are generated .
I guess the main question would be - why I am getting all these "moc" error and NOT any real references to the SOURCE of the error.
These errors should logically be because my SOURCE is wrong and that is what I can correct - not the result.
Maybe I need to revisit my "debug" options ?
If that is the case (and group interest) I could post the screen shot of my debug options to see which one is source of this "moc" showing up and not the real source of the problem. -
Then don't open this file in the IDE as @JKSH already told you...
-
@AnneRanch said in File has been removed ???:
I could post the screen shot of my debug options
This screenshot won't help us diagnose the issue.
What will help is what I said in my previous post: Please post a screenshot of the "File Has Been Removed" dialog, with the "Open Documents" pane visible. Look at the red, highlighted part of my screenshot.
-
@AnneRanch said in File has been removed ???:
I am not deleting any file.
Look closely at "Compile Output" in your last screenshot: You ran
"/usr/bin/make" clean -j4
, which deleted all of your generated moc files viarm -f
.