MCPcopy Create free account
hub / github.com/KDAB/GammaRay / SelectionModelServer

Method SelectionModelServer

core/remote/selectionmodelserver.cpp:21–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace GammaRay;
20
21SelectionModelServer::SelectionModelServer(const QString &objectName, QAbstractItemModel *model,
22 QObject *parent)
23 : NetworkSelectionModel(objectName, model, parent)
24 , m_timer(new QTimer(this))
25 , m_monitored(false)
26{
27 // We do use a timer to group requests to avoid network overhead
28 m_timer->setSingleShot(true);
29 m_timer->setInterval(125);
30 connect(m_timer, &QTimer::timeout, this, &SelectionModelServer::timeout);
31
32 m_myAddress = Server::instance()->registerObject(objectName, this, Server::ExportNothing);
33 Server::instance()->registerMessageHandler(m_myAddress, this, "newMessage");
34 Server::instance()->registerMonitorNotifier(m_myAddress, this, "modelMonitored");
35 connect(Endpoint::instance(), &Endpoint::disconnected, this, [this] { modelMonitored(); });
36}
37
38SelectionModelServer::~SelectionModelServer() = default;
39

Callers

nothing calls this directly

Calls 3

registerObjectMethod · 0.45

Tested by

no test coverage detected