VirtualBox

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


Ignore:
Timestamp:
Feb 27, 2023 10:36:45 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156050
Message:

FE/Qt: bugref:10322: Runtime UI: Reworking CMachine wrapper usage step-by-step; More snapshot stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

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

    r98744 r98745  
    382382{
    383383    return uisession()->acquireMaxSnapshotIndex(strNameTemplate, uIndex);
     384}
     385
     386void UIMachine::takeSnapshot(const QString &strName, const QString &strDescription)
     387{
     388    return uisession()->takeSnapshot(strName, strDescription);
    384389}
    385390
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r98744 r98745  
    263263        /** Recursively searches for a first snapshot matching name template conditions. */
    264264        bool acquireMaxSnapshotIndex(const QString &strNameTemplate, ulong &uIndex);
     265
     266        /** Takes snapshot with name & description specified. */
     267        void takeSnapshot(const QString &strName, const QString &strDescription);
    265268    /** @} */
    266269
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r98744 r98745  
    16211621        return;
    16221622
    1623     /* Take snapshot: */
    1624     UINotificationProgressSnapshotTake *pNotification = new UINotificationProgressSnapshotTake(machine(),
    1625                                                                                                strSnapshotName,
    1626                                                                                                strSnapshotDescription);
    1627     gpNotificationCenter->append(pNotification);
     1623    /* Take snapshot finally: */
     1624    uimachine()->takeSnapshot(strSnapshotName, strSnapshotDescription);
    16281625}
    16291626
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98744 r98745  
    348348    CSnapshot comSnapshot = comMachine.FindSnapshot(QString());
    349349    return searchMaxSnapshotIndex(comMachine, comSnapshot, strNameTemplate, uIndex);
     350}
     351
     352void UISession::takeSnapshot(const QString &strName, const QString &strDescription)
     353{
     354    CMachine comMachine = machine();
     355    UINotificationProgressSnapshotTake *pNotification = new UINotificationProgressSnapshotTake(comMachine,
     356                                                                                               strName,
     357                                                                                               strDescription);
     358    gpNotificationCenter->append(pNotification);
    350359}
    351360
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r98744 r98745  
    260260        /** Recursively searches for a first snapshot matching name template conditions. */
    261261        bool acquireMaxSnapshotIndex(const QString &strNameTemplate, ulong &uIndex);
     262
     263        /** Takes snapshot with name & description specified. */
     264        void takeSnapshot(const QString &strName, const QString &strDescription);
    262265    /** @} */
    263266
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