1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 18:52:30 +01:00

Fix settings wallpaper value

This commit is contained in:
Elias Steurer 2021-02-19 17:30:06 +01:00
parent 322f0d7908
commit 2b39a8e35b
2 changed files with 6 additions and 8 deletions

View File

@ -348,17 +348,15 @@ void ScreenPlayManager::requestProjectSettingsAtMonitorIndex(const int index)
/*!
\brief Set a wallpaper \a value at a given \a index and \a key.
*/
void ScreenPlayManager::setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value)
bool ScreenPlayManager::setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value)
{
if (auto appID = m_monitorListModel->getAppIDByMonitorIndex(index)) {
if (key == "volume" || key == "currentTime" || key == "playbackRate") {
setWallpaperValue(*appID, key, value);
}
setWallpaperValue(*appID, key, value);
} else {
qWarning() << "Could net get appID from m_monitorListModel!";
return true;
}
qWarning() << "Could net get appID from m_monitorListModel!";
return false;
}
/*!

View File

@ -129,7 +129,7 @@ public slots:
bool removeApp(const QString& appID);
void requestProjectSettingsAtMonitorIndex(const int index);
void setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value);
bool setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value);
void setAllWallpaperValue(const QString& key, const QString& value);
ScreenPlayWallpaper* getWallpaperByAppID(const QString& appID) const;