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

Qt 5.5.0 moc: explicitly need to define QT_VERSION

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P2: Important P2: Important
    • None
    • 5.5.0
    • Build tools: qmake
    • None
    • Mac OS X 10.10+, XCode 5+

      Hi,

      I am creating a Qt plugin on Mac and using Qt 5.5.0.
      This conforms to the standard way(s) of creating a Qt plugin.
      When running moc on the plugin source, I do not get the expected
      QT_MOC_EXPORT_PLUGIN(..., ...) /* name omitted */
      line that should be generated by moc to create a plugin.
      However if on the moc command line I pass, -DQT_VERSION=0x050000, this line does get generated.

      However on Windows it works as expected, and -DQT_VERSION=0x050000 is not needed.

      Why is this difference in moc behaviour between Windows and Mac?
      Shouldn't moc 'know' the Qt Version without being explicitly told?

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

            ogoffart Olivier Goffart (Woboq GmbH)
            mahendra mahendra
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes