Remove unused code

This commit is contained in:
Matti Viljanen 2021-04-26 17:13:49 +03:00
parent afe6850d88
commit c6e8145afc
No known key found for this signature in database
GPG key ID: CF32A1495158F888
2 changed files with 1 additions and 19 deletions

View file

@ -141,23 +141,6 @@ QString Battery::getState() { return state; }
bool Battery::getChargingEnabled() { return chargingEnabled; }
void Battery::setChargingEnabled(const bool isEnabled) {
if(chargingEnabledFile && chargingEnabledFile->open(QIODevice::WriteOnly)) {
if(chargingEnabledFile->write(QString("%1").arg(isEnabled ? enableChargingValue : disableChargingValue).toLatin1())) {
chargingEnabled = isEnabled;
emit chargingEnabledChanged(chargingEnabled);
if(isEnabled) {
logD("Charging resumed");
}
else {
logD("Charging paused");
}
}
chargingEnabledFile->close();
}
}
bool Battery::getChargerConnected() {
return chargerConnected;
}

View file

@ -34,7 +34,7 @@ class Battery : public QObject
Q_PROPERTY(int current READ getCurrent NOTIFY currentChanged)
Q_PROPERTY(bool chargerConnected READ getChargerConnected NOTIFY chargerConnectedChanged)
Q_PROPERTY(QString state READ getState NOTIFY stateChanged)
Q_PROPERTY(bool chargingEnabled READ getChargingEnabled WRITE setChargingEnabled NOTIFY chargingEnabledChanged)
Q_PROPERTY(bool chargingEnabled READ getChargingEnabled NOTIFY chargingEnabledChanged)
public:
Battery(Settings* newSettings, Logger* newLogger, QObject* parent = nullptr);
@ -47,7 +47,6 @@ public:
QString getState();
bool getChargingEnabled();
void setChargingEnabled(const bool isEnabled);
public slots:
void updateData();