2017-11-23 12:33:32 +08:00
|
|
|
#include "qqthttpdownloadmanager.h"
|
|
|
|
|
|
|
|
QQtHttpDownloadManager::QQtHttpDownloadManager ( QObject* parent ) : QQtWebAccessManager ( parent )
|
|
|
|
{
|
2017-11-23 19:12:48 +08:00
|
|
|
QFile file ( "/Users/abel/Develop/c2-test/aa" );
|
|
|
|
file.open ( QFile::Truncate | QFile::WriteOnly );
|
|
|
|
file.close();
|
|
|
|
}
|
2017-11-23 12:33:32 +08:00
|
|
|
|
2017-11-23 19:12:48 +08:00
|
|
|
void QQtHttpDownloadManager::replyReadyRead ( QQtWebAccessSession* session )
|
|
|
|
{
|
|
|
|
pline() << session->getWebAccessReply()->url();
|
|
|
|
QByteArray data = session->getWebAccessReply()->readAll();
|
|
|
|
pline() << data;
|
|
|
|
QFile file ( "/Users/abel/Develop/c2-test/aa" );
|
|
|
|
file.open ( QFile::Append );
|
|
|
|
file.write ( data );
|
|
|
|
file.close();
|
2017-11-23 12:33:32 +08:00
|
|
|
}
|