Subversion Repositories OpenInventory

Rev

Blame | Last modification | View Log | Download | RSS feed

#include "woker.h"

Woker::Woker(QObject *parent) :
    QObject(parent)
{
    connect(&work_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandartProcessOutput()));
    connect(&work_process, SIGNAL(readyReadStandardError()), this, SLOT(readStandartProcessError()));
   // work_process.start("ls\n");

}
void Woker::readStandartProcessOutput(){
work_buffer = work_process.readAllStandardOutput();
 qDebug() << QString(work_buffer);
//mutex.lock();
//stopped = true;
//mutex.unlock();
work_process.close();
//stopThread();
emit workEnd();

}

void Woker::readStandartProcessError(){
work_buffer = work_process.readAllStandardError();
//error = true; // если ошибка, установим флаг ошибки выполнения WMI-запроса
}