Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-855

Q_OBJECT inside a "#if false/#endif" block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: Qt/MSBuild
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      If a source file holds

      #if false
      class foo {
        Q_OBJECT
      };
      #endif
      

      then the file gets recognized as MOC-type file and changes the compilation type whenever the file is saved to disk?! Aparently even then the Q_OBJECT needs to be commented out extra..

      Could not test with any newer plugin version as none of them works with VS2019.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            mecfc Miguel Costa
            Reporter:
            wwebber Wilhelm Weber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes