1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
This commit is contained in:
Elias Steurer 2021-01-26 15:21:33 +01:00
parent f8e6cb2cad
commit 80ac10bbf1
2 changed files with 8 additions and 3 deletions

View File

@ -402,6 +402,7 @@ void ScreenPlayManager::newConnection()
return;
}
}
qWarning() << "No matching connection found!";
});
m_clients.append(connection);
}
@ -452,11 +453,13 @@ bool ScreenPlayManager::closeConntectionByType(const QStringList& types)
for (auto& client : m_clients) {
if (types.contains(client->type(), Qt::CaseInsensitive)) {
client->close();
return m_clients.removeOne(client);
if (!m_clients.removeOne(client)) {
return false;
}
}
}
return false;
return true;
}
/*!

View File

@ -60,6 +60,8 @@ void ScreenPlay::SDKConnection::readyRead()
qCritical() << "Wallpaper type not found. Expected: " << GlobalVariables::getAvailableTypes() << " got: " << msg;
}
qInfo() << "New connection" << m_appID << msg;
emit appConnected(this);
} else if (msg.startsWith("command=")) {
@ -99,7 +101,7 @@ void ScreenPlay::SDKConnection::sendMessage(const QByteArray& message)
void ScreenPlay::SDKConnection::close()
{
qInfo() << "Close " << m_type;
qInfo() << "Close " << m_type << m_appID;
QJsonObject obj;
obj.insert("command", QJsonValue("quit"));