if (stdErrorReader == NULL)
{
stdErrorReader
= new QFile(this);
if (stdErrorReader != NULL)
{
stdErrorReader
->open
(2,
QIODevice::ReadOnly|QIODevice
::Text);
connect(stdErrorReader,SIGNAL(readyRead()),this,SLOT(stdErrorDataAvailable()));
if (stdErrorNotifier == NULL)
{
if (stdErrorNotifier != NULL)
{
connect(stdErrorNotifier,SIGNAL(activated(int)),this,SLOT(stdErrorDataAvailable(int)));
}
}
}
}
if (stdOutReader == NULL)
{
stdOutReader
= new QFile(this);
if (stdOutReader != NULL)
{
stdOutReader
->open
(1,
QIODevice::ReadOnly|QIODevice
::Text);
connect(stdOutReader,SIGNAL(readyRead()),this,SLOT(stdOutDataAvailable()));
if (stdOutNotifier == NULL)
{
if (stdOutNotifier != NULL)
{
connect(stdOutNotifier,SIGNAL(activated(int)),this,SLOT(stdOutDataAvailable(int)));
}
}
}
}
if (stdErrorReader == NULL)
{
stdErrorReader = new QFile(this);
if (stdErrorReader != NULL)
{
stdErrorReader->open(2,QIODevice::ReadOnly|QIODevice::Text);
connect(stdErrorReader,SIGNAL(readyRead()),this,SLOT(stdErrorDataAvailable()));
if (stdErrorNotifier == NULL)
{
stdErrorNotifier = new QSocketNotifier(2,QSocketNotifier::Read,this);
if (stdErrorNotifier != NULL)
{
connect(stdErrorNotifier,SIGNAL(activated(int)),this,SLOT(stdErrorDataAvailable(int)));
}
}
}
}
if (stdOutReader == NULL)
{
stdOutReader = new QFile(this);
if (stdOutReader != NULL)
{
stdOutReader->open(1,QIODevice::ReadOnly|QIODevice::Text);
connect(stdOutReader,SIGNAL(readyRead()),this,SLOT(stdOutDataAvailable()));
if (stdOutNotifier == NULL)
{
stdOutNotifier = new QSocketNotifier(1,QSocketNotifier::Read,this);
if (stdOutNotifier != NULL)
{
connect(stdOutNotifier,SIGNAL(activated(int)),this,SLOT(stdOutDataAvailable(int)));
}
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks