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

Method readyRead

core/probesettings.cpp:109–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void ProbeSettingsReceiver::readyRead()
110{
111 while (Message::canReadMessage(m_socket)) {
112 auto msg = Message::readMessage(m_socket);
113 switch (msg.type()) {
114 case Protocol::ServerVersion: {
115 qint32 version;
116 msg >> version;
117 if (version != Protocol::version()) {
118 qWarning()
119 << "Unable to receive probe settings, mismatching protocol versions (expected:"
120 << Protocol::version() << "got:" << version << ")";
121 qWarning() << "Continuing anyway, but this is likely going to fail.";
122 settingsReceivedFallback();
123 return;
124 }
125 break;
126 }
127 case Protocol::ProbeSettings: {
128 msg >> s_probeSettings()->settings;
129 // qDebug() << Q_FUNC_INFO << s_probeSettings()->settings;
130 const QString probePath = ProbeSettings::value(QStringLiteral("ProbePath")).toString();
131 setRootPathFromProbePath(probePath);
132
133 m_waitCondition.wakeAll();
134 return;
135 }
136 default:
137 continue;
138 }
139 }
140}
141
142static void waitForBytesWritten(QLocalSocket &socket)
143{

Callers

nothing calls this directly

Calls 2

versionFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected