VirtualBox

Changeset 91501 in vbox for trunk


Ignore:
Timestamp:
Sep 30, 2021 7:17:39 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Notification-center: Crash fix; Progress object can be instantly killed on append due to latest changes in progress-handling policy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp

    r91236 r91501  
    175175QUuid UINotificationCenter::append(UINotificationObject *pObject)
    176176{
     177    /* Sanity check: */
    177178    AssertPtrReturn(m_pModel, QUuid());
     179    AssertPtrReturn(pObject, QUuid());
     180
     181    /* Is object critical? */
     182    const bool fCritical = pObject->isCritical();
     183    /* Is object progress? */
     184    const bool fProgress = pObject->inherits("UINotificationProgress");
     185
     186    /* Handle object. Be aware it can be deleted during handling! */
    178187    const QUuid uId = m_pModel->appendObject(pObject);
    179188
    180189    /* If object is critical and center isn't opened yet: */
    181     if (!m_pOpenButton->isChecked() && pObject->isCritical())
     190    if (!m_pOpenButton->isChecked() && fCritical)
    182191    {
    183192        /* We should delay progresses for a bit: */
    184         const int iDelay = pObject->inherits("UINotificationProgress") ? 2000 : 0;
     193        const int iDelay = fProgress ? 2000 : 0;
    185194        /* We should issue an open request: */
    186195        AssertPtrReturn(m_pTimerOpen, uId);
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