×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    QUrl AddqueryItem() a file will lead to full memory?

    hello again,

    I was trying to upload a file, by encoding the file through a QUrl, it's an audio file with a 4 - 5 MB file size,
    when I tried it on the simulator it works fine, but on the N8 it will say full memory, It's probably Qurl is storing all entries of AddQueryItem into memory?
    how do you work around on that, when you need to upload files with a fair size using QUrl? on the phone?

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QUrl AddqueryItem() a file will lead to full memory?

    QUrl::addQueryItem adds whatever you specify to the end of the transmitted URL string. Even if you could built a 5MB URL, it's unlikely it would get very far through the internet.

    http://doc.qt.nokia.com/4.7/qtnetwork.html
    http://doc.qt.nokia.com/4.7/qt-network.html

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    Re: QUrl AddqueryItem() a file will lead to full memory?

    of course that's given, one has to use QNetworkAccessManager

    my code, goes something like this,


    Code:
    QByteArray data;
    QUrl params;
    
    QNetworkAccessManager* nam;
    ....
    .....
    
    params.addQueryItem("data",file.readAll().toPercentEncoding());
    data.append(params.toString());
    data.remove(0,1);
    audioreply = nam->post(request,data);

    on the desktop,I'd Imagine, building a QUrl of of 10 to 50 MB even, would be fine.
    but on a symbian device? how does one put it on disk, then pass it on QNetworkAccessManager?

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: QUrl AddqueryItem() a file will lead to full memory?

    addQueryItem is for GET

    here, thanks to these guys, is a Qt plugin source for POST
    http://www.tuckdesign.com/sources/Qt
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QUrl AddqueryItem() a file will lead to full memory?

    Did you read my post?????

  6. #6
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    Re: QUrl AddqueryItem() a file will lead to full memory?

    sorry, what am i missing?
    or maybe i wasn't clear with my first post?

    I can successfully upload data, only when it's not sizable as 5 MB on symbian, I am using Qurl then appending it to "data" which is a Qbytearray
    which then is passed to a Qnetworkmanager.

    but when it's sizable and i try to upload it, the app says "memory full, close other application. ..."
    Last edited by loellanthony; 2011-03-27 at 15:24.

  7. #7
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: QUrl AddqueryItem() a file will lead to full memory?

    QtNetwork 4.7 docs...
    what do you mean, dan?
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    Re: QUrl AddqueryItem() a file will lead to full memory?

    Hi,

    (just a suggestion)

    probably your application needs more heap... (from my previous experience).

    -DJ7

  9. #9
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    Re: QUrl AddqueryItem() a file will lead to full memory?

    hello, djagadish7, i have already maxed it with 32MB? 0x020000 0xE184800

    and this was long before i stumbled on this problem.
    Last edited by loellanthony; 2011-03-27 at 15:47.

  10. #10
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QUrl AddqueryItem() a file will lead to full memory?


Similar Threads

  1. Memory Full - while parsing XML file
    By sunitha.m13 in forum Symbian
    Replies: 3
    Last Post: 2009-09-15, 13:32
  2. Opening for team Lead/ Tech Lead at Hyderabad in PalmOS
    By rockyrocks_m in forum News and Announcements
    Replies: 0
    Last Post: 2006-06-28, 13:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×