mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add a new signal to the Dispatcher process: ProcessOutput(QString log)
This commit is contained in:
@@ -14,6 +14,7 @@ DProcess::DProcess(QObject *parent) : QProcess(parent){
|
||||
//Setup the process
|
||||
this->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
||||
this->setProcessChannelMode(QProcess::MergedChannels);
|
||||
connect(this, SIGNAL(readyRead()), this, SLOT(updateLog()) );
|
||||
}
|
||||
|
||||
DProcess::~DProcess(){
|
||||
@@ -87,6 +88,9 @@ void DProcess::cmdFinished(int ret, QProcess::ExitStatus status){
|
||||
}
|
||||
}
|
||||
|
||||
void DProcess::updateLog(){
|
||||
emit ProcessOutput(getProcLog());
|
||||
}
|
||||
// ================================
|
||||
// Dispatcher Class
|
||||
// ================================
|
||||
|
||||
@@ -39,9 +39,13 @@ private:
|
||||
private slots:
|
||||
void cmdError(QProcess::ProcessError);
|
||||
void cmdFinished(int, QProcess::ExitStatus);
|
||||
void updateLog(); //readyRead() signal
|
||||
|
||||
|
||||
signals:
|
||||
void ProcFinished(QString); //ID
|
||||
//Generic signals for subsystem usage (no direct proc access later)
|
||||
void ProcessOutput(QString);
|
||||
void Finished(QString, int, QString); //ID, retcode, log
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user