diff --git a/src/blackmisc/sharedstate/dbus/hub.h b/src/blackmisc/sharedstate/dbus/hub.h index 581c85b40..5db4641eb 100644 --- a/src/blackmisc/sharedstate/dbus/hub.h +++ b/src/blackmisc/sharedstate/dbus/hub.h @@ -45,7 +45,7 @@ namespace BlackMisc virtual bool isConnected() const = 0; //! Get a duplex object for the calling process. - virtual std::pair, QFuture> getDuplex(const CIdentifier &) = 0; + virtual std::pair, QFuture> getDuplex(const CIdentifier &) = 0; public slots: //! Create a duplex object for the identified process. @@ -56,7 +56,7 @@ namespace BlackMisc protected: //! Create a duplex object and return status via future. - virtual QFuture openDuplexAsync(const CIdentifier &client) = 0; + virtual QFuture openDuplexAsync(const CIdentifier &client) = 0; //! Constructor. IHub(QObject *parent = nullptr); diff --git a/src/blackmisc/sharedstate/dbus/hubimpl.cpp b/src/blackmisc/sharedstate/dbus/hubimpl.cpp index cce0e7b8d..d3ea65ca4 100644 --- a/src/blackmisc/sharedstate/dbus/hubimpl.cpp +++ b/src/blackmisc/sharedstate/dbus/hubimpl.cpp @@ -15,7 +15,7 @@ namespace BlackMisc::SharedState::DBus if (server) { server->addObject(BLACKMISC_HUB_PATH, this); } } - std::pair, QFuture> CHub::getDuplex(const CIdentifier &identifier) + std::pair, QFuture> CHub::getDuplex(const CIdentifier &identifier) { auto future = openDuplexAsync(identifier); return std::make_pair(m_clients.value(identifier), future); @@ -37,12 +37,12 @@ namespace BlackMisc::SharedState::DBus m_clients.take(client); } - QFuture CHub::openDuplexAsync(const CIdentifier &client) + QFuture CHub::openDuplexAsync(const CIdentifier &client) { openDuplex(client); - CPromise promise; - promise.setResult(); + CPromise promise; + promise.setResult(true); return promise.future(); } diff --git a/src/blackmisc/sharedstate/dbus/hubimpl.h b/src/blackmisc/sharedstate/dbus/hubimpl.h index 85df7a4de..67bfe2040 100644 --- a/src/blackmisc/sharedstate/dbus/hubimpl.h +++ b/src/blackmisc/sharedstate/dbus/hubimpl.h @@ -40,7 +40,7 @@ namespace BlackMisc //! \name Interface implementations //! @{ virtual bool isConnected() const override { return true; } - virtual std::pair, QFuture> getDuplex(const CIdentifier &) override; + virtual std::pair, QFuture> getDuplex(const CIdentifier &) override; //! @} public slots: @@ -57,7 +57,7 @@ namespace BlackMisc protected: //! \name Interface implementations //! @{ - virtual QFuture openDuplexAsync(const CIdentifier &client) override; + virtual QFuture openDuplexAsync(const CIdentifier &client) override; //! @} private: diff --git a/src/blackmisc/sharedstate/dbus/hubproxy.cpp b/src/blackmisc/sharedstate/dbus/hubproxy.cpp index e25062a6a..0e8e0eb60 100644 --- a/src/blackmisc/sharedstate/dbus/hubproxy.cpp +++ b/src/blackmisc/sharedstate/dbus/hubproxy.cpp @@ -22,7 +22,7 @@ namespace BlackMisc::SharedState::DBus return m_interface->isValid(); } - std::pair, QFuture> CHubProxy::getDuplex(const CIdentifier &identifier) + std::pair, QFuture> CHubProxy::getDuplex(const CIdentifier &identifier) { auto duplex = QSharedPointer::create(m_interface->connection(), m_service, this); connect(duplex.get(), &QObject::destroyed, this, [=] { closeDuplex(identifier); }); @@ -39,7 +39,7 @@ namespace BlackMisc::SharedState::DBus m_interface->callDBus(QLatin1String("closeDuplex"), client); } - QFuture CHubProxy::openDuplexAsync(const CIdentifier &client) + QFuture CHubProxy::openDuplexAsync(const CIdentifier &client) { return m_interface->callDBusFuture(QLatin1String("openDuplex"), client); } diff --git a/src/blackmisc/sharedstate/dbus/hubproxy.h b/src/blackmisc/sharedstate/dbus/hubproxy.h index bd5acbd2e..3fbdcac6a 100644 --- a/src/blackmisc/sharedstate/dbus/hubproxy.h +++ b/src/blackmisc/sharedstate/dbus/hubproxy.h @@ -33,7 +33,7 @@ namespace BlackMisc //! \name Interface implementations //! @{ virtual bool isConnected() const override; - virtual std::pair, QFuture> getDuplex(const CIdentifier &) override; + virtual std::pair, QFuture> getDuplex(const CIdentifier &) override; //! @} public slots: @@ -50,7 +50,7 @@ namespace BlackMisc protected: //! \name Interface implementations //! @{ - virtual QFuture openDuplexAsync(const CIdentifier &client) override; + virtual QFuture openDuplexAsync(const CIdentifier &client) override; //! @} private: