Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83919

moc doesn't understand #if true

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.2
    • Build tools: moc
    • None

    Description

      Following code is skipped by moc and causes link error:

      #if true
      class MainWindow : public QMainWindow
      {
          Q_OBJECT
      
      public:
          MainWindow(QWidget *parent = nullptr);
          ~MainWindow();
      };
      #endif
      

      Using 1 instead of true works.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes