VirtualBox

Changeset 92098 in vbox for trunk


Ignore:
Timestamp:
Oct 27, 2021 12:38:19 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: UIWizardCloneVM: Migrate UIMessageCenter stuff to UINotificationCenter.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r92096 r92098  
    819819
    820820/* static */
     821void UINotificationMessage::cannotCreateMachine(const CVirtualBox &comVBox,
     822                                                UINotificationCenter *pParent /* = 0 */)
     823{
     824    createMessage(
     825        QApplication::translate("UIMessageCenter", "Can't create machine ..."),
     826        QApplication::translate("UIMessageCenter", "Failed to create machine.") +
     827        UIErrorString::formatErrorInfo(comVBox),
     828        QString(), QString(), pParent);
     829}
     830
     831/* static */
    821832void UINotificationMessage::cannotFindMachineById(const CVirtualBox &comVBox,
    822833                                                  const QUuid &uMachineId,
     
    10741085                                                   .arg(uId.toString()) +
    10751086        UIErrorString::formatErrorInfo(comMachine));
     1087}
     1088
     1089/* static */
     1090void UINotificationMessage::cannotFindSnapshotByName(const CMachine &comMachine,
     1091                                                     const QString &strName,
     1092                                                     UINotificationCenter *pParent /* = 0 */)
     1093{
     1094    createMessage(
     1095        QApplication::translate("UIMessageCenter", "Can't find snapshot ..."),
     1096        QApplication::translate("UIMessageCenter", "Can't find snapshot with name=<b>%1</b>.")
     1097                                                   .arg(strName) +
     1098        UIErrorString::formatErrorInfo(comMachine),
     1099        QString(), QString(), pParent);
    10761100}
    10771101
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r92096 r92098  
    328328          * @param  comVBox  Brings common VBox object trying to create appliance. */
    329329        static void cannotCreateAppliance(const CVirtualBox &comVBox, UINotificationCenter *pParent = 0);
     330        /** Notifies about inability to create machine.
     331          * @param  comVBox  Brings common VBox object trying to create machine. */
     332        static void cannotCreateMachine(const CVirtualBox &comVBox, UINotificationCenter *pParent = 0);
    330333        /** Notifies about inability to find machine by ID.
    331334          * @param  comVBox     Brings common VBox object trying to find machine.
     
    426429          * @param  uId         Brings the required snapshot ID. */
    427430        static void cannotFindSnapshotById(const CMachine &comMachine, const QUuid &uId);
     431        /** Notifies about inability to find snapshot by name.
     432          * @param  comMachine  Brings the machine being searched for particular snapshot.
     433          * @param  strName     Brings the required snapshot name. */
     434        static void cannotFindSnapshotByName(const CMachine &comMachine, const QString &strName, UINotificationCenter *pParent = 0);
    428435        /** Notifies about inability to change snapshot.
    429436          * @param  comSnapshot      Brings the snapshot being changed.
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp

    r92024 r92098  
    1818/* GUI includes: */
    1919#include "UICommon.h"
    20 #include "UIMessageCenter.h"
    2120#include "UINotificationCenter.h"
    2221#include "UIWizardCloneVM.h"
     
    165164        if (comCreatedSnapshot.isNull())
    166165        {
    167             msgCenter().cannotFindSnapshotByName(m_machine, strSnapshotName, this);
     166            UINotificationMessage::cannotFindSnapshotByName(m_machine, strSnapshotName, notificationCenter());
    168167            return false;
    169168        }
     
    179178    if (!comVBox.isOk())
    180179    {
    181         msgCenter().cannotCreateMachine(comVBox, this);
     180        UINotificationMessage::cannotCreateMachine(comVBox, notificationCenter());
    182181        return false;
    183182    }
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