Changeset 90253 in vbox
- Timestamp:
- Jul 20, 2021 9:56:47 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145792
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressObject.cpp
r86772 r90253 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 … … 28 28 : QObject(pParent) 29 29 , m_comProgress(comProgress) 30 , m_fCancelable(false) 30 31 , m_pEventHandler(0) 31 32 { … … 97 98 void UIProgressObject::sltHandleProgressPercentageChange(const QUuid &, const int iPercent) 98 99 { 100 /* Update cancelable value: */ 101 m_fCancelable = m_comProgress.GetCancelable(); 102 103 /* Notify listeners: */ 99 104 emit sigProgressChange(m_comProgress.GetOperationCount(), 100 105 m_comProgress.GetOperationDescription(), … … 121 126 void UIProgressObject::prepare() 122 127 { 128 /* Init cancelable value: */ 129 m_fCancelable = m_comProgress.GetCancelable(); 130 123 131 /* Create CProgress event handler: */ 124 132 m_pEventHandler = new UIProgressEventHandler(this, m_comProgress); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressObject.h
r86772 r90253 5 5 6 6 /* 7 * Copyright (C) 2009-202 0Oracle Corporation7 * Copyright (C) 2009-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 71 71 virtual ~UIProgressObject() /* override */; 72 72 73 /** Returns whether progress is cancelable. */ 74 bool isCancelable() const { return m_fCancelable; } 75 73 76 /** Executes the progress within local event-loop. */ 74 77 void exec(); … … 93 96 CProgress &m_comProgress; 94 97 98 /** Holds whether progress is cancelable. */ 99 bool m_fCancelable; 100 95 101 /** Holds the progress event handler instance. */ 96 102 UIProgressEventHandler *m_pEventHandler; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressTask.cpp
r86793 r90253 5 5 6 6 /* 7 * Copyright (C) 2020 Oracle Corporation7 * Copyright (C) 2020-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 44 44 { 45 45 return m_pProgressObject; 46 } 47 48 bool UIProgressTask::isCancelable() const 49 { 50 return m_pProgressObject ? m_pProgressObject->isCancelable() : false; 46 51 } 47 52 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressTask.h
r86773 r90253 5 5 6 6 /* 7 * Copyright (C) 2020 Oracle Corporation7 * Copyright (C) 2020-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 62 62 bool isRunning() const; 63 63 64 /** Returns whether task is cancelable. */ 65 bool isCancelable() const; 66 64 67 public slots: 65 68
Note:
See TracChangeset
for help on using the changeset viewer.