Пример #1
0
void QTweetUserStream::parseStream(const QByteArray& data)
{
    QJson::ParserRunnable *jsonParser = new QJson::ParserRunnable();
    jsonParser->setData(data);
    connect(jsonParser, SIGNAL(parsingFinished(QVariant,bool,QString)),
        this, SLOT(parsingFinished(QVariant,bool,QString)));

    QThreadPool::globalInstance()->start(jsonParser);
}
Пример #2
0
/**
 *  Parses json response
 */
void QTweetNetBase::parseJson(const QByteArray &jsonData)
{
    QJson::ParserRunnable *jsonParser = new QJson::ParserRunnable;
    jsonParser->setData(jsonData);

    connect(jsonParser, SIGNAL(parsingFinished(QVariant,bool,QString)),
            this, SLOT(parsingJsonFinished(QVariant,bool,QString)));

    QThreadPool::globalInstance()->start(jsonParser);
}