示例#1
0
void FvUpdater::startDownloadFeed(QUrl url)
{
	m_xml.clear();

	m_reply = m_qnam.get(QNetworkRequest(url));

	connect(m_reply, SIGNAL(readyRead()), this, SLOT(httpFeedReadyRead()));
	connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(httpFeedUpdateDataReadProgress(qint64, qint64)));
	connect(m_reply, SIGNAL(finished()), this, SLOT(httpFeedDownloadFinished()));
}
示例#2
0
void FvUpdater::startDownloadFeed(QUrl url)
{
	m_xml.clear();

	m_reply = m_qnam.get(QNetworkRequest(url));

    if(!m_silentAsMuchAsItCouldGet){
        showUpdateCheckingDialog();
    }

	connect(m_reply, SIGNAL(readyRead()), this, SLOT(httpFeedReadyRead()));
	connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(httpFeedUpdateDataReadProgress(qint64, qint64)));
	connect(m_reply, SIGNAL(finished()), this, SLOT(httpFeedDownloadFinished()));
}
示例#3
0
void FvUpdater::startDownloadFeed(QUrl url)
{
	m_xml.clear();

	QNetworkRequest request;
 	request.setHeader(QNetworkRequest::ContentTypeHeader, "application/xml");
//  	request.setHeader(QNetworkRequest::UserAgentHeader, QApplication::applicationName());
 	request.setUrl(url);

	m_reply = m_qnam.get(request);

	connect(m_reply, SIGNAL(readyRead()), this, SLOT(httpFeedReadyRead()));
	connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(httpFeedUpdateDataReadProgress(qint64, qint64)));
	connect(m_reply, SIGNAL(finished()), this, SLOT(httpFeedDownloadFinished()));
}
示例#4
0
void FvUpdater::startDownloadFeed(QUrl url)
{
	m_xml.clear();

	// Check SSL Fingerprint if required
	if(url.scheme()=="https" && !m_requiredSslFingerprint.isEmpty())
		if( !checkSslFingerPrint(url) )	// check failed
		{	
			qWarning() << "Update aborted.";
			return;
		}


	m_reply = m_qnam.get(QNetworkRequest(url));

	connect(m_reply, SIGNAL(readyRead()), this, SLOT(httpFeedReadyRead()));
	connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(httpFeedUpdateDataReadProgress(qint64, qint64)));
	connect(m_reply, SIGNAL(finished()), this, SLOT(httpFeedDownloadFinished()));
}