Make service binary leaner
This commit is contained in:
parent
e1250980f9
commit
a417c6f5f6
6 changed files with 8 additions and 8 deletions
|
@ -76,7 +76,7 @@ Battery::Battery(Settings* newSettings, Logger* newLogger, QObject* parent) : QO
|
||||||
disableChargingValue = 1;
|
disableChargingValue = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!chargingEnabledFile && !QHostInfo::localHostName().contains("SailfishEmul")) {
|
if(!chargingEnabledFile && !QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||||
logE("Charger control file not found!");
|
logE("Charger control file not found!");
|
||||||
logE("Please contact the developer with your device model!");
|
logE("Please contact the developer with your device model!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QHostInfo>
|
#include <QSysInfo>
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
|
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
bool debug = false;
|
bool debug = false;
|
||||||
|
|
||||||
if(QHostInfo::localHostName().contains("SailfishEmul")) {
|
if(QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||||
verbose = true;
|
verbose = true;
|
||||||
debug = true;
|
debug = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ LEGACY_BUILD = 0
|
||||||
|
|
||||||
TARGET = harbour-batterybuddy-daemon
|
TARGET = harbour-batterybuddy-daemon
|
||||||
|
|
||||||
CONFIG += sailfishapp console
|
CONFIG += console
|
||||||
|
|
||||||
contains(LEGACY_BUILD, 0) { QT = core dbus }
|
contains(LEGACY_BUILD, 0) { QT = core dbus }
|
||||||
contains(LEGACY_BUILD, 1) { QT = core dbus multimedia }
|
contains(LEGACY_BUILD, 1) { QT = core dbus multimedia }
|
||||||
|
@ -22,7 +22,7 @@ DEFINES += LEGACY_BUILD=$${LEGACY_BUILD}
|
||||||
# See main() and logger.h for details.
|
# See main() and logger.h for details.
|
||||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
LIBS += -lkeepalive
|
LIBS += -lkeepalive -lnemonotifications-qt5
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/battery.h \
|
src/battery.h \
|
||||||
|
|
|
@ -102,7 +102,7 @@ Battery::Battery(Logger* newLogger, bool loglevelSet, QCoreApplication *app, QOb
|
||||||
chargingEnabledFile = Q_NULLPTR;
|
chargingEnabledFile = Q_NULLPTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!QHostInfo::localHostName().contains("SailfishEmul")) {
|
else if(!QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||||
logE("Charger control file not found!");
|
logE("Charger control file not found!");
|
||||||
logE("Please contact the developer with your device model!");
|
logE("Please contact the developer with your device model!");
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,7 @@ void Battery::shutdown() {
|
||||||
logD("Health notification stopped");
|
logD("Health notification stopped");
|
||||||
}
|
}
|
||||||
// ENABLE/DISABLE CHARGING
|
// ENABLE/DISABLE CHARGING
|
||||||
if(!setChargingEnabled(true) && !QHostInfo::localHostName().contains("SailfishEmul")) {
|
if(!setChargingEnabled(true) && !QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||||
logE("ERROR! Could not restore charger status! Your device "
|
logE("ERROR! Could not restore charger status! Your device "
|
||||||
"may not charge until reboot! If that doesn't help, "
|
"may not charge until reboot! If that doesn't help, "
|
||||||
"uninstall Battery Buddy and reboot your device.");
|
"uninstall Battery Buddy and reboot your device.");
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QHostInfo>
|
#include <QSysInfo>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <keepalive/backgroundactivity.h>
|
#include <keepalive/backgroundactivity.h>
|
||||||
|
|
Loading…
Reference in a new issue