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. File has been removed ???
Forum Updated to NodeBB v4.3 + New Features

File has been removed ???

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 3 Posters 1.3k Views 2 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1
    1. Why am I getting this message ?
      It seems at random.
    2. isn't "moc" system generated so why saving it ?
    3. If it was removed - how can it be saved anyway?
      Illogical Mr Spock

    3f495751-16b9-47fa-8c43-1aa2630609ee-image.png

    JKSHJ 1 Reply Last reply
    0
    • A Anonymous_Banned275
      1. Why am I getting this message ?
        It seems at random.
      2. isn't "moc" system generated so why saving it ?
      3. If it was removed - how can it be saved anyway?
        Illogical Mr Spock

      3f495751-16b9-47fa-8c43-1aa2630609ee-image.png

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @AnneRanch said in File has been removed ???:

      1. 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 then moc_mainwindow.cpp was deleted while it was still open.

      1. 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.

      1. 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.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      A 1 Reply Last reply
      3
      • JKSHJ JKSH

        @AnneRanch said in File has been removed ???:

        1. 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 then moc_mainwindow.cpp was deleted while it was still open.

        1. 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.

        1. 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.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @JKSH said in File has been removed ???:

        @AnneRanch said in File has been removed ???:

        1. 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 then moc_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.

        1. 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.

        1. 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...

        JKSHJ 2 Replies Last reply
        0
        • A Anonymous_Banned275

          @JKSH said in File has been removed ???:

          @AnneRanch said in File has been removed ???:

          1. 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 then moc_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.

          1. 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.

          1. 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...

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @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 file

          Generated files get deleted when you clean your project.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          4
          • A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            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.

            7395bbb8-569c-4ef7-bdc8-e609bb915fc2-image.png

            JKSHJ 1 Reply Last reply
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Then don't open this file in the IDE as @JKSH already told you...

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              3
              • A Anonymous_Banned275

                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.

                7395bbb8-569c-4ef7-bdc8-e609bb915fc2-image.png

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @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.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                4
                • A Anonymous_Banned275

                  @JKSH said in File has been removed ???:

                  @AnneRanch said in File has been removed ???:

                  1. 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 then moc_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.

                  1. 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.

                  1. 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...

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by JKSH
                  #8

                  @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 via rm -f.

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  4

                  • Login

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