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

@ -100,7 +100,7 @@ MprisPlayer::MprisPlayer(const QString& address, QObject* parent): QObject(paren
} else return static_cast<qlonglong>(-1);
});
this->bLengthSupported.setBinding([this]() { return this->bInternalLength != -1; });
this->bLengthSupported.setBinding([this]() { return this->bInternalLength.value() != -1; });
this->bIsPlaying.setBinding([this]() {
return this->bPlaybackState == MprisPlaybackState::Playing;

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.";
}
}