MCPcopy Create free account
hub / github.com/deskflow/deskflow / handleLogLine

Method handleLogLine

src/lib/gui/core/ClientConnection.cpp:17–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace deskflow::gui {
16
17void ClientConnection::handleLogLine(const QString &logLine)
18{
19 if (logLine.contains("disconnected from server")) {
20 m_supressMessage = false;
21 return;
22 }
23
24 if (logLine.contains("connected to server")) {
25 m_supressMessage = true;
26 return;
27 }
28
29 if (logLine.contains("failed to connect to server")) {
30 if (m_supressMessage) {
31 qDebug("message already shown, skipping");
32 return;
33 }
34 // ignore the message if it's about the server refusing by name as
35 // this will trigger the server to show an 'add client' dialog.
36 if (logLine.contains("server refused client with our name")) {
37 qDebug("ignoring client name refused message");
38 return;
39 }
40 showMessage(logLine);
41 }
42}
43
44void ClientConnection::showMessage(const QString &logLine)
45{

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected