Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21207

qt plugin template does not compile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 4.9.0-beta1
    • Qt Creator 4.7.1
    • None
    • Qt Creator 4.7.1 - Qt 5.11.2 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit
      kit: Desktop_Qt_5_10_1_GCC_64bit-Debug
      OS: Linux version 4.18.4-arch1-1-ARCH
    • Linux/Wayland
    • 075e1da67e0ce5c276612e9eeb4ab6ffb83118e1 (qt-creator/qt-creator/master)

       

      steps to reproduce:

      • start up qt creator
      • create new library -> c++ library
      • choose type "qt plugin"
      • allow template to make a class derived from QGenericPlugin
      • press build

      Error:

      /home/usr/Desktop_Qt_5_10_1_GCC_64bit-Debug/moc_genericplugin.cpp:164: error: invalid new-expression of abstract class type ‘GenericPlugin’
      QT_MOC_EXPORT_PLUGIN(GenericPlugin, GenericPlugin)
      ^~~~~~~~~~~~~

      (Where in this case GenericPlugin is the name it auto created the class of)

      attempting to alter the class by following examples in http://doc.qt.io/qt-5/plugins-howto.html to the letter results in

      /home/usr/Desktop_Qt_5_10_1_GCC_64bit-Debug/moc_qplugin.cpp:93: error: ‘QT_PLUGIN_METADATA_SECTION’ does not name a type; did you mean ‘Q_PLUGIN_METADATA’?
      QT_PLUGIN_METADATA_SECTION const uint qt_section_alignment_dummy = 42;
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
      Q_PLUGIN_METADATA

       

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

            kandeler Christian Kandeler
            dice14u David Wasser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes