MCPcopy Create free account
hub / github.com/IJHack/QtPass / receiveMessage

Method receiveMessage

src/singleapplication.cpp:46–58  ·  view source on GitHub ↗

* @brief SingleApplication::receiveMessage we have received (a command line) * message. */

Source from the content-addressed store, hash-verified

44 * message.
45 */
46void SingleApplication::receiveMessage() {
47 QLocalSocket *localSocket = localServer->nextPendingConnection();
48 if (!localSocket->waitForReadyRead(timeout)) {
49#ifdef QT_DEBUG
50 dbg() << localSocket->errorString().toLatin1();
51#endif
52 return;
53 }
54 QByteArray byteArray = localSocket->readAll();
55 QString message = QString::fromUtf8(byteArray.constData());
56 emit messageAvailable(message);
57 localSocket->disconnectFromServer();
58}
59
60// public functions.
61/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected