VirtualBox

Ignore:
Timestamp:
Oct 14, 2015 1:57:23 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Networking cleanup/rework (part 5): Extend our own network reply object with url information.

File:
1 edited

Legend:

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

    r58242 r58243  
    9191        return QString();
    9292    }
     93    /** Returns URL of the reply which is the URL of the request for now. */
     94    QUrl url() const { return m_request.url(); }
    9395    /** @} */
    9496
     
    267269{
    268270    /* Check if we really need SSL: */
    269     if (!m_request.url().toString().startsWith("https:", Qt::CaseInsensitive))
     271    if (!url().toString().startsWith("https:", Qt::CaseInsensitive))
    270272        return VINF_SUCCESS;
    271273
     
    863865    QString header(QNetworkRequest::KnownHeaders type) const { return m_pThread->header(type); }
    864866
     867    /** Returns URL of the reply. */
     868    QUrl url() const { return m_pThread->url(); }
     869
    865870private slots:
    866871
     
    10161021    {
    10171022        case UINetworkReplyType_Qt: result = qobject_cast<QNetworkReply*>(m_pReply)->url(); break;
    1018         case UINetworkReplyType_Our: /* TODO: url() */ break;
     1023        case UINetworkReplyType_Our: result = qobject_cast<UINetworkReplyPrivate*>(m_pReply)->url(); break;
    10191024    }
    10201025    return result;
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