diff --git a/ScreenPlay/src/screenplaymanager.cpp b/ScreenPlay/src/screenplaymanager.cpp index 6c81e80c..b3ac6f6e 100644 --- a/ScreenPlay/src/screenplaymanager.cpp +++ b/ScreenPlay/src/screenplaymanager.cpp @@ -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; } /*! diff --git a/ScreenPlay/src/sdkconnection.cpp b/ScreenPlay/src/sdkconnection.cpp index 9b6361bd..bf171d15 100644 --- a/ScreenPlay/src/sdkconnection.cpp +++ b/ScreenPlay/src/sdkconnection.cpp @@ -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"));