VirtualBox

Changeset 86793 in vbox


Ignore:
Timestamp:
Nov 3, 2020 11:25:58 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: UIProgressTask: A bit of cleanup for r141169; Handling possibility when CProgress is NULL initially.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressTask.cpp

    r86773 r86793  
    6262    m_comProgress = createProgress();
    6363
    64     /* Prepare progress-object: */
    65     m_pProgressObject = new UIProgressObject(m_comProgress, this);
    66     if (m_pProgressObject)
     64    /* Make sure progress valid: */
     65    if (m_comProgress.isNull())
    6766    {
    68         /* Setup connections: */
    69         connect(m_pProgressObject.data(), &UIProgressObject::sigProgressEventHandlingFinished,
    70                 this, &UIProgressTask::sltHandleProgressEventHandlingFinished);
    71 
    7267        /* Notify external listeners: */
    7368        emit sigProgressStarted();
     69        emit sigProgressFinished();
     70    }
     71    else
     72    {
     73        /* Prepare progress-object: */
     74        m_pProgressObject = new UIProgressObject(m_comProgress, this);
     75        if (m_pProgressObject)
     76        {
     77            /* Setup connections: */
     78            connect(m_pProgressObject.data(), &UIProgressObject::sigProgressEventHandlingFinished,
     79                    this, &UIProgressTask::sltHandleProgressEventHandlingFinished);
     80
     81            /* Notify external listeners: */
     82            emit sigProgressStarted();
     83        }
    7484    }
    7585}
Note: See TracChangeset for help on using the changeset viewer.

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