VirtualBox

Changeset 58252 in vbox for trunk/src


Ignore:
Timestamp:
Oct 14, 2015 3:51:54 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Networking cleanup/rework (part 11): Refactoring.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/net
Files:
6 edited

Legend:

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

    r58246 r58252  
    4848
    4949    /* Create network request set: */
    50     createNetworkRequest(requests, UINetworkRequestType_HEAD_Our, tr("Looking for %1...").arg(m_strDescription));
     50    createNetworkRequest(requests, UINetworkRequestType_HEAD, tr("Looking for %1...").arg(m_strDescription));
    5151}
    5252
     
    6161
    6262    /* Create network request: */
    63     createNetworkRequest(request, UINetworkRequestType_GET_Our, tr("Downloading %1...").arg(m_strDescription));
     63    createNetworkRequest(request, UINetworkRequestType_GET, tr("Downloading %1...").arg(m_strDescription));
    6464}
    6565
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h

    r58249 r58252  
    2222enum UINetworkRequestType
    2323{
    24     UINetworkRequestType_HEAD_Our,
    25     UINetworkRequestType_GET_Our
     24    UINetworkRequestType_HEAD,
     25    UINetworkRequestType_GET
    2626};
    2727
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r58249 r58252  
    406406    switch (m_type)
    407407    {
    408         case UINetworkRequestType_HEAD_Our:
     408        case UINetworkRequestType_HEAD:
    409409        {
    410410            /* Perform blocking HTTP HEAD request: */
     
    433433            break;
    434434        }
    435         case UINetworkRequestType_GET_Our:
     435        case UINetworkRequestType_GET:
    436436        {
    437437            /* Perform blocking HTTP GET request: */
     
    881881    void abort() { m_pThread->abort(); }
    882882
     883    /** Returns URL of the reply. */
     884    QUrl url() const { return m_pThread->url(); }
     885
    883886    /* API: Error-code getter: */
    884887    QNetworkReply::NetworkError error() const { return m_error; }
     
    909912    /** Returns value for the cached reply header of the passed @a type. */
    910913    QString header(QNetworkRequest::KnownHeaders type) const { return m_pThread->header(type); }
    911 
    912     /** Returns URL of the reply. */
    913     QUrl url() const { return m_pThread->url(); }
    914914
    915915    /** Returns value for the cached reply attribute of the passed @a code. */
     
    973973}
    974974
     975void UINetworkReply::abort()
     976{
     977    return m_pReply->abort();
     978}
     979
     980QUrl UINetworkReply::url() const
     981{
     982    return m_pReply->url();
     983}
     984
     985QNetworkReply::NetworkError UINetworkReply::error() const
     986{
     987    return m_pReply->error();
     988}
     989
     990QString UINetworkReply::errorString() const
     991{
     992    return m_pReply->errorString();
     993}
     994
     995QByteArray UINetworkReply::readAll() const
     996{
     997    return m_pReply->readAll();
     998}
     999
    9751000QVariant UINetworkReply::header(QNetworkRequest::KnownHeaders header) const
    9761001{
     
    9831008}
    9841009
    985 void UINetworkReply::abort()
    986 {
    987     return m_pReply->abort();
    988 }
    989 
    990 QNetworkReply::NetworkError UINetworkReply::error() const
    991 {
    992     return m_pReply->error();
    993 }
    994 
    995 QString UINetworkReply::errorString() const
    996 {
    997     return m_pReply->errorString();
    998 }
    999 
    1000 QByteArray UINetworkReply::readAll() const
    1001 {
    1002     return m_pReply->readAll();
    1003 }
    1004 
    1005 QUrl UINetworkReply::url() const
    1006 {
    1007     return m_pReply->url();
    1008 }
    1009 
    10101010#include "UINetworkReply.moc"
    10111011
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h

    r58249 r58252  
    4747
    4848    /* API: */
    49     QVariant header(QNetworkRequest::KnownHeaders header) const;
    50     QVariant attribute(QNetworkRequest::Attribute code) const;
    5149    void abort();
     50    QUrl url() const;
    5251    QNetworkReply::NetworkError error() const;
    5352    QString errorString() const;
    5453    QByteArray readAll() const;
    55     QUrl url() const;
     54    QVariant header(QNetworkRequest::KnownHeaders header) const;
     55    QVariant attribute(QNetworkRequest::Attribute code) const;
    5656
    5757private:
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp

    r55739 r58252  
    193193        request.setUrl(url);
    194194        request.setRawHeader("User-Agent", strUserAgent.toAscii());
    195         createNetworkRequest(request, UINetworkRequestType_GET_Our, tr("Checking for a new VirtualBox version..."));
     195        createNetworkRequest(request, UINetworkRequestType_GET, tr("Checking for a new VirtualBox version..."));
    196196    }
    197197
  • trunk/src/VBox/Frontends/VirtualBox/src/net/tstSSLCertDownloads.cpp

    r58244 r58252  
    4545{
    4646    QNetworkRequest Dummy;
    47     UINetworkReplyPrivateThread TestObj(Dummy, UINetworkRequestType_GET_Our);
     47    UINetworkReplyPrivateThread TestObj(Dummy, UINetworkRequestType_GET);
    4848
    4949    /*
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