Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 243 → Rev 244

/trunk/DBViewer/woker.cpp
New file
0,0 → 1,26
#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-запроса
}