- Timestamp:
- Aug 6, 2021 9:10:55 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/networking
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloader.cpp
r82968 r90540 5 5 6 6 /* 7 * Copyright (C) 2006-202 0Oracle Corporation7 * Copyright (C) 2006-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 83 83 } 84 84 85 void UIDownloader::processNetworkReplyFailed(const QString &) 86 { 87 /* Delete downloader: */ 88 deleteLater(); 89 } 90 85 91 void UIDownloader::processNetworkReplyCanceled(UINetworkReply *) 86 92 { … … 158 164 deleteLater(); 159 165 } 160 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloader.h
r86996 r90540 5 5 6 6 /* 7 * Copyright (C) 2006-202 0Oracle Corporation7 * Copyright (C) 2006-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 109 109 /** Handles network-reply progress for @a iReceived bytes of @a iTotal. */ 110 110 void processNetworkReplyProgress(qint64 iReceived, qint64 iTotal); 111 /** Handles network-reply failed with specified @a strError. */ 112 void processNetworkReplyFailed(const QString &strError); 111 113 /** Handles network-reply cancel request for @a pReply. */ 112 114 void processNetworkReplyCanceled(UINetworkReply *pReply); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkCustomer.h
r90524 r90540 49 49 /** Handles network reply progress for @a iReceived amount of bytes among @a iTotal. */ 50 50 virtual void processNetworkReplyProgress(qint64 iReceived, qint64 iTotal) = 0; 51 /** Handles network reply failed with specified @a strError. */ 52 virtual void processNetworkReplyFailed(const QString &strError) = 0; 51 53 /** Handles network reply canceling for a passed @a pReply. */ 52 54 virtual void processNetworkReplyCanceled(UINetworkReply *pReply) = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkRequest.cpp
r90539 r90540 131 131 } 132 132 133 void UINetworkRequest::sltRetry()134 {135 /* Cleanup current network-reply first: */136 cleanupNetworkReply();137 138 /* Choose first url as current: */139 m_iUrlIndex = 0;140 m_url = m_urls.at(m_iUrlIndex);141 142 /* Create new network-reply finally: */143 prepareNetworkReply();144 }145 146 133 void UINetworkRequest::sltCancel() 147 134 { -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkRequest.h
r90539 r90540 38 38 signals: 39 39 40 /** Notifies listener about progress started. */ 41 void sigStarted(); 40 42 /** Notifies listener about progress changed. 41 43 * @param iReceived Brings the amount of bytes received. 42 44 * @param iTotal Brings the amount of total bytes to receive. */ 43 45 void sigProgress(qint64 iReceived, qint64 iTotal); 44 /** Notifies listener about progress started. */ 45 void sigStarted(); 46 /** Notifies listener about progress failed. 47 * @param strError Brings the error progress failed with. */ 48 void sigFailed(const QString &strError); 46 49 /** Notifies listener about progress canceled. */ 47 50 void sigCanceled(); 48 51 /** Notifies listener about progress finished. */ 49 52 void sigFinished(); 50 /** Notifies listener about progress failed.51 * @param strError Brings the error progress failed with . */52 void sigFailed(const QString &strError);53 53 54 54 public: … … 71 71 public slots: 72 72 73 /** Initiates request retrying. */74 void sltRetry();75 73 /** Initiates request cancelling. */ 76 74 void sltCancel(); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkRequestManager.cpp
r90539 r90540 114 114 } 115 115 116 void UINetworkRequestManager::sltHandleNetworkRequestFailure(const QString &strError) 117 { 118 /* Make sure we have this request registered: */ 119 UINetworkRequest *pNetworkRequest = qobject_cast<UINetworkRequest*>(sender()); 120 AssertPtrReturnVoid(pNetworkRequest); 121 const QUuid uId = m_requests.key(pNetworkRequest); 122 AssertReturnVoid(!uId.isNull()); 123 124 /* Delegate request to customer: */ 125 UINetworkCustomer *pNetworkCustomer = m_customers.value(uId); 126 AssertPtrReturnVoid(pNetworkCustomer); 127 pNetworkCustomer->processNetworkReplyFailed(strError); 128 129 /* Cleanup request: */ 130 cleanupNetworkRequest(uId); 131 } 132 116 133 void UINetworkRequestManager::sltHandleNetworkRequestCancel() 117 134 { … … 148 165 } 149 166 150 void UINetworkRequestManager::sltHandleNetworkRequestFailure(const QString &)151 {152 /* Make sure we have this request registered: */153 UINetworkRequest *pNetworkRequest = qobject_cast<UINetworkRequest*>(sender());154 AssertPtrReturnVoid(pNetworkRequest);155 const QUuid uId = m_requests.key(pNetworkRequest);156 AssertReturnVoid(!uId.isNull());157 158 /* Delegate request to customer: */159 UINetworkCustomer *pNetworkCustomer = m_customers.value(uId);160 AssertPtrReturnVoid(pNetworkCustomer);161 if (pNetworkCustomer->isItForceCall())162 {163 /// @todo show notification-center164 }165 }166 167 167 void UINetworkRequestManager::prepare() 168 168 { -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkRequestManager.h
r90539 r90540 73 73 /** Handles progress for @a iReceived amount of bytes among @a iTotal. */ 74 74 void sltHandleNetworkRequestProgress(qint64 iReceived, qint64 iTotal); 75 /** Handles request @a strError. */ 76 void sltHandleNetworkRequestFailure(const QString &strError); 75 77 /** Handles request canceling. */ 76 78 void sltHandleNetworkRequestCancel(); 77 79 /** Handles request finishing. */ 78 80 void sltHandleNetworkRequestFinish(); 79 /** Handles request @a strError. */80 void sltHandleNetworkRequestFailure(const QString &strError);81 81 82 82 private: -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp
r90539 r90540 115 115 /** Handles network reply progress for @a iReceived amount of bytes among @a iTotal. */ 116 116 virtual void processNetworkReplyProgress(qint64 iReceived, qint64 iTotal) /* override */; 117 /** Handles network reply finishing with specified @a strError. */ 118 virtual void processNetworkReplyFailed(const QString &strError) /* override */; 117 119 /** Handles network reply canceling for a passed @a pReply. */ 118 120 virtual void processNetworkReplyCanceled(UINetworkReply *pReply) /* override */; … … 142 144 protected: 143 145 146 /** Handles network reply finishing with specified @a strError. */ 147 virtual void processNetworkReplyFailed(const QString &strError) /* override */; 144 148 /** Handles network reply canceling for a passed @a pReply. */ 145 149 virtual void processNetworkReplyCanceled(UINetworkReply *pReply) /* override */; … … 228 232 } 229 233 234 void UIUpdateStep::processNetworkReplyFailed(const QString &) 235 { 236 } 237 230 238 void UIUpdateStep::processNetworkReplyCanceled(UINetworkReply *) 231 239 { … … 240 248 * Class UIUpdateStepVirtualBox implementation. * 241 249 *********************************************************************************************************************************/ 250 251 void UIUpdateStepVirtualBox::processNetworkReplyFailed(const QString &strError) 252 { 253 Q_UNUSED(strError); 254 255 /* Notify about step completion: */ 256 emit sigStepComplete(); 257 } 242 258 243 259 void UIUpdateStepVirtualBox::processNetworkReplyCanceled(UINetworkReply *pReply)
Note:
See TracChangeset
for help on using the changeset viewer.