}
bool demonio_start() {
qDebug() << "LatitudeQML::demonio_start";
- if (demonioOpt.exists()) {
- qDebug() << "LatitudeQML:: demonio opt";
- cli.startDetached(demonioOpt.fileName());
- return true;
- }
- if (demonioSdk.exists()) {
- qDebug() << "LatitudeQML:: demonio sdk";
- cli.startDetached(demonioSdk.fileName());
+ if (demonio.exists()) {
+ cli.startDetached(demonio.fileName());
return true;
}
qDebug() << "LatitudeQML:: demonio none";
}
bool demonio_stop() {
qDebug() << "LatitudeQML::demonio_stop";
- if (demonioOpt.exists() || demonioSdk.exists() ) {
+ if (demonio.exists()) {
qDebug() << "LatitudeQML:: demonio kill" << system("killall LatitudeUpdaterDaemon 2> /dev/null");
return true;
}
private:
GoogleLatitude latitude;
GpsControl gps;
- QFile demonioOpt;
- QFile demonioSdk;
+ QFile demonio;
QProcess cli;
};