mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Fix issue #123
This commit is contained in:
parent
f8e6cb2cad
commit
80ac10bbf1
@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user