|
|
@ -25,40 +25,40 @@ namespace qt |
|
|
|
void Worker::startDaemon() |
|
|
|
void Worker::startDaemon() |
|
|
|
{ |
|
|
|
{ |
|
|
|
qDebug("Performing daemon start..."); |
|
|
|
qDebug("Performing daemon start..."); |
|
|
|
//try{
|
|
|
|
try{ |
|
|
|
m_Daemon.start(); |
|
|
|
m_Daemon.start(); |
|
|
|
qDebug("Daemon started."); |
|
|
|
qDebug("Daemon started."); |
|
|
|
emit resultReady(false, ""); |
|
|
|
emit resultReady(false, ""); |
|
|
|
/*}catch(std::exception ex){
|
|
|
|
}catch(std::exception& ex){ |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
}catch(...){ |
|
|
|
}catch(...){ |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
void Worker::restartDaemon() |
|
|
|
void Worker::restartDaemon() |
|
|
|
{ |
|
|
|
{ |
|
|
|
qDebug("Performing daemon restart..."); |
|
|
|
qDebug("Performing daemon restart..."); |
|
|
|
//try{
|
|
|
|
try{ |
|
|
|
m_Daemon.restart(); |
|
|
|
m_Daemon.restart(); |
|
|
|
qDebug("Daemon restarted."); |
|
|
|
qDebug("Daemon restarted."); |
|
|
|
emit resultReady(false, ""); |
|
|
|
emit resultReady(false, ""); |
|
|
|
/*}catch(std::exception ex){
|
|
|
|
}catch(std::exception& ex){ |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
}catch(...){ |
|
|
|
}catch(...){ |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
void Worker::stopDaemon() { |
|
|
|
void Worker::stopDaemon() { |
|
|
|
qDebug("Performing daemon stop..."); |
|
|
|
qDebug("Performing daemon stop..."); |
|
|
|
//try{
|
|
|
|
try{ |
|
|
|
m_Daemon.stop(); |
|
|
|
m_Daemon.stop(); |
|
|
|
qDebug("Daemon stopped."); |
|
|
|
qDebug("Daemon stopped."); |
|
|
|
emit resultReady(false, ""); |
|
|
|
emit resultReady(false, ""); |
|
|
|
/*}catch(std::exception ex){
|
|
|
|
}catch(std::exception& ex){ |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
emit resultReady(true, ex.what()); |
|
|
|
}catch(...){ |
|
|
|
}catch(...){ |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
emit resultReady(true, QObject::tr("Error: unknown exception")); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Controller::Controller(DaemonQTImpl& daemon): |
|
|
|
Controller::Controller(DaemonQTImpl& daemon): |
|
|
|