Changeset 28589 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 22, 2010 12:40:25 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60431
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIHttp.h
r25177 r28589 6 6 7 7 /* 8 * Copyright (C) 2006-20 07Sun Microsystems, Inc.8 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 119 119 } 120 120 121 /* This method is doing effictevely the same as abort() 122 * but in its turn trying to do all after other things been done. */ 123 void abortAll() 124 { 125 QTimer::singleShot(0, this, SLOT(abort())); 126 } 127 121 128 signals: 122 129 … … 125 132 private slots: 126 133 134 /* We should hide this method from direct call as its very 135 * dangerous to call it while other requests are being processed. 136 * Use abortAll() to get the same result. */ 137 void abort() 138 { 139 QHttp::abort(); 140 } 141 127 142 void timeouted() 128 143 { 129 144 mErrorCode = TimeoutError; 130 abort ();145 abortAll(); 131 146 } 132 147 … … 138 153 case 301: 139 154 mErrorCode = MovedPermanentlyError; 140 return abort ();155 return abortAll(); 141 156 case 302: 142 157 mErrorCode = MovedTemporarilyError; 143 return abort ();158 return abortAll(); 144 159 case 404: 145 160 mErrorCode = PageNotFoundError; 146 return abort ();161 return abortAll(); 147 162 default: 148 163 mErrorCode = (AdvancedError) QHttp::error(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIDownloader.cpp
r27691 r28589 167 167 { 168 168 /* Abort connection as we already got all we need */ 169 m_pHttp->abort ();169 m_pHttp->abortAll(); 170 170 } 171 171 … … 173 173 * to download file of proposed size if no error present or 174 174 * abort download progress if error is present */ 175 void UIDownloader::acknowledgeFinished(bool fError) 176 { 177 NOREF(fError); 178 179 AssertMsg(fError, ("Error must be 'true' due to aborting.\n")); 180 175 void UIDownloader::acknowledgeFinished(bool /* fError */) 176 { 181 177 m_pHttp->disconnect(this); 182 178 183 179 switch (m_pHttp->errorCode()) 184 180 { 185 case QIHttp::Aborted: 181 case QIHttp::NoError: /* full packet comes before aborting */ 182 case QIHttp::Aborted: /* part of packet comes before aborting */ 186 183 { 187 184 /* Ask the user if he wish to download it */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIDownloaderUserManual.cpp
r27756 r28589 112 112 /* If current source was wrong but other is present 113 113 * we will try other source else we should finish: */ 114 if ( fError && !m_sourcesList.isEmpty())114 if (m_pHttp->errorCode() != QIHttp::Aborted && m_pHttp->errorCode() != QIHttp::NoError && !m_sourcesList.isEmpty()) 115 115 startDownload(); 116 116 else
Note:
See TracChangeset
for help on using the changeset viewer.