int Q3Process::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: readyReadStdout(); break;
        case 1: readyReadStderr(); break;
        case 2: processExited(); break;
        case 3: wroteToStdin(); break;
        case 4: launchFinished(); break;
        case 5: tryTerminate(); break;
        case 6: kill(); break;
        case 7: writeToStdin((*reinterpret_cast< const QByteArray(*)>(_a[1]))); break;
        case 8: writeToStdin((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 9: closeStdin(); break;
        case 10: socketRead((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 11: socketWrite((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 12: timeout(); break;
        case 13: closeStdinLaunch(); break;
        }
        _id -= 14;
    }
    return _id;
}
示例#2
0
/*
  This private slot is used by the launch() functions to close standard input.
*/
void QProcess::closeStdinLaunch()
{
    disconnect( this, SIGNAL(wroteToStdin()),
	    this, SLOT(closeStdinLaunch()) );
    closeStdin();
    emit launchFinished();
}
示例#3
0
/*!
    \overload

    The data \a buf is written to standard input with writeToStdin()
    using the QString::local8Bit() representation of the strings.
*/
bool QProcess::launch( const QString& buf, QStringList *env )
{
    if ( start( env ) ) {
	if ( !buf.isEmpty() ) {
	    connect( this, SIGNAL(wroteToStdin()),
		    this, SLOT(closeStdinLaunch()) );
	    writeToStdin( buf );
	} else {
	    closeStdin();
	    emit launchFinished();
	}
	return TRUE;
    } else {
	emit launchFinished();
	return FALSE;
    }
}
示例#4
0
bool QProcess::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: tryTerminate(); break;
    case 1: kill(); break;
    case 2: writeToStdin((const QByteArray&)*((const QByteArray*)static_QUType_ptr.get(_o+1))); break;
    case 3: writeToStdin((const QString&)static_QUType_QString.get(_o+1)); break;
    case 4: closeStdin(); break;
    case 5: socketRead((int)static_QUType_int.get(_o+1)); break;
    case 6: socketWrite((int)static_QUType_int.get(_o+1)); break;
    case 7: timeout(); break;
    case 8: closeStdinLaunch(); break;
    default:
	return QObject::qt_invoke( _id, _o );
    }
    return TRUE;
}