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;
|
||||
}
|
||||
|
||||
if(!chargingEnabledFile && !QHostInfo::localHostName().contains("SailfishEmul")) {
|
||||
if(!chargingEnabledFile && !QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||
logE("Charger control file not found!");
|
||||
logE("Please contact the developer with your device model!");
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
#include <QHostInfo>
|
||||
#include <QSysInfo>
|
||||
#include "settings.h"
|
||||
#include "process.h"
|
||||
#include "logger.h"
|
||||
|
|
|
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
|||
bool verbose = false;
|
||||
bool debug = false;
|
||||
|
||||
if(QHostInfo::localHostName().contains("SailfishEmul")) {
|
||||
if(QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||
verbose = true;
|
||||
debug = true;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ LEGACY_BUILD = 0
|
|||
|
||||
TARGET = harbour-batterybuddy-daemon
|
||||
|
||||
CONFIG += sailfishapp console
|
||||
CONFIG += console
|
||||
|
||||
contains(LEGACY_BUILD, 0) { QT = core dbus }
|
||||
contains(LEGACY_BUILD, 1) { QT = core dbus multimedia }
|
||||
|
@ -22,7 +22,7 @@ DEFINES += LEGACY_BUILD=$${LEGACY_BUILD}
|
|||
# See main() and logger.h for details.
|
||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
|
||||
LIBS += -lkeepalive
|
||||
LIBS += -lkeepalive -lnemonotifications-qt5
|
||||
|
||||
HEADERS += \
|
||||
src/battery.h \
|
||||
|
|
|
@ -102,7 +102,7 @@ Battery::Battery(Logger* newLogger, bool loglevelSet, QCoreApplication *app, QOb
|
|||
chargingEnabledFile = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
else if(!QHostInfo::localHostName().contains("SailfishEmul")) {
|
||||
else if(!QSysInfo::machineHostName().contains("SailfishEmul")) {
|
||||
logE("Charger control file not found!");
|
||||
logE("Please contact the developer with your device model!");
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ void Battery::shutdown() {
|
|||
logD("Health notification stopped");
|
||||
}
|
||||
// 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 "
|
||||
"may not charge until reboot! If that doesn't help, "
|
||||
"uninstall Battery Buddy and reboot your device.");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
#include <QHostInfo>
|
||||
#include <QSysInfo>
|
||||
#include <QLocale>
|
||||
#include <QCoreApplication>
|
||||
#include <keepalive/backgroundactivity.h>
|
||||
|
|
Loading…
Reference in a new issue