mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
Add missing postToObjcted in RsGxsUpdateBroadcast
Deprecate RsGxsUpdateBroadcast each service should handle its own event
This commit is contained in:
parent
4c0baa1ec3
commit
dc9ba74bdd
@ -22,6 +22,7 @@
|
||||
|
||||
#include "RsGxsUpdateBroadcast.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
#include <retroshare/rsgxsifacehelper.h>
|
||||
|
||||
@ -37,11 +38,14 @@ static QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*> updateBroadcastMap;
|
||||
RsGxsUpdateBroadcast::RsGxsUpdateBroadcast(RsGxsIfaceHelper *ifaceImpl) :
|
||||
QObject(nullptr), mIfaceImpl(ifaceImpl), mEventHandlerId(0)
|
||||
{
|
||||
/* No need of postToObject here as onChangesReceived just emit signals
|
||||
* internally */
|
||||
rsEvents->registerEventsHandler(
|
||||
[this](std::shared_ptr<const RsEvent> event)
|
||||
{ onChangesReceived(*dynamic_cast<const RsGxsChanges*>(event.get())); },
|
||||
{
|
||||
RsQThreadUtils::postToObject(
|
||||
[=]()
|
||||
{ onChangesReceived(*dynamic_cast<const RsGxsChanges*>(event.get())); },
|
||||
this );
|
||||
},
|
||||
mEventHandlerId, RsEventType::GXS_CHANGES );
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ struct RsGxsChanges;
|
||||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
class RsGxsUpdateBroadcast : public QObject
|
||||
class RS_DEPRECATED RsGxsUpdateBroadcast : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user