all: fix gcc warnings and lints

This commit is contained in:
outfoxxed 2025-10-04 13:22:17 -07:00
parent 9bb2c043ae
commit c5c438f1cd
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
11 changed files with 42 additions and 16 deletions

View file

@ -73,7 +73,7 @@ UPowerDevice::UPowerDevice(QObject* parent): QObject(parent) {
return this->bType == UPowerDeviceType::Battery && this->bPowerSupply;
});
this->bHealthSupported.setBinding([this]() { return this->bHealthPercentage != 0; });
this->bHealthSupported.setBinding([this]() { return this->bHealthPercentage.value() != 0; });
}
void UPowerDevice::init(const QString& path) {

View file

@ -164,6 +164,7 @@ QString DBusDataTransform<PowerProfile::Enum>::toWire(Data data) {
case PowerProfile::PowerSaver: return QStringLiteral("power-saver");
case PowerProfile::Balanced: return QStringLiteral("balanced");
case PowerProfile::Performance: return QStringLiteral("performance");
default: qFatal() << "Attempted to convert invalid power profile" << data << "to wire format.";
}
}