VirtualBox

Changeset 57447 in vbox


Ignore:
Timestamp:
Aug 18, 2015 7:01:35 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: 7980: Handling few more RTHttp error-codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r57359 r57447  
    643643        switch (m_error)
    644644        {
    645             case QNetworkReply::NoError:
    646                 break;
    647             case QNetworkReply::HostNotFoundError:
    648                 return tr("Host not found");
    649             case QNetworkReply::ContentAccessDenied:
    650                 return tr("Content access denied");
    651             case QNetworkReply::ProtocolFailure:
    652                 return tr("Protocol failure");
    653             case QNetworkReply::AuthenticationRequiredError:
    654                 return tr("Wrong SSL certificate format");
    655             case QNetworkReply::SslHandshakeFailedError:
    656                 return tr("SSL authentication failed");
    657             default:
    658                 return tr("Unknown reason");
    659                 break;
     645            case QNetworkReply::NoError:                     break;
     646            case QNetworkReply::RemoteHostClosedError:       return tr("Unable to initialize HTTP library");
     647            case QNetworkReply::HostNotFoundError:           return tr("Host not found");
     648            case QNetworkReply::ContentAccessDenied:         return tr("Content access denied");
     649            case QNetworkReply::ProtocolFailure:             return tr("Protocol failure");
     650            case QNetworkReply::ConnectionRefusedError:      return tr("Connection refused");
     651            case QNetworkReply::SslHandshakeFailedError:     return tr("SSL authentication failed");
     652            case QNetworkReply::AuthenticationRequiredError: return tr("Wrong SSL certificate format");
     653            case QNetworkReply::ContentReSendError:          return tr("Content moved");
     654            default:                                         return tr("Unknown reason");
    660655        }
    661656        return QString();
     
    672667        switch (m_pThread->error())
    673668        {
    674             case VINF_SUCCESS:
    675                 m_error = QNetworkReply::NoError;
    676                 break;
    677             case VERR_HTTP_ABORTED:
    678                 m_error = QNetworkReply::OperationCanceledError;
    679                 break;
    680             case VERR_HTTP_NOT_FOUND:
    681                 m_error = QNetworkReply::HostNotFoundError;
    682                 break;
    683             case VERR_HTTP_ACCESS_DENIED:
    684                 m_error = QNetworkReply::ContentAccessDenied;
    685                 break;
    686             case VERR_HTTP_BAD_REQUEST:
    687                 m_error = QNetworkReply::ProtocolFailure;
    688                 break;
    689             case VERR_HTTP_CACERT_WRONG_FORMAT:
    690                 m_error = QNetworkReply::AuthenticationRequiredError;
    691                 break;
    692             case VERR_HTTP_CACERT_CANNOT_AUTHENTICATE:
    693                 m_error = QNetworkReply::SslHandshakeFailedError;
    694                 break;
    695             default:
    696                 m_error = QNetworkReply::UnknownNetworkError;
    697                 break;
     669            case VINF_SUCCESS:                         m_error = QNetworkReply::NoError; break;
     670            case VERR_HTTP_INIT_FAILED:                m_error = QNetworkReply::RemoteHostClosedError; break;
     671            case VERR_HTTP_NOT_FOUND:                  m_error = QNetworkReply::HostNotFoundError; break;
     672            case VERR_HTTP_ACCESS_DENIED:              m_error = QNetworkReply::ContentAccessDenied; break;
     673            case VERR_HTTP_BAD_REQUEST:                m_error = QNetworkReply::ProtocolFailure; break;
     674            case VERR_HTTP_COULDNT_CONNECT:            m_error = QNetworkReply::ConnectionRefusedError; break;
     675            case VERR_HTTP_SSL_CONNECT_ERROR:          m_error = QNetworkReply::SslHandshakeFailedError; break;
     676            case VERR_HTTP_CACERT_WRONG_FORMAT:        m_error = QNetworkReply::AuthenticationRequiredError; break;
     677            case VERR_HTTP_CACERT_CANNOT_AUTHENTICATE: m_error = QNetworkReply::AuthenticationRequiredError; break;
     678            case VERR_HTTP_ABORTED:                    m_error = QNetworkReply::OperationCanceledError; break;
     679            case VERR_HTTP_REDIRECTED:                 m_error = QNetworkReply::ContentReSendError; break;
     680            default:                                   m_error = QNetworkReply::UnknownNetworkError; break;
    698681        }
    699682        emit finished();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette