VirtualBox

Changeset 92096 in vbox for trunk/src


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

FE/Qt: bugref:10067: UIWizardImportApp: Migrate a lot of UIMessageCenter stuff to UINotificationCenter.

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

Legend:

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

    r92089 r92096  
    522522
    523523/* static */
     524void UINotificationMessage::cannotAcquireApplianceParameter(const CAppliance &comAppliance,
     525                                                            UINotificationCenter *pParent /* = 0 */)
     526{
     527    createMessage(
     528        QApplication::translate("UIMessageCenter", "Appliance failure ..."),
     529        QApplication::translate("UIMessageCenter", "Failed to acquire appliance parameter.") +
     530        UIErrorString::formatErrorInfo(comAppliance),
     531        QString(), QString(), pParent);
     532}
     533
     534/* static */
    524535void UINotificationMessage::cannotAcquireExtensionPackManagerParameter(const CExtPackManager &comEPManager)
    525536{
     
    865876        QApplication::translate("UIMessageCenter", "Bad password ..."),
    866877        QApplication::translate("UIMessageCenter", "Bad password or authentication failure.") +
     878        UIErrorString::formatErrorInfo(comAppliance),
     879        QString(), QString(), pParent);
     880}
     881
     882/* static */
     883void UINotificationMessage::cannotInterpretAppliance(const CAppliance &comAppliance, UINotificationCenter *pParent /* = 0 */)
     884{
     885    createMessage(
     886        QApplication::translate("UIMessageCenter", "Can't interpret appliance ..."),
     887        QApplication::translate("UIMessageCenter", "Failed to interpret appliance being imported.") +
    867888        UIErrorString::formatErrorInfo(comAppliance),
    868889        QString(), QString(), pParent);
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r92089 r92096  
    227227          * @param  comVBox  Brings the object parameter get acquired from. */
    228228        static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox);
     229        /** Notifies about inability to acquire IAppliance parameter.
     230          * @param  comVBox  Brings the object parameter get acquired from. */
     231        static void cannotAcquireApplianceParameter(const CAppliance &comAppliance,
     232                                                    UINotificationCenter *pParent = 0);
    229233        /** Notifies about inability to acquire IExtPackManager parameter.
    230234          * @param  comVBox  Brings the object parameter get acquired from. */
     
    348352          * @param  comAppliance  Brings appliance trying to add disk scryption password. */
    349353        static void cannotAddDiskEncryptionPassword(const CAppliance &comAppliance, UINotificationCenter *pParent = 0);
     354        /** Notifies about inability to interpret appliance.
     355          * @param  comAppliance  Brings appliance we are trying to interpret. */
     356        static void cannotInterpretAppliance(const CAppliance &comAppliance, UINotificationCenter *pParent = 0);
    350357
    351358        /** Notifies about inability to open extension pack.
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp

    r91969 r92096  
    2929#include "QIDialog.h"
    3030#include "QIFileDialog.h"
    31 #include "UIMessageCenter.h"
    3231#include "UINotificationCenter.h"
    3332#include "UIWizardImportApp.h"
     
    175174    if (!comVBox.isOk())
    176175    {
    177         msgCenter().cannotCreateAppliance(comVBox, this);
     176        UINotificationMessage::cannotCreateAppliance(comVBox, notificationCenter());
    178177        return false;
    179178    }
     
    188187    if (!comAppliance.isOk())
    189188    {
    190         msgCenter().cannotImportAppliance(comAppliance, this);
     189        UINotificationMessage::cannotInterpretAppliance(comAppliance, notificationCenter());
    191190        return false;
    192191    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r91709 r92096  
    3636#include "UIFormEditorWidget.h"
    3737#include "UIIconPool.h"
    38 #include "UIMessageCenter.h"
     38#include "UINotificationCenter.h"
    3939#include "UIToolBox.h"
    4040#include "UIVirtualBoxEventHandler.h"
     
    465465            fResult = comForm.isOk();
    466466            if (!fResult)
    467                 msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
     467                UINotificationMessage::cannotAcquireVirtualSystemDescriptionFormParameter(comForm, wizard()->notificationCenter());
    468468        }
    469469    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp

    r91709 r92096  
    3030#include "UIFilePathSelector.h"
    3131#include "UIFormEditorWidget.h"
    32 #include "UIMessageCenter.h"
     32#include "UINotificationCenter.h"
    3333#include "UIWizardImportApp.h"
    3434#include "UIWizardImportAppPageSettings.h"
     
    519519            fResult = comForm.isOk();
    520520            if (!fResult)
    521                 msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
     521                UINotificationMessage::cannotAcquireVirtualSystemDescriptionFormParameter(comForm, wizard()->notificationCenter());
    522522        }
    523523    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp

    r92045 r92096  
    2929#include "UIEmptyFilePathSelector.h"
    3030#include "UIIconPool.h"
    31 #include "UIMessageCenter.h"
    3231#include "UINotificationCenter.h"
    3332#include "UIVirtualBoxEventHandler.h"
     
    321320    CAppliance comAppliance = comVBox.CreateAppliance();
    322321    if (!comVBox.isOk())
    323     {
    324         msgCenter().cannotCreateAppliance(comVBox, pWizard);
    325         return;
    326     }
     322        return UINotificationMessage::cannotCreateAppliance(comVBox, pWizard->notificationCenter());
    327323
    328324    /* Remember appliance: */
     
    339335    QVector<CVirtualSystemDescription> descriptions = comCloudAppliance.GetVirtualSystemDescriptions();
    340336    if (!comCloudAppliance.isOk())
    341     {
    342         msgCenter().cannotAcquireVirtualSystemDescription(comCloudAppliance, pWizard);
    343         return;
    344     }
     337        return UINotificationMessage::cannotAcquireApplianceParameter(comCloudAppliance, pWizard->notificationCenter());
    345338
    346339    /* Make sure there is at least one virtual system description created: */
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