VirtualBox

Changeset 60631 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 21, 2016 3:43:38 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​​​​​​​bugref:7958: Make sure to cleanup available-screen-area calculation workers properly before re-creating them.

File:
1 edited

Legend:

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

    r60362 r60631  
    131131    m_cHostScreenCount = cHostScreenCount != -1 ? cHostScreenCount : m_pDesktopWidget->screenCount();
    132132
    133     /* Resize vectors to new host-screen count: */
     133    /* Cleanup existing workers first: */
     134    foreach (QWidget *pWorker, m_availableGeometryWorkers)
     135        pWorker->disconnect();
    134136    qDeleteAll(m_availableGeometryWorkers);
    135137    m_availableGeometryWorkers.clear();
     138    m_availableGeometryData.clear();
     139
     140    /* Resize workers vectors to new host-screen count: */
    136141    m_availableGeometryWorkers.resize(m_cHostScreenCount);
    137     m_availableGeometryData.clear();
    138142    m_availableGeometryData.resize(m_cHostScreenCount);
    139143
     
    203207    disconnect(m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltRecalculateHostScreenAvailableGeometry(int)));
    204208
    205     /* Cleanup existing workers: */
     209    /* Cleanup existing workers finally: */
     210    foreach (QWidget *pWorker, m_availableGeometryWorkers)
     211        pWorker->disconnect();
    206212    qDeleteAll(m_availableGeometryWorkers);
    207213    m_availableGeometryWorkers.clear();
     214    m_availableGeometryData.clear();
    208215}
    209216
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