mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Change appConnected to bool return
even though it is not used it still makes more sense that this function can fail to return a bool
This commit is contained in:
parent
5019070aee
commit
5edba6f1c8
@ -221,21 +221,25 @@ void ScreenPlayManager::createWidget(
|
||||
\brief Iterates all Wallpaper and Widgets for the matching appID. Returns true if a matching appID
|
||||
was successful set.
|
||||
*/
|
||||
void ScreenPlayManager::appConnected(const std::shared_ptr<SDKConnection>& connection)
|
||||
bool ScreenPlayManager::appConnected(const std::shared_ptr<SDKConnection>& connection)
|
||||
{
|
||||
for (const auto& item : qAsConst(m_screenPlayWidgets)) {
|
||||
if (item->appID() == connection->appID()) {
|
||||
item->setSDKConnection(connection);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& item : qAsConst(m_screenPlayWallpapers)) {
|
||||
if (item->appID() == connection->appID()) {
|
||||
item->setSDKConnection(connection);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
qWarning() << "No matching appID for id" << connection->appID() << " was found!";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -190,7 +190,7 @@ public slots:
|
||||
|
||||
private:
|
||||
void loadProfiles();
|
||||
void appConnected(const std::shared_ptr<SDKConnection>& connection);
|
||||
bool appConnected(const std::shared_ptr<SDKConnection>& connection);
|
||||
bool checkIsAnotherScreenPlayInstanceRunning();
|
||||
[[nodiscard]] bool removeWallpaperByAppID(const QString& appID);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user