1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Check if we have a connection before setting anything

This commit is contained in:
Elias Steurer 2021-11-13 14:13:13 +01:00
parent 3550391eca
commit e87c6a4d54

View File

@ -174,6 +174,11 @@ void ScreenPlayWallpaper::processError(QProcess::ProcessError error)
*/ */
bool ScreenPlayWallpaper::setWallpaperValue(const QString& key, const QString& value, const bool save) bool ScreenPlayWallpaper::setWallpaperValue(const QString& key, const QString& value, const bool save)
{ {
if (!m_connection) {
qWarning() << "Cannot set value for unconnected wallpaper!";
return false;
}
QJsonObject obj; QJsonObject obj;
obj.insert(key, value); obj.insert(key, value);