VirtualBox

Ignore:
Timestamp:
May 20, 2015 4:52:25 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100486
Message:

Main/Snapshot: add a parameter to IMachine.takeSnapshot, returning the snapshot UUID, which is useful for finding the snapshot reliably (using the non-unique name is error prone), plus the necessary code adaptions everywhere.
Frontends/VBoxManage: add a feature for creating unique snapshot names (by appending a number or timestamp).

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

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

    r55750 r55977  
    55
    66/*
    7  * Copyright (C) 2010-2014 Oracle Corporation
     7 * Copyright (C) 2010-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    14241424    if (fDialogAccepted)
    14251425    {
     1426        QString strSnapshotId;
    14261427        /* Prepare the take-snapshot progress: */
    1427         CProgress progress = machine().TakeSnapshot(strSnapshotName, strSnapshotDescription, true);
     1428        CProgress progress = machine().TakeSnapshot(strSnapshotName, strSnapshotDescription, true, strSnapshotId);
    14281429        if (machine().isOk())
    14291430        {
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp

    r55934 r55977  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    889889            if (fDialogAccepted)
    890890            {
     891                QString strSnapshotId;
    891892                /* Prepare the take-snapshot progress: */
    892                 CProgress progress = machine.TakeSnapshot(strSnapshotName, strSnapshotDescription, true);
     893                CProgress progress = machine.TakeSnapshot(strSnapshotName, strSnapshotDescription, true, strSnapshotId);
    893894                if (machine.isOk())
    894895                {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp

    r55214 r55977  
    55
    66/*
    7  * Copyright (C) 2011-2014 Oracle Corporation
     7 * Copyright (C) 2011-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    8484        /* Take the snapshot: */
    8585        QString strSnapshotName = tr("Linked Base for %1 and %2").arg(m_machine.GetName()).arg(strName);
    86         CProgress progress = machine.TakeSnapshot(strSnapshotName, "", true);
     86        QString strSnapshotId;
     87        CProgress progress = machine.TakeSnapshot(strSnapshotName, "", true, strSnapshotId);
    8788
    8889        if (machine.isOk())
     
    107108
    108109        /* Get the new snapshot and the snapshot machine. */
    109         const CSnapshot &newSnapshot = m_machine.FindSnapshot(strSnapshotName);
     110        const CSnapshot &newSnapshot = m_machine.FindSnapshot(strSnapshotId);
    110111        if (newSnapshot.isNull())
    111112        {
Note: See TracChangeset for help on using the changeset viewer.

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