title: QNetworkReply error signal not detected when connection is lost
body: <p>I'm downloading files from a remote server with Qt5.5 and everything works fine but I can't detect when a QNetworkReply returns an error.
  In fact, I am trying to check the case if the user is downloading a file and suddenly, he loses his Internet connection (because why not :-) ). To do that, I start a download and unplug my Ethernet cable a few seconds after. </p>
  
  <p>Is the signal <code>QNetworkReply::error(QNetworkReply::NetworkError)</code> emitted in this case? If yes, why am I not entering my slot in my code below?</p>
  
  <pre><code>void MyClass::download(QUrl url)
  {
      QNetworkRequest request = QNetworkRequest(url);
  
      QNetworkReply *reply = pManager.get(request);
  
      // finished() is called after error(), but try both
      connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(requestError(QNetworkReply::NetworkError)));
      connect(reply, SIGNAL(finished()), this, SLOT(requestFinished()));
  }
  
  void MyClass::requestError(QNetworkReply::NetworkError err)
  {
      qDebug() &lt;&lt; "error";
  }
  
  void MyClass::requestFinished()
  {
      qDebug() &lt;&lt; "finished";
  }
  </code></pre>
  
  <p>I also connected the access manager like this :</p>
  
  <pre><code>connect(&amp;pManager, SIGNAL(finished(QNetworkReply*)), SLOT(requestFinished(QNetworkReply*)));
  </code></pre>
  
  <p>When the Internet connection is not interrupted, I am going in the slot requestFinished(), but if there's not Internet anymore, I am not entering any slot. </p>
  
  <p>Am I doing something wrong?</p>