VirtualBox

Changeset 44124 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 13, 2012 5:11:48 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82704
Message:

Eliminate last use of the CombinedProgess class - bugtracker id 6167

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r44091 r44124  
    6464# include "UsbCardReader.h"
    6565#endif
    66 #include "ProgressCombinedImpl.h"
     66#include "ProgressImpl.h"
    6767#include "ConsoleVRDPServer.h"
    6868#include "VMMDev.h"
     
    66976697            else
    66986698            {
    6699                 /* create a combined progress object */
    6700                 ComObjPtr<CombinedProgress> pProgress;
     6699                // Create a simple progress object
     6700                ComObjPtr<Progress> pProgress;
    67016701                pProgress.createObject();
     6702
     6703                // Assign hard disk progresses to the progresses list
    67026704                VMPowerUpTask::ProgressList progresses(task->hardDiskProgresses);
    6703                 progresses.push_back(ComPtr<IProgress> (pPowerupProgress));
     6705
     6706                // Setup params to be used to initialize Progress object properties.
     6707                ULONG cOperations = 1;
     6708                ULONG ulTotalOperationsWeight = 1;
     6709
     6710                // Go round them and set number of operations and weight.
     6711                for (VMPowerUpTask::ProgressList::const_iterator it = progresses.begin(); it !=  progresses.end(); ++it)
     6712                {
     6713                    ++cOperations;
     6714                    ulTotalOperationsWeight += 1;
     6715                }
     6716
    67046717                rc = pProgress->init(static_cast<IConsole *>(this),
    6705                                      progressDesc.raw(), progresses.begin(),
    6706                                      progresses.end());
     6718                                     progressDesc.raw(),
     6719                                     TRUE, // Cancelable
     6720                                     cOperations,
     6721                                     ulTotalOperationsWeight,
     6722                                     Bstr(tr("Starting Hard Disk operations")).raw(), // first sub-op decription
     6723                                     1 );
    67076724                AssertComRCReturnRC(rc);
    6708                 pProgress.queryInterfaceTo(aProgress);
     6725
     6726                // Perform all the necessary operations.
     6727                for (VMPowerUpTask::ProgressList::const_iterator it = progresses.begin(); it !=  progresses.end(); ++it)
     6728                {
     6729                    rc = pProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1);
     6730                    AssertComRCReturnRC(rc);
     6731                    rc = pProgress.queryInterfaceTo(aProgress);
     6732                    AssertComRCReturnRC(rc);
     6733                }
     6734
     6735                // Now do the power up.
     6736                rc = pPowerupProgress.queryInterfaceTo(aProgress);
     6737                AssertComRCReturnRC(rc);
    67096738            }
    67106739        }
  • trunk/src/VBox/Main/src-client/xpcom/module.cpp

    r42865 r44124  
    4949#include "NATEngineImpl.h"
    5050#include "NetworkAdapterImpl.h"
    51 #include "ProgressCombinedImpl.h"
    5251#include "ProgressImpl.h"
    5352#include "RemoteUSBDeviceImpl.h"
     
    8584NS_DECL_CLASSINFO(Progress)
    8685NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Progress, IProgress)
    87 NS_DECL_CLASSINFO(CombinedProgress)
    88 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CombinedProgress, IProgress)
    8986NS_DECL_CLASSINFO(OUSBDevice)
    9087NS_IMPL_THREADSAFE_ISUPPORTS1_CI(OUSBDevice, IUSBDevice)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette