VirtualBox

Ignore:
Timestamp:
Oct 16, 2012 9:17:26 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Reparenting shared-clipboard and drag-n-drop menu actions to make sure they are cleaned up during visual-mode change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r43622 r43650  
    16041604        {
    16051605            KClipboardMode mode = (KClipboardMode)i;
    1606             QAction *pAction = pMenu->addAction(gpConverter->toString(mode));
     1606            QAction *pAction = new QAction(gpConverter->toString(mode), m_pSharedClipboardActions);
     1607            pMenu->addAction(pAction);
    16071608            pAction->setData(QVariant::fromValue(mode));
    16081609            pAction->setCheckable(true);
    16091610            pAction->setChecked(session().GetMachine().GetClipboardMode() == mode);
    1610             m_pSharedClipboardActions->addAction(pAction);
    16111611        }
    16121612        connect(m_pSharedClipboardActions, SIGNAL(triggered(QAction*)),
     
    16421642        {
    16431643            KDragAndDropMode mode = (KDragAndDropMode)i;
    1644             QAction *pAction = pMenu->addAction(gpConverter->toString(mode));
     1644            QAction *pAction = new QAction(gpConverter->toString(mode), m_pDragAndDropActions);
     1645            pMenu->addAction(pAction);
    16451646            pAction->setData(QVariant::fromValue(mode));
    16461647            pAction->setCheckable(true);
    16471648            pAction->setChecked(session().GetMachine().GetDragAndDropMode() == mode);
    1648             m_pDragAndDropActions->addAction(pAction);
    16491649        }
    16501650        connect(m_pDragAndDropActions, SIGNAL(triggered(QAction*)),
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