Results 1 to 20 of 24

Thread: QNetworkRequest atribute

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: QNetworkRequest atribute

    I don't kkown. QNetworkRequest::CustomVerbAttribute is only for request.

    Let's tell what is your goal?
    Try read Qt documentation before ask stupid question.

  2. #2
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by unit View Post
    Let's tell what is your goal?
    I want to add 2 parameters to request, I will know then in finished() that kind of result reply contains, what kind of (my own) category

  3. #3
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: QNetworkRequest atribute

    Do you use many different request in one time in one class?
    Try read Qt documentation before ask stupid question.

  4. #4
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by unit View Post
    Do you use many different request in one time in one class?
    yes, thats why i need to add 2 parameters, because I use many requests, and I need to know (my own) category of reply

  5. #5
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: QNetworkRequest atribute

    Ok. Sorry me, i'm not software developer, but i think problem in your code architecture.

    Try create class for each request. This class should do request and read reply. And have category or other attributes (and getters|setters ) I think it best way and solution.

    And also you can ask Mr. Wysota for best architecture solition. He is very good programmer.
    Try read Qt documentation before ask stupid question.

  6. #6
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by unit View Post
    Ok. Sorry me, i'm not software developer, but i think problem in your code architecture.

    Try create class for each request. This class should do request and read reply. And have category or other attributes (and getters|setters ) I think it best way and solution.

    And also you can ask Mr. Wysota for best architecture solition. He is very good programmer.
    It's not architecture problem. Each request has my own named category, and I just want to add my variable to each request and read it in finished().

  7. #7
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: QNetworkRequest atribute

    What problem create class that do it? It will do request and have variable. It's more good and easy way as i think. Nut i'm not developer so i can mistake.
    Try read Qt documentation before ask stupid question.

  8. #8
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by unit View Post
    What problem create class that do it? It will do request and have variable. It's more good and easy way as i think. Nut i'm not developer so i can mistake.
    Categories are dynamic so creating class for earch category is impossible and idiotic.
    There should be way to add my own string parameters to each request.

    Wysota help ! :-)

  9. #9
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by mero View Post
    Categories are dynamic so creating class for earch category is impossible and idiotic.
    There should be way to add my own string parameters to each request.

    Wysota help ! :-)
    No class for every category. Create class that do request and read reaply and have variable category.

    And also try subclass QNetworkReply. I'm trying simple code for you, wait plz.
    Try read Qt documentation before ask stupid question.

  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkRequest atribute

    Quote Originally Posted by mero View Post
    Categories are dynamic so creating class for earch category is impossible and idiotic.
    There should be way to add my own string parameters to each request.
    You can simply subclass the object and provide get and set for a string parameter (or enum or integer, whichever). This would take less than 5 minutes to code and provide the functionality you request.

Similar Threads

  1. Replies: 1
    Last Post: 12th December 2010, 16:45
  2. Replies: 0
    Last Post: 3rd August 2010, 09:07
  3. QNetworkRequest file upload -- please help
    By Runtime Technologies in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2009, 15:55
  4. How to see the final request from QNetworkRequest
    By krippy2k in forum Qt Programming
    Replies: 13
    Last Post: 7th June 2009, 21:37
  5. Replies: 5
    Last Post: 20th January 2009, 14:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.