- Timestamp:
- Nov 9, 2021 1:58:00 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148139
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObject.cpp
r92284 r92293 67 67 } 68 68 69 bool UINotificationSimple::isDone() const 70 { 71 return true; 72 } 73 69 74 QString UINotificationSimple::name() const 70 75 { … … 111 116 UINotificationProgress::UINotificationProgress() 112 117 : m_pTask(0) 113 , m_fFinished(false)114 118 , m_uPercent(0) 119 , m_fDone(false) 115 120 { 116 121 } … … 122 127 } 123 128 124 bool UINotificationProgress::isFinished() const125 {126 return m_fFinished;127 }128 129 129 ulong UINotificationProgress::percent() const 130 130 { … … 145 145 { 146 146 return true; 147 } 148 149 bool UINotificationProgress::isDone() const 150 { 151 return m_fDone; 147 152 } 148 153 … … 192 197 void UINotificationProgress::sltHandleProgressFinished() 193 198 { 194 m_fFinished = true;195 199 m_uPercent = 100; 200 m_fDone = true; 196 201 emit sigProgressFinished(); 197 202 … … 212 217 UINotificationDownloader::UINotificationDownloader() 213 218 : m_pDownloader(0) 219 , m_uPercent(0) 220 , m_fDone(false) 214 221 { 215 222 } … … 234 241 { 235 242 return true; 243 } 244 245 bool UINotificationDownloader::isDone() const 246 { 247 return m_fDone; 236 248 } 237 249 … … 292 304 m_pDownloader = 0; 293 305 m_strError = strError; 306 m_fDone = true; 294 307 emit sigProgressFailed(); 295 308 } … … 299 312 delete m_pDownloader; 300 313 m_pDownloader = 0; 314 m_fDone = true; 301 315 emit sigProgressCanceled(); 302 316 } … … 306 320 delete m_pDownloader; 307 321 m_pDownloader = 0; 322 m_fDone = true; 308 323 emit sigProgressFinished(); 309 324 } … … 326 341 } 327 342 343 QString UINotificationNewVersionChecker::error() const 344 { 345 return m_strError; 346 } 347 348 bool UINotificationNewVersionChecker::isCritical() const 349 { 350 return m_pChecker ? m_pChecker->isItForcedCall() : true; 351 } 352 328 353 bool UINotificationNewVersionChecker::isDone() const 329 354 { 330 355 return m_fDone; 331 }332 333 QString UINotificationNewVersionChecker::error() const334 {335 return m_strError;336 }337 338 bool UINotificationNewVersionChecker::isCritical() const339 {340 return m_pChecker ? m_pChecker->isItForcedCall() : true;341 356 } 342 357 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObject.h
r91843 r92293 56 56 /** Returns whether object is critical. */ 57 57 virtual bool isCritical() const = 0; 58 /** Returns whether object is done. */ 59 virtual bool isDone() const = 0; 58 60 /** Returns object name. */ 59 61 virtual QString name() const = 0; … … 96 98 /** Returns whether object is critical. */ 97 99 virtual bool isCritical() const /* override */; 100 /** Returns whether object is done. */ 101 virtual bool isDone() const /* override */; 98 102 /** Returns object name. */ 99 103 virtual QString name() const /* override final */; … … 149 153 virtual CProgress createProgress(COMResult &comResult) = 0; 150 154 151 /** Returns whether progress is finished. */152 bool isFinished() const;153 155 /** Returns current progress percentage value. */ 154 156 ulong percent() const; … … 160 162 /** Returns whether object is critical. */ 161 163 virtual bool isCritical() const /* override */; 164 /** Returns whether object is done. */ 165 virtual bool isDone() const /* override */; 162 166 /** Returns object internal name. */ 163 167 virtual QString internalName() const /* override final */; … … 185 189 UINotificationProgressTask *m_pTask; 186 190 187 /** Holds whether progress is finished. */188 bool m_fFinished;189 191 /** Holds the last cached progress percentage value. */ 190 192 ulong m_uPercent; 193 /** Holds whether current progress is done. */ 194 bool m_fDone; 191 195 }; 192 196 … … 228 232 /** Returns whether object is critical. */ 229 233 virtual bool isCritical() const /* override */; 234 /** Returns whether object is done. */ 235 virtual bool isDone() const /* override */; 230 236 /** Returns object internal name. */ 231 237 virtual QString internalName() const /* override final */; … … 262 268 /** Holds the error message is any. */ 263 269 QString m_strError; 270 /** Holds whether current progress is done. */ 271 bool m_fDone; 264 272 }; 265 273 … … 288 296 virtual UINewVersionChecker *createChecker() = 0; 289 297 290 /** Returns whether current progress is done. */291 bool isDone() const;292 298 /** Returns error-message if any. */ 293 299 QString error() const; … … 295 301 /** Returns whether object is critical. */ 296 302 virtual bool isCritical() const /* override */; 303 /** Returns whether object is done. */ 304 virtual bool isDone() const /* override */; 297 305 /** Returns object internal name. */ 298 306 virtual QString internalName() const /* override final */; … … 322 330 UINewVersionChecker *m_pChecker; 323 331 332 /** Holds the error message is any. */ 333 QString m_strError; 324 334 /** Holds whether current progress is done. */ 325 335 bool m_fDone; 326 /** Holds the error message is any. */327 QString m_strError;328 336 }; 329 337 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
Note:
See TracChangeset
for help on using the changeset viewer.