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

Qt 5.5.0 moc: explicitly need to define QT_VERSION

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes