MCPcopy Create free account
hub / github.com/codestation/qcma / receiveMessage

Method receiveMessage

gui/singleapplication.cpp:36–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void SingleApplication::receiveMessage()
37{
38 QLocalSocket *socket = server->nextPendingConnection();
39
40 if(!socket->waitForReadyRead(timeout)) {
41 qDebug() << socket->errorString();
42 return;
43 }
44
45 QByteArray byteArray = socket->readAll();
46 QString message = QString::fromUtf8(byteArray.constData());
47 emit messageAvailable(message);
48 socket->disconnectFromServer();
49}
50
51bool SingleApplication::sendMessage(const QString &message)
52{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected