Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Do I need to abort/close pending QNetworkReply?
Forum Updated to NodeBB v4.3 + New Features

Do I need to abort/close pending QNetworkReply?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.8k 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.
  • P Offline
    P Offline
    philk
    wrote on last edited by
    #1

    In my class I start a HTTP request and wonder if I need to abort/close the QNReply instance that has still not reported an error or data available?

    @
    class MyClass {
    void request() {
    auto reply = QNAM->request();
    }
    }
    @

    Would I have to store the reply in a member var and call its close/abort method in MyClass() dtor?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Santosh Reddy
      wrote on last edited by
      #2

      Yes, if you want to explicitly close/abort.

      SS

      1 Reply Last reply
      0
      • P Offline
        P Offline
        philk
        wrote on last edited by
        #3

        And what happens to the slots connected to the signal if MyClass gets destructed? They are automatically disconnected, correct?

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          [quote author="philk" date="1376647503"]And what happens to the slots connected to the signal if MyClass gets destructed? They are automatically disconnected, correct?[/quote]http://qt-project.org/doc/qt-5.1/qtcore/qobject.html#dtor.QObject

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          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