Merge PR #516: Nuki: Fix bad if clause guards

This commit is contained in:
Jenkins nymea 2021-12-15 11:53:23 +01:00
commit 95c8b104dd
4 changed files with 16 additions and 17 deletions

View File

@ -139,7 +139,7 @@ struct ContentItemObject {
QString source; //Attribute. The type or name of the service playing. To determine if the product is in standby mode, check if source == STANDBY. QString source; //Attribute. The type or name of the service playing. To determine if the product is in standby mode, check if source == STANDBY.
QString location; //Attribute. READ-ONLY. This attribute is used by Bose to point to the content the user is accessing. You can save it to access content later, but do not attempt to generate your own locations. QString location; //Attribute. READ-ONLY. This attribute is used by Bose to point to the content the user is accessing. You can save it to access content later, but do not attempt to generate your own locations.
QString sourceAccount; //Attribute. The user-account associated with this source. QString sourceAccount; //Attribute. The user-account associated with this source.
bool isPresetable; //Attribute. TRUE if the source can be set as one of the six (6) SoundTouch presets. bool isPresetable = false; //Attribute. TRUE if the source can be set as one of the six (6) SoundTouch presets.
QString itemName; //Element. The album, station, playlist, song, phone, etc. name depending on the source. QString itemName; //Element. The album, station, playlist, song, phone, etc. name depending on the source.
QString containerArt; //URL QString containerArt; //URL
}; };

View File

@ -180,10 +180,10 @@ void BluetoothManager::processInterfaceList(const QDBusObjectPath &objectPath, c
if (properties.contains("Service")) { if (properties.contains("Service")) {
QDBusObjectPath serviceObjectPath = qvariant_cast<QDBusObjectPath>(properties.value("Service")); QDBusObjectPath serviceObjectPath = qvariant_cast<QDBusObjectPath>(properties.value("Service"));
BluetoothGattService *service = findService(serviceObjectPath); BluetoothGattService *service = findService(serviceObjectPath);
if (service) if (service) {
qCDebug(dcBluez()) << "Add characteristic" << serviceObjectPath.path() << properties << service; qCDebug(dcBluez()) << "Add characteristic" << serviceObjectPath.path() << properties << service;
service->addCharacteristicInternally(objectPath, properties); service->addCharacteristicInternally(objectPath, properties);
}
} }
} }
} }
@ -196,10 +196,10 @@ void BluetoothManager::processInterfaceList(const QDBusObjectPath &objectPath, c
if (properties.contains("Characteristic")) { if (properties.contains("Characteristic")) {
QDBusObjectPath characterisitcObjectPath = qvariant_cast<QDBusObjectPath>(properties.value("Characteristic")); QDBusObjectPath characterisitcObjectPath = qvariant_cast<QDBusObjectPath>(properties.value("Characteristic"));
BluetoothGattCharacteristic *characteristic = findCharacteristic(characterisitcObjectPath); BluetoothGattCharacteristic *characteristic = findCharacteristic(characterisitcObjectPath);
if (characteristic) if (characteristic) {
qCDebug(dcBluez()) << "Add descriptor" << characterisitcObjectPath.path() << properties << characteristic; qCDebug(dcBluez()) << "Add descriptor" << characterisitcObjectPath.path() << properties << characteristic;
characteristic->addDescriptorInternally(objectPath, properties); characteristic->addDescriptorInternally(objectPath, properties);
}
} }
} }
} }

View File

@ -151,7 +151,6 @@ void IntegrationPluginSonos::confirmPairing(ThingPairingInfo *info, const QStrin
if (!sonos) { if (!sonos) {
qWarning(dcSonos()) << "No sonos connection found for thing:" << info->thingName(); qWarning(dcSonos()) << "No sonos connection found for thing:" << info->thingName();
m_setupSonosConnections.remove(info->thingId()); m_setupSonosConnections.remove(info->thingId());
sonos->deleteLater();
info->finish(Thing::ThingErrorHardwareFailure); info->finish(Thing::ThingErrorHardwareFailure);
return; return;
} }

View File

@ -67,20 +67,20 @@ public:
}; };
struct ZoneState { struct ZoneState {
bool connected; bool connected = false;
bool power; bool power = false;
QString tadoMode; QString tadoMode;
QString settingType; QString settingType;
double settingTemperature; double settingTemperature = false;
bool settingPower; bool settingPower = false;
double temperature; double temperature = false;
double humidity; double humidity = false;
bool windowOpen; bool windowOpen = false;
double heatingPowerPercentage; double heatingPowerPercentage = false;
QString heatingPowerType; QString heatingPowerType;
bool overlayIsSet; bool overlayIsSet = false;
bool overlaySettingPower; bool overlaySettingPower = false;
double overlaySettingTemperature; double overlaySettingTemperature = false;
QString overlayType; QString overlayType;
}; };