Exemplo n.º 1
0
void WebUpdater::getUpdateConfig_p ()
{
	const QStringList urls = config_.value ("UpdateConfigUrl").toStringList ();

	if (urls.isEmpty()) {
		return;
	}

	if (currentUrl_ >= urls.size ()) {
		currentUrl_ = 0;
		return;
	}

	const QUrl url (urls [currentUrl_]);

	if (url.isEmpty()) {
		return;
	}

	const QNetworkRequest request (url);

	QNetworkReply *reply_ = manager_->get (request);

	replyList.push_back (reply_);

	connect (reply_, SIGNAL (finished ()),
			 this, SLOT (updateConfigDownloaded()));

	connect (reply_, SIGNAL (finished()),
			 this, SLOT (replyFinished()));
}
Exemplo n.º 2
0
void QDeclarativeFontObject::download(const QUrl &url, QNetworkAccessManager *manager)
{
    QNetworkRequest req(url);
    req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
    reply = manager->get(req);
    QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
QGeoCodeReply *QGeoCodingManagerEngineQGC::reverseGeocode(const QGeoCoordinate &coordinate, const QGeoShape &bounds)
{
    Q_UNUSED(bounds)

    QNetworkRequest request;
    request.setRawHeader("User-Agent", m_userAgent);

    QUrl url(QStringLiteral("http://maps.googleapis.com/maps/api/geocode/json"));
    QUrlQuery query;
    query.addQueryItem(QStringLiteral("sensor"), QStringLiteral("false"));
    query.addQueryItem(QStringLiteral("language"), locale().name().left(2));
    query.addQueryItem(QStringLiteral("latlng"), QStringLiteral("%1,%2")
                       .arg(coordinate.latitude())
                       .arg(coordinate.longitude()));

    url.setQuery(query);
    request.setUrl(url);
    //qDebug() << url;

    QNetworkReply *reply = m_networkManager->get(request);
    reply->setParent(0);

    QGeoCodeReplyQGC *geocodeReply = new QGeoCodeReplyQGC(reply);

    connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
            this, SLOT(replyError(QGeoCodeReply::Error,QString)));

    return geocodeReply;
}
QGeoCodeReply *QGeoCodingManagerEngineQGC::geocode(const QString &address, int limit, int offset, const QGeoShape &bounds)
{
    Q_UNUSED(limit);
    Q_UNUSED(offset);

    QNetworkRequest request;
    request.setRawHeader("User-Agent", m_userAgent);

    QUrl url(QStringLiteral("http://maps.googleapis.com/maps/api/geocode/json"));
    QUrlQuery query;
    query.addQueryItem(QStringLiteral("sensor"), QStringLiteral("false"));
    query.addQueryItem(QStringLiteral("language"), locale().name().left(2));
    query.addQueryItem(QStringLiteral("address"), address);
    if (bounds.type() == QGeoShape::RectangleType) {
        query.addQueryItem(QStringLiteral("bounds"), boundingBoxToLtrb(bounds));
    }

    url.setQuery(query);
    request.setUrl(url);
    //qDebug() << url;

    QNetworkReply *reply = m_networkManager->get(request);
    reply->setParent(0);

    QGeoCodeReplyQGC *geocodeReply = new QGeoCodeReplyQGC(reply);

    connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
            this, SLOT(replyError(QGeoCodeReply::Error,QString)));

    return geocodeReply;
}
Exemplo n.º 5
0
void MarkerManager::search(QString query, qreal radius)
{
    QGeoSearchReply *reply;
    if (radius > 0) {
        QGeoBoundingCircle *boundingCircle = new QGeoBoundingCircle(
                    d->myLocation->coordinate(), radius);
        reply = d->searchManager->search(query,
                                        QGeoSearchManager::SearchAll,
                                        -1, 0,
                                        boundingCircle);
    } else {
        reply = d->searchManager->search(query);
    }

    d->forwardReplies.insert(reply);

    if (d->status) {
        d->status->setText("Searching...");
        d->status->show();
    }

    if (reply->isFinished()) {
        replyFinished(reply);
    } else {
        connect(reply, SIGNAL(error(QGeoSearchReply::Error,QString)),
                this, SIGNAL(searchError(QGeoSearchReply::Error,QString)));
    }
}
QGeoRouteReply* QGeoRoutingManagerEngineOsm::calculateRoute(const QGeoRouteRequest &request)
{
    QNetworkRequest networkRequest;
    networkRequest.setRawHeader("User-Agent", m_userAgent);

    QUrl url(QStringLiteral("http://router.project-osrm.org/viaroute"));
    QUrlQuery query;

    query.addQueryItem(QStringLiteral("instructions"), QStringLiteral("true"));

    foreach (const QGeoCoordinate &c, request.waypoints()) {
        query.addQueryItem(QStringLiteral("loc"), QString::number(c.latitude()) + QLatin1Char(',') +
                                                 QString::number(c.longitude()));
    }

    url.setQuery(query);
    networkRequest.setUrl(url);

    QNetworkReply *reply = m_networkManager->get(networkRequest);

    QGeoRouteReplyOsm *routeReply = new QGeoRouteReplyOsm(reply, request, this);

    connect(routeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(routeReply, SIGNAL(error(QGeoRouteReply::Error,QString)),
            this, SLOT(replyError(QGeoRouteReply::Error,QString)));

    return routeReply;
}
Exemplo n.º 7
0
void HttpGetFiles::run()
{
    QRegExp rx("file=(.*)");
    m_status = Running;

    QStringList::iterator iter;
    for (iter = m_fileList.begin(); iter != m_fileList.end(); ++iter) {
        QString source(*iter);
        if (rx.indexIn(source, 0) != -1) {
            QString destination(m_destinationPath);
            destination += "/" + rx.cap(1);
            HttpGet* reply(new HttpGet(m_connection, source, destination));
            m_replies.append(reply);
            connect(this, SIGNAL(interrupted()), this, SLOT(interrupt()));
            connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
            connect(reply, SIGNAL(copyProgress()), this, SLOT(copyProgress()));
        }
    }

    QList<HttpGet*> replies(m_replies);
    QList<HttpGet*>::iterator reply;
    for (reply = replies.begin(); reply != replies.end(); ++reply) {
        (*reply)->run();
    }
}
Exemplo n.º 8
0
void Rest::put()
{
    QByteArray data;
    data.append("{}");
    reply = connectionManager->put(request, data);
    connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
Exemplo n.º 9
0
void CaBundleUpdater::start()
{
    QFile updateFile(m_lastUpdateFileName);
    bool updateNow = false;

    if (updateFile.exists()) {
        if (updateFile.open(QFile::ReadOnly)) {
            QDateTime updateTime = QDateTime::fromString(updateFile.readAll());
            updateNow = updateTime.addDays(5) < QDateTime::currentDateTime();
        }
        else {
            qWarning() << "CaBundleUpdater::start cannot open file for reading" << m_lastUpdateFileName;
        }
    }
    else {
        updateNow = true;
    }

    if (updateNow) {
        m_progress = CheckLastUpdate;

        QUrl url = QUrl::fromEncoded(QString(Qz::WWWADDRESS + QL1S("/certs/bundle_version")).toUtf8());
        m_reply = m_manager->get(QNetworkRequest(url));
        connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    }
}
void QDeclarativeFontLoader::setSource(const QUrl &url)
{
    Q_D(QDeclarativeFontLoader);
    if (url == d->url)
        return;
    d->url = qmlContext(this)->resolvedUrl(url);

    d->status = Loading;
    emit statusChanged();
    emit sourceChanged();
#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
    QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url);
    if (!lf.isEmpty()) {
        int id = QFontDatabase::addApplicationFont(lf);
        if (id != -1) {
            d->name = QFontDatabase::applicationFontFamilies(id).at(0);
            emit nameChanged();
            d->status = QDeclarativeFontLoader::Ready;
        } else {
            d->status = QDeclarativeFontLoader::Error;
            qmlInfo(this) << "Cannot load font: \"" << url.toString() << "\"";
        }
        emit statusChanged();
    } else
#endif
    {
        QNetworkRequest req(d->url);
        req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
        d->reply = qmlEngine(this)->networkAccessManager()->get(req);
        QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    }
}
QGeoCodeReply *QGeoCodingManagerEngineKokudo::reverseGeocode(const QGeoCoordinate &coordinate,
                                                          const QGeoShape &bounds)
{
    Q_UNUSED(bounds)

    QNetworkRequest request;
    request.setRawHeader("User-Agent", m_userAgent);

    QUrl url(QString("%1/reverse").arg(m_urlPrefix));
    QUrlQuery query;
    query.addQueryItem(QStringLiteral("format"), QStringLiteral("json"));
    query.addQueryItem(QStringLiteral("accept-language"), locale().name().left(2));
    query.addQueryItem(QStringLiteral("lat"), QString::number(coordinate.latitude()));
    query.addQueryItem(QStringLiteral("lon"), QString::number(coordinate.longitude()));
    query.addQueryItem(QStringLiteral("zoom"), QStringLiteral("18"));
    query.addQueryItem(QStringLiteral("addressdetails"), QStringLiteral("1"));

    url.setQuery(query);
    request.setUrl(url);

    QNetworkReply *reply = m_networkManager->get(request);

    QGeoCodeReplyKokudo *geocodeReply = new QGeoCodeReplyKokudo(reply, this);

    connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
            this, SLOT(replyError(QGeoCodeReply::Error,QString)));

    return geocodeReply;
}
Exemplo n.º 12
0
int BdLogic::ConnectAndDownload(const QString &username, const QString &password)
{
    QString loginPostData;

    m_dlState = DLSTATE_LOGIN;
    m_statusCode = BDLOGIC_STATUS_DOWNLOADING;
    m_statusString = QString("Logging in");
    m_actionListOrderedForQML.clear();
    m_boxMapParsedJson.clear();
    m_boxMapRawJson.clear();
    m_replyGotError = false;

    m_inactiveProjectListParsedJson.clear();
    m_currentInactiveProjectDlIx = 0;

    loginPostData = "username="******"&password=";
    loginPostData += password;

    QNetworkRequest request;
    request.setUrl(QUrl(DOIT_LOGIN_URL));
    m_reply = m_netManager->post(request, loginPostData.toUtf8());

    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
            this, SLOT(replyError(QNetworkReply::NetworkError)));
    connect(m_reply, SIGNAL(sslErrors(QList<QSslError>)),
            this, SLOT(replySSLError(QList<QSslError>)));

    emit downloadStatusUpdated(m_statusCode, m_statusString);

    return 0;
}
Exemplo n.º 13
0
int HttpDownload::downloadFile(const QString &url, const QString &file, const QString &dir){
    m_reply = m_manager->get(QNetworkRequest(QUrl(url+file)));
    if(dir.isEmpty()){
        m_file = new QFile(file);
        return 0;
    }else{
        QDir directory(dir);
        if(!directory.exists()){
            directory.mkpath(dir);
        }
        if(dir.endsWith("/"))
            m_file = new QFile(dir+file);
        else
            m_file = new QFile(dir+"/"+file);
    }
    if(!m_file->open(QIODevice::WriteOnly)){
        QMessageBox::warning(0,"错误","文件打开失败",QMessageBox::Ok);
        return 0;
    }
    connect(m_reply,SIGNAL(readyRead()),this,SLOT(replyNewDate()));

    connect(m_reply,SIGNAL(finished()),this,SLOT(replyFinished()));

    connect(m_reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(replyError()));

    connect(m_reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(replyProgress(qint64,qint64)));
    connect(this,SIGNAL(finished()),m_loop,SLOT(quit()));
    m_loop->exec();
    return m_down_size;
}
QGeoCodeReply *QGeoCodingManagerEngineKokudo::geocode(const QString &address, int limit, int offset, const QGeoShape &bounds)
{
    Q_UNUSED(offset)

    QNetworkRequest request;
    request.setRawHeader("User-Agent", m_userAgent);

    QUrl url(QString("%1/search").arg(m_urlPrefix));
    QUrlQuery query;
    query.addQueryItem(QStringLiteral("q"), address);
    query.addQueryItem(QStringLiteral("format"), QStringLiteral("json"));
    query.addQueryItem(QStringLiteral("accept-language"), locale().name().left(2));
    //query.addQueryItem(QStringLiteral("countrycodes"), QStringLiteral("au,jp"));
    if (bounds.type() == QGeoShape::RectangleType) {
        query.addQueryItem(QStringLiteral("viewbox"), boundingBoxToLtrb(bounds));
        query.addQueryItem(QStringLiteral("bounded"), QStringLiteral("1"));
    }
    query.addQueryItem(QStringLiteral("polygon_geojson"), QStringLiteral("1"));
    query.addQueryItem(QStringLiteral("addressdetails"), QStringLiteral("1"));
    if (limit != -1)
        query.addQueryItem(QStringLiteral("limit"), QString::number(limit));

    url.setQuery(query);
    request.setUrl(url);

    QNetworkReply *reply = m_networkManager->get(request);

    QGeoCodeReplyKokudo *geocodeReply = new QGeoCodeReplyKokudo(reply, this);

    connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
            this, SLOT(replyError(QGeoCodeReply::Error,QString)));

    return geocodeReply;
}
Exemplo n.º 15
0
void WebPageManager::requestCreated(QByteArray &url, QNetworkReply *reply) {
  logger() << "Started request to" << url;
  if (reply->isFinished())
    replyFinished(reply);
  else {
    connect(reply, SIGNAL(finished()), SLOT(handleReplyFinished()));
  }
}
Exemplo n.º 16
0
void TwitterInterface::RequestTwitter (const QUrl& requestAddress)
{
    auto reply = HttpClient_->get (QNetworkRequest (requestAddress));
    connect (reply,
             SIGNAL (finished ()),
             this,
             SLOT (replyFinished ()));
}
Exemplo n.º 17
0
FollowRedirectReply::FollowRedirectReply(const QUrl &url, QNetworkAccessManager* manager)
  : QObject()
  , m_manager(manager)
  , m_redirectCount(0)
{
  m_reply = m_manager->get(QNetworkRequest(url));
  connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
Exemplo n.º 18
0
void QNetworkAccessHttpBackend::postRequest()
{
    bool loadedFromCache = false;
    QHttpNetworkRequest httpRequest;
    switch (operation()) {
    case QNetworkAccessManager::GetOperation:
        httpRequest.setOperation(QHttpNetworkRequest::Get);
        validateCache(httpRequest, loadedFromCache);
        break;

    case QNetworkAccessManager::HeadOperation:
        httpRequest.setOperation(QHttpNetworkRequest::Head);
        validateCache(httpRequest, loadedFromCache);
        break;

    case QNetworkAccessManager::PostOperation:
        invalidateCache();
        httpRequest.setOperation(QHttpNetworkRequest::Post);
        uploadDevice = new QNetworkAccessHttpBackendIODevice(this);
        break;

    case QNetworkAccessManager::PutOperation:
        invalidateCache();
        httpRequest.setOperation(QHttpNetworkRequest::Put);
        uploadDevice = new QNetworkAccessHttpBackendIODevice(this);
        break;

    default:
        break;                  // can't happen
    }

    httpRequest.setData(uploadDevice);
    httpRequest.setUrl(url());

    QList<QByteArray> headers = request().rawHeaderList();
    foreach (const QByteArray &header, headers)
        httpRequest.setHeaderField(header, request().rawHeader(header));

    if (loadedFromCache) {
        QNetworkAccessBackend::finished();
        return;    // no need to send the request! :)
    }

    httpReply = http->sendRequest(httpRequest);
    httpReply->setParent(this);
#ifndef QT_NO_OPENSSL
    if (pendingSslConfiguration)
        httpReply->setSslConfiguration(*pendingSslConfiguration);
    if (pendingIgnoreSslErrors)
        httpReply->ignoreSslErrors();
#endif

    connect(httpReply, SIGNAL(readyRead()), SLOT(replyReadyRead()));
    connect(httpReply, SIGNAL(finished()), SLOT(replyFinished()));
    connect(httpReply, SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)),
            SLOT(httpError(QNetworkReply::NetworkError,QString)));
    connect(httpReply, SIGNAL(headerChanged()), SLOT(replyHeaderChanged()));
}
Exemplo n.º 19
0
/*!
    \qmlmethod void Category::remove()

    This method permanently removes the category from the backend service.
*/
void QDeclarativeCategory::remove()
{
    QPlaceManager *placeManager = manager();
    if (!placeManager)
        return;

    m_reply = placeManager->removeCategory(m_category.categoryId());
    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    setStatus(QDeclarativeCategory::Removing);
}
Exemplo n.º 20
0
/*!
    \qmlmethod void Category::save()

    This method saves the category to the backend service.
*/
void QDeclarativeCategory::save(const QString &parentId)
{
    QPlaceManager *placeManager = manager();
    if (!placeManager)
        return;

    m_reply = placeManager->saveCategory(category(), parentId);
    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    setStatus(QDeclarativeCategory::Saving);
}
Exemplo n.º 21
0
void Download::resetReply()
{
    QNetworkRequest request(downloadUrl);
    request.setOriginatingObject(this);
    request.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
    networkReply = NetworkAccessManager::instance()->get(request);
    connect( networkReply, SIGNAL( finished() ),
             this, SLOT( replyFinished() ) );
    connect( networkReply, SIGNAL( downloadProgress(qint64, qint64) ),
             this, SLOT( downloadProgress(qint64, qint64) ) );
}
QPlaceDetailsReplyImpl::QPlaceDetailsReplyImpl(QNetworkReply *reply,
                                               QPlaceManagerEngineNokiaV2 *parent)
    :   QPlaceDetailsReply(parent), m_reply(reply), m_engine(parent)
{
    Q_ASSERT(parent);

    if (!m_reply)
        return;

    m_reply->setParent(this);
    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
void QgsVBSCatalogProvider::load()
{
  mPendingTasks = 1;
  QUrl url( mBaseUrl );
  QgsArcGisRestUtils::addToken( url );
  QString lang = QSettings().value( "/locale/currentLang", "en" ).toString().left( 2 ).toUpper();
  url.addQueryItem( "lang", lang );
  QNetworkRequest req( url );
  req.setRawHeader( "Referer", QSettings().value( "search/referer", "http://localhost" ).toByteArray() );
  QNetworkReply* reply = QgsNetworkAccessManager::instance()->get( req );
  connect( reply, SIGNAL( finished() ), this, SLOT( replyFinished() ) );
}
Exemplo n.º 24
0
void SearchEnginesManager::addEngine(const QUrl &url)
{
    ENSURE_LOADED;

    if (!url.isValid()) {
        return;
    }

    qApp->setOverrideCursor(Qt::WaitCursor);

    QNetworkReply* reply = mApp->networkManager()->get(QNetworkRequest(url));
    reply->setParent(this);
    connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
int NetworkFileSystem::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { int _r = replyFinished((*reinterpret_cast< QNetworkReply*(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; }  break;
        }
        _id -= 1;
    }
    return _id;
}
Exemplo n.º 26
0
Check_for_updates::Check_for_updates()
{
  QNetworkRequest request;
  QNetworkReply *reply;

  manager = new QNetworkAccessManager(this);

  request.setUrl(QUrl("http://www.teuniz.net/edfbrowser/latest_version.txt"));
  request.setRawHeader("User-Agent", PROGRAM_NAME " " PROGRAM_VERSION);
  request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);

  reply = manager->get(request);

  connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
Exemplo n.º 27
0
bool QWebdavDirParser::listPath(QWebdav *pWebdav, const QString &path, bool isDirectory)
{
    Q_ASSERT(pWebdav && "must provide pointer to QWebdav-instance");
    if (m_busy) {
        qWarning(webdavDirParser)<<"busy";
        return false;
    }

    if (m_reply) {
        qWarning(webdavDirParser)<<"Already processing request";//WTF?
        return false;
    }

    if (!pWebdav) {
        qWarning(webdavDirParser)<<"NULL pointer passed";
        return false;
    }

    if (path.isEmpty()) {
        qWarning(webdavDirParser)<<"provided path is empty";
        return false;
    }

    if (isDirectory && !path.endsWith("/")) {
        qWarning(webdavDirParser)<<"Provided path must end with '/'";//WTF?
        return false;
    }

    m_webdav = pWebdav;
    m_path = path;
    m_busy = true;
    m_abort = false;
    m_includeRequestedURI = false;

    if(isDirectory) {
        m_reply = pWebdav->list(path);
    } else {
        m_reply = pWebdav->list(path, 0);
    }

    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));

    if (!m_dirList.isEmpty())
        m_dirList.clear();

    return true;

}
int QNetworkAccessHttpBackend::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QNetworkAccessBackend::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: replyReadyRead(); break;
        case 1: replyFinished(); break;
        case 2: replyHeaderChanged(); break;
        case 3: httpAuthenticationRequired((*reinterpret_cast< const QHttpNetworkRequest(*)>(_a[1])),(*reinterpret_cast< QAuthenticator*(*)>(_a[2]))); break;
        case 4: httpError((*reinterpret_cast< QNetworkReply::NetworkError(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break;
        }
        _id -= 5;
    }
    return _id;
}
Exemplo n.º 29
0
void FollowRedirectReply::replyFinished()
{
  int replyStatus = m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();

  if ((replyStatus != 301 && replyStatus != 302) || m_redirectCount == 5) {
    emit finished();
    return;
  }

  m_redirectCount++;

  QUrl redirectUrl = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
  m_reply->close();
  m_reply->deleteLater();

  m_reply = m_manager->get(QNetworkRequest(redirectUrl));
  connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
QT_BEGIN_NAMESPACE

QPlaceContentReplyImpl::QPlaceContentReplyImpl(const QPlaceContentRequest &request,
                                               QNetworkReply *reply,
                                               QPlaceManagerEngineNokiaV2 *engine)
    :   QPlaceContentReply(engine), m_reply(reply), m_engine(engine)
{
    Q_ASSERT(engine);
    setRequest(request);

    if (!m_reply)
        return;

    m_reply->setParent(this);
    connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
    connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
            this, SLOT(replyError(QNetworkReply::NetworkError)));
}