title: C++ invokeMethod can't access QML method
body: <p>I have an app written in C++ (logics) and QML (UI).
  In C++ part I have a collection of the QML object (kind of event system)</p>
  
  <p>This is the simplified code of C++ object:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Config : public QObject
  {
  Q_OBJECT
      Q_ENUMS(DataEvent)
  public:
  
      enum DataEvent {
          DataEventUndefined = 0,
          DataEventDateChanged
      };
  
      ~Config();
      Q_INVOKABLE void registerToEvent (DataEvent event, QQuickItem *item)
      {
          p_dataListeners.insert(event,item);
      }
  
  private:
      QMap&lt;DataEvent,QQuickItem *&gt; p_dataListeners;
  }
  </code></pre>
  
  <p>in QML object I call C++ function and it work like a charm. This is part of QML code:</p>
  
  <pre class="lang-js prettyprint-override"><code>Item {
      id: myQMLObject
      function init() {
          Config.registerToEvent(Config.DataEventDateChanged,myQMLObject);
      }
      function receiveEvent(eventType) {
      ...
      }
  }
  </code></pre>
  
  <p>OK, now I want to call the QML function of one of saved QML objects:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    event = Config::DataEventDateChanged;
      QMapIterator&lt;DataEvent,QQuickItem *&gt; i(p_dataListeners);
      while (i.hasNext()) {
          i.next();
          if(event == i.key()) {
              QQuickItem *item = i.value();
              QMetaObject::invokeMethod(item, "receiveEvent",
                                        QGenericReturnArgument(),
                                        Q_ARG(Config::DataEvent, event));
          }
      }
  </code></pre>
  
  <p>But i get this error: <code>QMetaObject::invokeMethod: No such method MyQMLObject_QMLTYPE_44::receiveEvent(Config::DataEvent)</code></p>
  
  <p>What I do wrong?</p>