Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Downloading files using http in Android
Qt 6.11 is out! See what's new in the release blog

Downloading files using http in Android

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abates
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved