Changeset 70785 in vbox
- Timestamp:
- Jan 29, 2018 10:42:01 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/net
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
r69550 r70785 90 90 /** Returns value for the cached reply header of the passed @a type. */ 91 91 QString header(UINetworkReply::KnownHeader type) const; 92 /** Returns value for the cached reply attribute of the passed @a code. */93 QVariant attribute(UINetworkReply::KnownAttribute code) const { /** @todo r=dsen: Fix that. */ Q_UNUSED(code); return QVariant(); }94 92 95 93 /** Returns short descriptive context of thread's current operation. */ … … 265 263 /** Returns value for the cached reply header of the passed @a type. */ 266 264 QString header(UINetworkReply::KnownHeader type) const { return m_pThread->header(type); } 267 /** Returns value for the cached reply attribute of the passed @a code. */268 QVariant attribute(UINetworkReply::KnownAttribute code) const { return m_pThread->attribute(code); }269 265 270 266 private slots: … … 1046 1042 } 1047 1043 1048 QVariant UINetworkReply::attribute(UINetworkReply::KnownAttribute code) const1049 {1050 return m_pReply->attribute(code);1051 }1052 1053 1044 #include "UINetworkReply.moc" 1054 1045 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h
r69500 r70785 77 77 }; 78 78 79 /** Known attribute types.80 * Came from QtNetwork module.81 * More to go on demand when necessary. */82 enum KnownAttribute83 {84 RedirectionTargetAttribute,85 };86 87 79 /** Constructs network-reply of the passed @a type for the passed @a url and @a requestHeaders. */ 88 80 UINetworkReply(UINetworkRequestType type, const QUrl &url, const UserDictionary &requestHeaders); … … 105 97 /** Returns value for the cached reply header of the passed @a type. */ 106 98 QVariant header(UINetworkReply::KnownHeader header) const; 107 /** Returns value for the cached reply attribute of the passed @a code. */108 QVariant attribute(UINetworkReply::KnownAttribute code) const;109 99 110 100 private: -
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp
r69551 r70785 87 87 else if (m_pReply->error() == UINetworkReply::NoError) 88 88 { 89 /* Check if redirection required: */ 90 QUrl redirect = m_pReply->attribute(UINetworkReply::RedirectionTargetAttribute).toUrl(); 91 if (redirect.isValid()) 92 { 93 /* Cleanup current network-reply first: */ 94 cleanupNetworkReply(); 95 96 /* Choose redirect-source as current url: */ 97 m_url = redirect; 98 99 /* Create new network-reply finally: */ 100 prepareNetworkReply(); 101 } 102 else 103 { 104 /* Notify own network-request listeners: */ 105 emit sigFinished(); 106 /* Notify common network-request listeners: */ 107 emit sigFinished(m_uuid); 108 } 109 } 110 /* If some error occured: */ 89 /* Notify own network-request listeners: */ 90 emit sigFinished(); 91 /* Notify common network-request listeners: */ 92 emit sigFinished(m_uuid); 93 } 94 /* If some other error occured: */ 111 95 else 112 96 {
Note:
See TracChangeset
for help on using the changeset viewer.