diff --git a/src/battery.cpp b/src/battery.cpp index 452cc55..faf5ce1 100644 --- a/src/battery.cpp +++ b/src/battery.cpp @@ -37,7 +37,11 @@ Battery::Battery(Settings* newSettings, QObject* parent) : QObject(parent) // ENABLE/DISABLE CHARGING if(QHostInfo::localHostName().contains("SailfishEmul")) { qInfo() << "Sailfish SDK detected"; - qInfo() << "Charger control feature disabled"; + qInfo() << "Using dummy control file"; + filename = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+"/charging_enabled_dummy"; + chargingEnabledFile = new QFile(filename, this); + enableChargingValue = 1; + disableChargingValue = 0; } else { // e.g. for Sony Xperia XA2 diff --git a/src/battery.h b/src/battery.h index eff8d37..7373b8d 100644 --- a/src/battery.h +++ b/src/battery.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "settings.h"