src/network/access/qnetworkaccessdebugpipebackend.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   250     default:
   250     default:
   251         code = QNetworkReply::ProtocolFailure;
   251         code = QNetworkReply::ProtocolFailure;
   252         break;
   252         break;
   253     }
   253     }
   254 
   254 
   255     error(code, QObject::tr("Socket error on %1: %2")
   255     error(code, QNetworkAccessDebugPipeBackend::tr("Socket error on %1: %2")
   256           .arg(url().toString(), socket.errorString()));
   256           .arg(url().toString(), socket.errorString()));
   257     finished();
   257     finished();
   258     disconnect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
   258     disconnect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
   259 
   259 
   260 }
   260 }
   265 
   265 
   266     if (socket.bytesToWrite() == 0) {
   266     if (socket.bytesToWrite() == 0) {
   267         // normal close
   267         // normal close
   268     } else {
   268     } else {
   269         // abnormal close
   269         // abnormal close
   270         QString msg = QObject::tr("Remote host closed the connection prematurely on %1")
   270         QString msg = QNetworkAccessDebugPipeBackend::tr("Remote host closed the connection prematurely on %1")
   271                              .arg(url().toString());
   271                              .arg(url().toString());
   272         error(QNetworkReply::RemoteHostClosedError, msg);
   272         error(QNetworkReply::RemoteHostClosedError, msg);
   273         finished();
   273         finished();
   274     }
   274     }
   275 }
   275 }