void ProcessWidget::slotProcessExited(KProcess *)
{
    procLineMaker->flush();
    if( !stdoutbuf.isEmpty() ) 
        insertStdoutLine("");
    if( !stderrbuf.isEmpty() ) 
        insertStderrLine("");
    childFinished(childproc->normalExit(), childproc->exitStatus());
    maybeScrollToBottom();
    emit processExited(childproc);
}
Beispiel #2
0
bool ProcessWidget::startJob(const QString &dir, const QString &command)
{
    procLineMaker->reset();
    clear();
    addItem(new ProcessListBoxItem(command, ProcessListBoxItem::Diagnostic));
    if(!dir.isEmpty()) {
        childproc->setWorkingDirectory(dir);
    }
    childproc->start(command);
    bool childProcStarted = childproc->waitForStarted();
    if (!childProcStarted) {
        insertStderrLine(childproc->errorString());
        childFinished((childproc->exitStatus() == QProcess::NormalExit), childproc->exitStatus());
        emit processNotStarted();
    }
    return childProcStarted;
}
Beispiel #3
0
int TrDo::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: criticalError(); break;
        case 1: tracerouteFinished(); break;
        case 2: childStarted(); break;
        case 3: childFinished((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QProcess::ExitStatus(*)>(_a[2]))); break;
        case 4: childError((*reinterpret_cast< QProcess::ProcessError(*)>(_a[1]))); break;
        case 5: cancel(); break;
        case 6: cancel((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 7;
    }
    return _id;
}
Beispiel #4
0
void ProcessWidget::slotOutputTreatmentOver(){
    childFinished((childproc->exitStatus() == QProcess::NormalExit), childproc->exitStatus());
    emit processOutputsFinished();
}