| 49 | } |
| 50 | |
| 51 | bool SingleCoreApplication::sendMessage(const QString &message) |
| 52 | { |
| 53 | QLocalSocket socket; |
| 54 | socket.connectToServer(SHARED_KEY, QIODevice::WriteOnly); |
| 55 | |
| 56 | if(!socket.waitForConnected(timeout)) { |
| 57 | return false; |
| 58 | } |
| 59 | |
| 60 | socket.write(message.toUtf8()); |
| 61 | |
| 62 | if(!socket.waitForBytesWritten(timeout)) { |
| 63 | qDebug() << socket.errorString(); |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | socket.disconnectFromServer(); |
| 68 | return true; |
| 69 | } |
nothing calls this directly
no outgoing calls
no test coverage detected