The K Desktop Environment

KIO::Job::data

Name

KIO::Job::data -- emitted whenever data is received

Synopsis

  KIO::Job::data(KIO::Job* job, const QByteArray& data)
  

Parameters

job

Pointer to the current job.

data

The data that the slave received and is passing along to your app

Description

This signal is emitted whenever the slave receives data. The data may be the entire file.. but may only be chunks of it. The only way you know for sure that you are done is to connect to the result() signal.

Example

  Client::Client()
  {
    connect(job,  SIGNAL(data(KIO::Job *, const QByteArray&)),
            this, SLOT(slotData(KIO::Job *, const QByteArray&)));
  }
 
  void Client::slotData(KIO::Job *job, const QByteArray& data)
  {
    QCString c_string(data.data(), data.size());
    kdDebug() << "Data: \"" << c_string.data() << "\"" << endl;
  }