示例#1
0
int TEPty::commSetupDoneC ()
{
    int ok = KProcess::commSetupDoneC ();
    if ( ok ) {
        emit forkedChild();
    }
    return ok;
}
示例#2
0
void TESession::setPty(TEPty *_sh)
{
  if ( sh ) {
    delete sh;
  }
  sh = _sh;
  connect( sh, TQT_SIGNAL( forkedChild() ),
           this, TQT_SIGNAL( forkedChild() ));

  //kdDebug(1211)<<"TESession ctor() sh->setSize()"<<endl;
  sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary
  sh->useUtf8(em->utf8());
  //kdDebug(1211)<<"TESession ctor() connecting"<<endl;
  connect( sh,TQT_SIGNAL(block_in(const char*,int)),this,TQT_SLOT(onRcvBlock(const char*,int)) );

  connect( em,TQT_SIGNAL(sndBlock(const char*,int)),sh,TQT_SLOT(send_bytes(const char*,int)) );
  connect( em,TQT_SIGNAL(lockPty(bool)),sh,TQT_SLOT(lockPty(bool)) );
  connect( em,TQT_SIGNAL(useUtf8(bool)),sh,TQT_SLOT(useUtf8(bool)) );

  connect( sh,TQT_SIGNAL(done(int)), this,TQT_SLOT(done(int)) );

  if (!sh->error().isEmpty())
     TQTimer::singleShot(0, this, TQT_SLOT(ptyError()));
}