Remove unused code
This commit is contained in:
parent
afe6850d88
commit
c6e8145afc
2 changed files with 1 additions and 19 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue