title: QDBusAbstractAdaptor object does not export implemented dbus interface
body: <p>I'm trying to implement a pairing agent for BlueZ v5.5 with Qt and its DBus functionality.</p>
  
  <p>I have an adaptor class that is generated by the qdbusxml2cpp tool that I called PairingAgentAdaptor and a class with the implemented methods (PairingAgent) that I give as parameter on instantiation of the adaptor class.</p>
  
  <p>I can register the object as a new agent and the BlueZ daemon says that my agent is registered. If I try to pair my phone with the computer, the BlueZ daemon says: "No such interface 'org.bluez.Agent1' at object path '/pairing/agent'."</p>
  
  <p>I have no idea what I'm doing wrong. Could you please give me some hints?</p>
  
  <p>Kind regards
  Michael</p>
  
  <hr>
  
  <p><em>Code:</em></p>
  
  <p>main.cpp</p>
  
  <pre><code>// built using Qt 4.8.2
  
  #include &lt;QCoreApplication&gt;
  #include &lt;bluedevil/bluedevil.h&gt; // schaal's port to BlueZ 5
  
  #define AGENT_PATH "/pairing/agent"
  
  [...]
  
  int main(int argc, char *argv[]) {
      QCoreApplication app(argc, argv);
  
      PairingAgent pairingAgent;
      PairingAgentAdaptor pairingAgentAdaptor(&amp;pairingAgent);
  
      bool registerSuccess = QDBusConnection::systemBus().registerObject(QString(AGENT_PATH), &amp;pairingAgentAdaptor);
  
      if (registerSuccess) {
          cout &lt;&lt; "Registered as " &lt;&lt; AGENT_PATH &lt;&lt; endl;
      } else {
          QDBusConnection::systemBus().unregisterObject(QString(AGENT_PATH), QDBusConnection::UnregisterTree);
  
          registerSuccess = QDBusConnection::systemBus().registerObject(QString(AGENT_PATH), &amp;pairingAgentAdaptor);
  
          if (registerSuccess) {
              cout &lt;&lt; "Registered as " &lt;&lt; AGENT_PATH &lt;&lt; " (round 2)" &lt;&lt; endl;
          } else {
              cerr &lt;&lt; "Registering of " &lt;&lt; AGENT_PATH &lt;&lt; " failed." &lt;&lt; endl;
              exit(1);
          }
      }
  
      Manager* const manager = Manager::self();
      manager-&gt;registerAgent(QString(AGENT_PATH), Manager::DisplayOnly);
  
      return app.exec();
  }
  </code></pre>
  
  <p>pairingagentadaptor.h</p>
  
  <pre><code>[...]
  
  /*
   * Adaptor class for interface org.bluez.Agent1
   */
  class PairingAgentAdaptor: public QDBusAbstractAdaptor {
      Q_OBJECT
      Q_CLASSINFO("D-Bus Interface", "org.bluez.Agent1")
      Q_CLASSINFO("D-Bus Introspection", ""
  "  &lt;interface name=\"org.bluez.Agent1\"&gt;\n"
  "    &lt;method name=\"Release\"/&gt;\n"
  "    &lt;method name=\"RequestPinCode\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"out\" type=\"s\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"DisplayPinCode\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"in\" type=\"s\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"RequestPasskey\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"out\" type=\"u\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"DisplayPasskey\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"in\" type=\"u\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"RequestConfirmation\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"in\" type=\"u\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"RequestAuthorization\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"in\" type=\"u\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"AuthorizeService\"&gt;\n"
  "      &lt;arg direction=\"in\" type=\"o\"/&gt;\n"
  "      &lt;arg direction=\"in\" type=\"s\"/&gt;\n"
  "    &lt;/method&gt;\n"
  "    &lt;method name=\"Cancel\"/&gt;\n"
  "  &lt;/interface&gt;\n"
          "")
  public:
      PairingAgentAdaptor(QObject *parent);
      virtual ~PairingAgentAdaptor();
  
  public: // PROPERTIES
  public Q_SLOTS: // METHODS
      void AuthorizeService(const QDBusObjectPath &amp;in0, const QString &amp;in1);
      void Cancel();
      void DisplayPasskey(const QDBusObjectPath &amp;in0, uint in1);
      void DisplayPinCode(const QDBusObjectPath &amp;in0, const QString &amp;in1);
      void Release();
      void RequestAuthorization(const QDBusObjectPath &amp;in0, uint in1);
      void RequestConfirmation(const QDBusObjectPath &amp;in0, uint in1);
      uint RequestPasskey(const QDBusObjectPath &amp;in0);
      QString RequestPinCode(const QDBusObjectPath &amp;in0);
  Q_SIGNALS: // SIGNALS
  };
  </code></pre>