|
|
|
@ -24,11 +24,11 @@
|
|
|
|
|
#include "altparser.h"
|
|
|
|
|
|
|
|
|
|
#include <tqtimer.h>
|
|
|
|
|
#include <klocale.h>
|
|
|
|
|
#include <tdelocale.h>
|
|
|
|
|
#include <kdebug.h>
|
|
|
|
|
/******************************* AltItemElement ********************/
|
|
|
|
|
|
|
|
|
|
AltItemElement::AltItemElement(KListView *parent, Alternative *alternative)
|
|
|
|
|
AltItemElement::AltItemElement(TDEListView *parent, Alternative *alternative)
|
|
|
|
|
: TQCheckListItem(parent, "", TQCheckListItem::RadioButton),
|
|
|
|
|
m_alt(alternative),
|
|
|
|
|
m_parent(parent),
|
|
|
|
@ -58,22 +58,22 @@ void AltItemElement::searchDescription()
|
|
|
|
|
|
|
|
|
|
if (!exec.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
KProcess *procdesc = new KProcess();
|
|
|
|
|
TDEProcess *procdesc = new TDEProcess();
|
|
|
|
|
*procdesc << "whatis";
|
|
|
|
|
*procdesc << exec;
|
|
|
|
|
|
|
|
|
|
connect(procdesc, SIGNAL(receivedStdout(KProcess *, char *, int)), this,
|
|
|
|
|
SLOT(slotGetDescription(KProcess *, char *, int)));
|
|
|
|
|
//connect(procdesc, SIGNAL( receivedStderr(KProcess *, char *, int) ), this,
|
|
|
|
|
// SLOT(slotGetDescription(KProcess *, char *, int)));
|
|
|
|
|
connect(procdesc, SIGNAL( processExited(KProcess *)), this,
|
|
|
|
|
SLOT(slotDescriptionTermined(KProcess *)));
|
|
|
|
|
procdesc->start(KProcess::NotifyOnExit,/*KProcess::Block,*/ KProcess::AllOutput);
|
|
|
|
|
connect(procdesc, SIGNAL(receivedStdout(TDEProcess *, char *, int)), this,
|
|
|
|
|
SLOT(slotGetDescription(TDEProcess *, char *, int)));
|
|
|
|
|
//connect(procdesc, SIGNAL( receivedStderr(TDEProcess *, char *, int) ), this,
|
|
|
|
|
// SLOT(slotGetDescription(TDEProcess *, char *, int)));
|
|
|
|
|
connect(procdesc, SIGNAL( processExited(TDEProcess *)), this,
|
|
|
|
|
SLOT(slotDescriptionTermined(TDEProcess *)));
|
|
|
|
|
procdesc->start(TDEProcess::NotifyOnExit,/*TDEProcess::Block,*/ TDEProcess::AllOutput);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void AltItemElement::slotDescriptionTermined(KProcess *proc)
|
|
|
|
|
void AltItemElement::slotDescriptionTermined(TDEProcess *proc)
|
|
|
|
|
{
|
|
|
|
|
if (!proc->exitStatus())
|
|
|
|
|
{
|
|
|
|
@ -108,7 +108,7 @@ void AltItemElement::slotDescriptionTermined(KProcess *proc)
|
|
|
|
|
setText( 3, m_desc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AltItemElement::slotGetDescription(KProcess *, char *buffer, int buflen)
|
|
|
|
|
void AltItemElement::slotGetDescription(TDEProcess *, char *buffer, int buflen)
|
|
|
|
|
{
|
|
|
|
|
m_desc += TQString::fromLatin1(buffer, buflen);
|
|
|
|
|
}
|
|
|
|
|