From e8789c3c58d676bdac93c1688f0c3c90da3249ba Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 3 Dec 2021 01:01:08 +0100 Subject: [PATCH] Fix some maybe-uninitialized build errors --- bose/soundtouchtypes.h | 2 +- sonos/integrationpluginsonos.cpp | 1 - tado/tado.h | 22 +++++++++++----------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/bose/soundtouchtypes.h b/bose/soundtouchtypes.h index 25207e27..22f6645b 100644 --- a/bose/soundtouchtypes.h +++ b/bose/soundtouchtypes.h @@ -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 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. - 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 containerArt; //URL }; diff --git a/sonos/integrationpluginsonos.cpp b/sonos/integrationpluginsonos.cpp index af6a6032..99f3e7e9 100644 --- a/sonos/integrationpluginsonos.cpp +++ b/sonos/integrationpluginsonos.cpp @@ -151,7 +151,6 @@ void IntegrationPluginSonos::confirmPairing(ThingPairingInfo *info, const QStrin if (!sonos) { qWarning(dcSonos()) << "No sonos connection found for thing:" << info->thingName(); m_setupSonosConnections.remove(info->thingId()); - sonos->deleteLater(); info->finish(Thing::ThingErrorHardwareFailure); return; } diff --git a/tado/tado.h b/tado/tado.h index f857ccaa..8c9f9e02 100644 --- a/tado/tado.h +++ b/tado/tado.h @@ -67,20 +67,20 @@ public: }; struct ZoneState { - bool connected; - bool power; + bool connected = false; + bool power = false; QString tadoMode; QString settingType; - double settingTemperature; - bool settingPower; - double temperature; - double humidity; - bool windowOpen; - double heatingPowerPercentage; + double settingTemperature = false; + bool settingPower = false; + double temperature = false; + double humidity = false; + bool windowOpen = false; + double heatingPowerPercentage = false; QString heatingPowerType; - bool overlayIsSet; - bool overlaySettingPower; - double overlaySettingTemperature; + bool overlayIsSet = false; + bool overlaySettingPower = false; + double overlaySettingTemperature = false; QString overlayType; };