VirtualBox

Changeset 79131 in vbox


Ignore:
Timestamp:
Jun 13, 2019 2:20:56 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: Handle machine-data-change event since actual medium detachment happens on IMachine::saveSettings API call followed by that event.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/medium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp

    r79129 r79131  
    108108            this, &UIMediumEnumerator::sltHandleMachineRegistration);
    109109#else /* VBOX_GUI_WITH_NEW_MEDIA_EVENTS */
     110    /* Machine related events: */
     111    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange,
     112            this, &UIMediumEnumerator::sltHandleMachineDataChange);
     113    /* Medium related events: */
    110114    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigStorageControllerChange,
    111115            this, &UIMediumEnumerator::sltHandleStorageControllerChange);
     
    375379
    376380#else /* VBOX_GUI_WITH_NEW_MEDIA_EVENTS */
     381
     382void UIMediumEnumerator::sltHandleMachineDataChange(const QUuid &uMachineId)
     383{
     384    //printf("MachineDataChange: machine-id=%s\n",
     385    //       uMachineId.toString().toUtf8().constData());
     386    LogRel2(("GUI: UIMediumEnumerator: MachineDataChange event received, Machine ID = {%s}\n",
     387             uMachineId.toString().toUtf8().constData()));
     388
     389    /* Parse machine ID: */
     390    QList<QUuid> result;
     391    parseMachineId(uMachineId, result);
     392}
    377393
    378394void UIMediumEnumerator::sltHandleStorageControllerChange(const QUuid &uMachineId, const QString &strControllerName)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h

    r79129 r79131  
    114114    void sltHandleSnapshotDeleted(const QUuid &uMachineID, const QUuid &uSnapshotID);
    115115#else /* VBOX_GUI_WITH_NEW_MEDIA_EVENTS */
     116    /** Handles machine-data-change event for a machine with specified @a uMachineId. */
     117    void sltHandleMachineDataChange(const QUuid &uMachineId);
     118
    116119    /** Handles signal about storage controller change.
    117120      * @param  uMachineId         Brings the ID of machine corresponding controller belongs to.
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