Downloading files using http in Android
-
I've been using the QNetworkAccessManager object to successfully download data in text format over http. I wanted to add in the capability to update the app from within the app itself, so the logical first step is to have the app download itself from a web site. Unfortunately when I use the same code I use for downloading text data to try to download binary data, the app raises "Fatal signal 11 (SIGSEGV) at 0x0000000c".
I'm using Qt Creator 2.7.2 based on Qt 5.1.0.
@ updnam=new QNetworkAccessManager(this);
QObject::connect(updnam,SIGNAL(finished(QNetworkReply*)),this,SLOT(finishedGetUpdate(QNetworkReply*)));
QString requrl=QString(UPDATE_URL);
QUrl url(requrl);
reply=updnam->get(QNetworkRequest(url));
@
I have a function:
@void Loaddata::finishedGetUpdate(QNetworkReply* reply);
@But the app isn't even getting to the point of calling it, and is not, as far as I can tell, fetching the binary file. I've tried getting it to download files from other servers, but they all return in the same fatal signal. Any suggestions as to what I might be doing wrong, or does this iteration just not support http requests of binary data?