|
|
|
@ -67,24 +67,24 @@ void MagicLabel::getCommandOutput()
|
|
|
|
|
for (int i = 0; i < parts.count(); i++)
|
|
|
|
|
*proc << parts[i];
|
|
|
|
|
|
|
|
|
|
connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(processExited(KProcess*)));
|
|
|
|
|
connect(proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(receivedStdout(KProcess*, char*, int)));
|
|
|
|
|
connect(proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(processExited(TDEProcess*)));
|
|
|
|
|
connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(receivedStdout(TDEProcess*, char*, int)));
|
|
|
|
|
|
|
|
|
|
mValue = "";
|
|
|
|
|
|
|
|
|
|
if (!proc->start(KProcess::Block, KProcess::Stdout))
|
|
|
|
|
if (!proc->start(TDEProcess::Block, TDEProcess::Stdout))
|
|
|
|
|
KMessageBox::information(0, TQString("Could not start process: %1").arg(cmd));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MagicLabel::receivedStdout(KProcess *proc, char *buffer, int buflen)
|
|
|
|
|
void MagicLabel::receivedStdout(TDEProcess *proc, char *buffer, int buflen)
|
|
|
|
|
{
|
|
|
|
|
TQString buf = TQString::fromLatin1(buffer, buflen);
|
|
|
|
|
mValue += buf.replace("\n", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MagicLabel::processExited(KProcess* proc)
|
|
|
|
|
void MagicLabel::processExited(TDEProcess* proc)
|
|
|
|
|
{
|
|
|
|
|
delete proc;
|
|
|
|
|
}
|
|
|
|
|