VirtualBox

Changeset 92173 in vbox for trunk


Ignore:
Timestamp:
Nov 2, 2021 9:43:08 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Migrate most of UIMessageCenter in UICloudNetworkingStuff to UINotificationCenter.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp

    r91149 r92173  
    271271
    272272    /* Look for corresponding provider: */
    273     CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName, this);
     273    CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName);
    274274    if (comCloudProvider.isNotNull())
    275275    {
     
    279279
    280280        /* Look for corresponding profile: */
    281         CCloudProfile comCloudProfile = cloudProfileByName(strShortName, oldData.m_strName, this);
     281        CCloudProfile comCloudProfile = cloudProfileByName(strShortName, oldData.m_strName);
    282282        if (comCloudProfile.isNotNull())
    283283        {
     
    355355
    356356    /* Look for corresponding provider: */
    357     CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName, this);
     357    CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName);
    358358    if (comCloudProvider.isNotNull())
    359359    {
     
    392392
    393393    /* Look for corresponding provider: */
    394     CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName, this);
     394    CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName);
    395395    if (comCloudProvider.isNotNull())
    396396    {
     
    424424
    425425    /* Look for corresponding provider: */
    426     CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName, this);
     426    CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName);
    427427    if (comCloudProvider.isNotNull())
    428428    {
    429429        /* Look for corresponding profile: */
    430         CCloudProfile comCloudProfile = cloudProfileByName(strShortName, strProfileName, this);
     430        CCloudProfile comCloudProfile = cloudProfileByName(strShortName, strProfileName);
    431431        if (comCloudProfile.isNotNull())
    432432        {
     
    801801    /* Gather provider settings: */
    802802    if (comProvider.isOk())
    803         cloudProviderId(comProvider, providerData.m_uId, this);
     803        cloudProviderId(comProvider, providerData.m_uId);
    804804    if (comProvider.isOk())
    805805        cloudProviderShortName(comProvider, providerData.m_strShortName);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp

    r92172 r92173  
    3232
    3333
    34 CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager(QWidget *pParent /* = 0 */)
     34CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager(UINotificationCenter *pParent /* = 0 */)
    3535{
    3636    /* Acquire VBox: */
     
    4141        CCloudProviderManager comProviderManager = comVBox.GetCloudProviderManager();
    4242        if (!comVBox.isOk())
    43             msgCenter().cannotAcquireCloudProviderManager(comVBox, pParent);
     43            UINotificationMessage::cannotAcquireVirtualBoxParameter(comVBox, pParent);
    4444        else
    4545            return comProviderManager;
     
    6767
    6868CCloudProvider UICloudNetworkingStuff::cloudProviderByShortName(const QString &strProviderShortName,
    69                                                                 QWidget *pParent /* = 0 */)
     69                                                                UINotificationCenter *pParent /* = 0 */)
    7070{
    7171    /* Acquire cloud provider manager: */
     
    7676        CCloudProvider comProvider = comProviderManager.GetProviderByShortName(strProviderShortName);
    7777        if (!comProviderManager.isOk())
    78             msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);
     78            UINotificationMessage::cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);
    7979        else
    8080            return comProvider;
     
    104104CCloudProfile UICloudNetworkingStuff::cloudProfileByName(const QString &strProviderShortName,
    105105                                                         const QString &strProfileName,
    106                                                          QWidget *pParent /* = 0 */)
     106                                                         UINotificationCenter *pParent /* = 0 */)
    107107{
    108108    /* Acquire cloud provider: */
     
    113113        CCloudProfile comProfile = comProvider.GetProfileByName(strProfileName);
    114114        if (!comProvider.isOk())
    115             msgCenter().cannotFindCloudProfile(comProvider, strProfileName, pParent);
     115            UINotificationMessage::cannotAcquireCloudProviderParameter(comProvider, pParent);
    116116        else
    117117            return comProfile;
     
    141141
    142142CCloudClient UICloudNetworkingStuff::cloudClient(CCloudProfile comProfile,
    143                                                  QWidget *pParent /* = 0 */)
     143                                                 UINotificationCenter *pParent /* = 0 */)
    144144{
    145145    /* Create cloud client: */
    146146    CCloudClient comClient = comProfile.CreateCloudClient();
    147147    if (!comProfile.isOk())
    148         msgCenter().cannotCreateCloudClient(comProfile, pParent);
     148        UINotificationMessage::cannotCreateCloudClient(comProfile, pParent);
    149149    else
    150150        return comClient;
     
    168168CCloudClient UICloudNetworkingStuff::cloudClientByName(const QString &strProviderShortName,
    169169                                                       const QString &strProfileName,
    170                                                        QWidget *pParent /* = 0 */)
     170                                                       UINotificationCenter *pParent /* = 0 */)
    171171{
    172172    /* Acquire cloud profile: */
     
    190190}
    191191
    192 CVirtualSystemDescription UICloudNetworkingStuff::createVirtualSystemDescription(QWidget *pParent /* = 0 */)
     192CVirtualSystemDescription UICloudNetworkingStuff::createVirtualSystemDescription(UINotificationCenter *pParent /* = 0 */)
    193193{
    194194    /* Acquire VBox: */
     
    199199        CAppliance comAppliance = comVBox.CreateAppliance();
    200200        if (!comVBox.isOk())
    201             msgCenter().cannotCreateAppliance(comVBox, pParent);
     201            UINotificationMessage::cannotCreateAppliance(comVBox, pParent);
    202202        else
    203203        {
     
    205205            comAppliance.CreateVirtualSystemDescriptions(1);
    206206            if (!comAppliance.isOk())
    207                 msgCenter().cannotCreateVirtualSystemDescription(comAppliance, pParent);
     207                UINotificationMessage::cannotCreateVirtualSystemDescription(comAppliance, pParent);
    208208            else
    209209            {
     
    219219}
    220220
    221 QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders(QWidget *pParent /* = 0 */)
     221QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders(UINotificationCenter *pParent /* = 0 */)
    222222{
    223223    /* Acquire cloud provider manager: */
    224     CCloudProviderManager comProviderManager = cloudProviderManager();
     224    CCloudProviderManager comProviderManager = cloudProviderManager(pParent);
    225225    if (comProviderManager.isNotNull())
    226226    {
     
    228228        QVector<CCloudProvider> providers = comProviderManager.GetProviders();
    229229        if (!comProviderManager.isOk())
    230             msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);
     230            UINotificationMessage::cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);
    231231        else
    232232            return providers;
     
    238238bool UICloudNetworkingStuff::cloudProviderId(const CCloudProvider &comCloudProvider,
    239239                                             QUuid &uResult,
    240                                              QWidget *pParent /* = 0 */)
     240                                             UINotificationCenter *pParent /* = 0 */)
    241241{
    242242    const QUuid uId = comCloudProvider.GetId();
    243243    if (!comCloudProvider.isOk())
    244         msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
     244        UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
    245245    else
    246246    {
     
    253253bool UICloudNetworkingStuff::cloudProviderShortName(const CCloudProvider &comCloudProvider,
    254254                                                    QString &strResult,
    255                                                     QWidget *pParent /* = 0 */)
     255                                                    UINotificationCenter *pParent /* = 0 */)
    256256{
    257257    const QString strShortName = comCloudProvider.GetShortName();
    258258    if (!comCloudProvider.isOk())
    259         msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
     259        UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
    260260    else
    261261    {
     
    268268bool UICloudNetworkingStuff::cloudProviderName(const CCloudProvider &comCloudProvider,
    269269                                               QString &strResult,
    270                                                QWidget *pParent /* = 0 */)
     270                                               UINotificationCenter *pParent /* = 0 */)
    271271{
    272272    const QString strName = comCloudProvider.GetName();
    273273    if (!comCloudProvider.isOk())
    274         msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
     274        UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
    275275    else
    276276    {
     
    282282
    283283QVector<CCloudProfile> UICloudNetworkingStuff::listCloudProfiles(CCloudProvider comCloudProvider,
    284                                                                  QWidget *pParent /* = 0 */)
     284                                                                 UINotificationCenter *pParent /* = 0 */)
    285285{
    286286    /* Check cloud provider: */
     
    290290        QVector<CCloudProfile> profiles = comCloudProvider.GetProfiles();
    291291        if (!comCloudProvider.isOk())
    292             msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
     292            UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent);
    293293        else
    294294            return profiles;
     
    300300bool UICloudNetworkingStuff::cloudProfileName(const CCloudProfile &comCloudProfile,
    301301                                              QString &strResult,
    302                                               QWidget *pParent /* = 0 */)
     302                                              UINotificationCenter *pParent /* = 0 */)
    303303{
    304304    const QString strName = comCloudProfile.GetName();
    305305    if (!comCloudProfile.isOk())
    306         msgCenter().cannotAcquireCloudProfileParameter(comCloudProfile, pParent);
     306        UINotificationMessage::cannotAcquireCloudProfileParameter(comCloudProfile, pParent);
    307307    else
    308308    {
     
    316316                                                    QVector<QString> &keys,
    317317                                                    QVector<QString> &values,
    318                                                     QWidget *pParent /* = 0 */)
     318                                                    UINotificationCenter *pParent /* = 0 */)
    319319{
    320320    QVector<QString> aKeys;
     
    322322    aValues = comCloudProfile.GetProperties(QString(), aKeys);
    323323    if (!comCloudProfile.isOk())
    324         msgCenter().cannotAcquireCloudProfileParameter(comCloudProfile, pParent);
     324        UINotificationMessage::cannotAcquireCloudProfileParameter(comCloudProfile, pParent);
    325325    else
    326326    {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h

    r92172 r92173  
    2424/* GUI includes: */
    2525#include "UILibraryDefs.h"
     26#include "UINotificationCenter.h"
    2627
    2728/* COM includes: */
     
    3940    /** Acquires cloud provider manager,
    4041      * using @a pParent to show messages according to. */
    41     SHARED_LIBRARY_STUFF CCloudProviderManager cloudProviderManager(QWidget *pParent = 0);
     42    SHARED_LIBRARY_STUFF CCloudProviderManager cloudProviderManager(UINotificationCenter *pParent = 0);
    4243    /** Acquires cloud provider manager,
    4344      * using @a strErrorMessage to store messages to. */
     
    4647      * using @a pParent to show messages according to. */
    4748    SHARED_LIBRARY_STUFF CCloudProvider cloudProviderByShortName(const QString &strProviderShortName,
    48                                                                  QWidget *pParent = 0);
     49                                                                 UINotificationCenter *pParent = 0);
    4950    /** Acquires cloud provider specified by @a strProviderShortName,
    5051      * using @a strErrorMessage to store messages to. */
     
    5556    SHARED_LIBRARY_STUFF CCloudProfile cloudProfileByName(const QString &strProviderShortName,
    5657                                                          const QString &strProfileName,
    57                                                           QWidget *pParent = 0);
     58                                                          UINotificationCenter *pParent = 0);
    5859    /** Acquires cloud profile specified by @a strProviderShortName and @a strProfileName,
    5960      * using @a strErrorMessage to store messages to. */
     
    6465      * using @a pParent to show messages according to. */
    6566    SHARED_LIBRARY_STUFF CCloudClient cloudClient(CCloudProfile comProfile,
    66                                                   QWidget *pParent = 0);
     67                                                  UINotificationCenter *pParent = 0);
    6768    /** Acquires cloud client created for @a comProfile,
    6869      * using @a strErrorMessage to store messages to. */
     
    7374    SHARED_LIBRARY_STUFF CCloudClient cloudClientByName(const QString &strProviderShortName,
    7475                                                        const QString &strProfileName,
    75                                                         QWidget *pParent = 0);
     76                                                        UINotificationCenter *pParent = 0);
    7677    /** Acquires cloud client specified by @a strProviderShortName and @a strProfileName,
    7778      * using @a strErrorMessage to store messages to. */
     
    8182
    8283    /** Creates virtual system description, using @a pParent to show messages according to. */
    83     SHARED_LIBRARY_STUFF CVirtualSystemDescription createVirtualSystemDescription(QWidget *pParent = 0);
     84    SHARED_LIBRARY_STUFF CVirtualSystemDescription createVirtualSystemDescription(UINotificationCenter *pParent = 0);
    8485
    8586    /** Acquires cloud providers, using @a pParent to show messages according to. */
    86     SHARED_LIBRARY_STUFF QVector<CCloudProvider> listCloudProviders(QWidget *pParent = 0);
     87    SHARED_LIBRARY_STUFF QVector<CCloudProvider> listCloudProviders(UINotificationCenter *pParent = 0);
    8788
    8889    /** Acquires @a comCloudProvider ID as a @a uResult, using @a pParent to show messages according to. */
    8990    SHARED_LIBRARY_STUFF bool cloudProviderId(const CCloudProvider &comCloudProvider,
    9091                                              QUuid &uResult,
    91                                               QWidget *pParent = 0);
     92                                              UINotificationCenter *pParent = 0);
    9293    /** Acquires @a comCloudProvider short name as a @a strResult, using @a pParent to show messages according to. */
    9394    SHARED_LIBRARY_STUFF bool cloudProviderShortName(const CCloudProvider &comCloudProvider,
    9495                                                     QString &strResult,
    95                                                      QWidget *pParent = 0);
     96                                                     UINotificationCenter *pParent = 0);
    9697    /** Acquires @a comCloudProvider name as a @a strResult, using @a pParent to show messages according to. */
    9798    SHARED_LIBRARY_STUFF bool cloudProviderName(const CCloudProvider &comCloudProvider,
    9899                                                QString &strResult,
    99                                                 QWidget *pParent = 0);
     100                                                UINotificationCenter *pParent = 0);
    100101
    101102    /** Acquires cloud profiles of certain @a comCloudProvider, using @a pParent to show messages according to. */
    102103    SHARED_LIBRARY_STUFF QVector<CCloudProfile> listCloudProfiles(CCloudProvider comCloudProvider,
    103                                                                   QWidget *pParent = 0);
     104                                                                  UINotificationCenter *pParent = 0);
    104105
    105106    /** Acquires @a comCloudProfile name as a @a strResult, using @a pParent to show messages according to. */
    106107    SHARED_LIBRARY_STUFF bool cloudProfileName(const CCloudProfile &comCloudProfile,
    107108                                               QString &strResult,
    108                                                QWidget *pParent = 0);
     109                                               UINotificationCenter *pParent = 0);
    109110    /** Acquires @a comCloudProfile properties as a @a keys/values using @a pParent to show messages according to. */
    110111    SHARED_LIBRARY_STUFF bool cloudProfileProperties(const CCloudProfile &comCloudProfile,
    111112                                                     QVector<QString> &keys,
    112113                                                     QVector<QString> &values,
    113                                                      QWidget *pParent = 0);
     114                                                     UINotificationCenter *pParent = 0);
    114115
    115116    /** Acquires cloud images of certain @a comCloudClient, using @a pParent to show messages according to. */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r92151 r92173  
    14141414}
    14151415
    1416 void UIMessageCenter::cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const
    1417 {
    1418     error(pParent, MessageType_Error,
    1419           tr("Failed to acquire cloud provider manager."),
    1420           UIErrorString::formatErrorInfo(comVBox));
    1421 }
    1422 
    1423 void UIMessageCenter::cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent /* = 0 */) const
    1424 {
    1425     error(pParent, MessageType_Error,
    1426           tr("Failed to find cloud provider with following uuid: <b>%1</b>.").arg(uId.toString()),
    1427           UIErrorString::formatErrorInfo(comManager));
    1428 }
    1429 
    1430 void UIMessageCenter::cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent /* = 0 */) const
    1431 {
    1432     error(pParent, MessageType_Error,
    1433           tr("Failed to find cloud profile with following name: <b>%1</b>.").arg(strName),
    1434           UIErrorString::formatErrorInfo(comProvider));
    1435 }
    1436 
    1437 void UIMessageCenter::cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const
    1438 {
    1439     error(pParent, MessageType_Error,
    1440           tr("Failed to create cloud client."),
    1441           UIErrorString::formatErrorInfo(comProfile));
    1442 }
    1443 
    1444 void UIMessageCenter::cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent /* = 0 */) const
    1445 {
    1446     error(pParent, MessageType_Error,
    1447           tr("Failed to acquire cloud provider manager parameter."),
    1448           UIErrorString::formatErrorInfo(comManager));
    1449 }
    1450 
    1451 void UIMessageCenter::cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const
    1452 {
    1453     error(pParent, MessageType_Error,
    1454           tr("Failed to acquire cloud provider parameter."),
    1455           UIErrorString::formatErrorInfo(comProvider));
    1456 }
    1457 
    1458 void UIMessageCenter::cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const
    1459 {
    1460     error(pParent, MessageType_Error,
    1461           tr("Failed to acquire cloud profile parameter."),
    1462           UIErrorString::formatErrorInfo(comProfile));
    1463 }
    1464 
    14651416void UIMessageCenter::cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const
    14661417{
     
    19931944                          tr("Continue", "no hard disk attached"),
    19941945                          tr("Go Back", "no hard disk attached"));
    1995 }
    1996 
    1997 void UIMessageCenter::cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const
    1998 {
    1999     error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual appliance.</p>"),
    2000           UIErrorString::formatErrorInfo(comVBox));
    2001 }
    2002 
    2003 void UIMessageCenter::cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent /* = 0 */) const
    2004 {
    2005     error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"),
    2006           UIErrorString::formatErrorInfo(comAppliance));
    20071946}
    20081947
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r92151 r92173  
    377377    /** @name VirtualBox Manager / Cloud networking warnings.
    378378      * @{ */
    379         void cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent = 0) const;
    380         void cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent = 0) const;
    381         void cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent = 0) const;
    382         void cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent = 0) const;
    383         void cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent = 0) const;
    384         void cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent = 0) const;
    385         void cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const;
    386379        void cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent = 0) const;
    387380        void cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent = 0) const;
     
    449442        /// @todo move to notification-center after wizards get theirs.. :)
    450443        bool confirmHardDisklessMachine(QWidget *pParent = 0) const;
    451         void cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent = 0) const;
    452         void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const;
    453444        bool confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent = 0) const;
    454445        bool confirmOverridingFile(const QString &strPath, QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r92151 r92173  
    4141#include "CCloudProfile.h"
    4242#include "CCloudProvider.h"
     43#include "CCloudProviderManager.h"
    4344#include "CConsole.h"
    4445#include "CDHCPServer.h"
     
    574575
    575576/* static */
    576 void UINotificationMessage::cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox)
     577void UINotificationMessage::cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox,
     578                                                             UINotificationCenter *pParent /* = 0 */)
    577579{
    578580    createMessage(
    579581        QApplication::translate("UIMessageCenter", "VirtualBox failure ..."),
    580582        QApplication::translate("UIMessageCenter", "Failed to acquire VirtualBox parameter.") +
    581         UIErrorString::formatErrorInfo(comVBox));
     583        UIErrorString::formatErrorInfo(comVBox),
     584        QString(), QString(), pParent);
    582585}
    583586
     
    709712        QApplication::translate("UIMessageCenter", "Failed to acquire virtual system description form parameter.") +
    710713        UIErrorString::formatErrorInfo(comVsdForm),
     714        QString(), QString(), pParent);
     715}
     716
     717/* static */
     718void UINotificationMessage::cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comCloudProviderManager,
     719                                                                       UINotificationCenter *pParent /* = 0 */)
     720{
     721    createMessage(
     722        QApplication::translate("UIMessageCenter", "Cloud failure ..."),
     723        QApplication::translate("UIMessageCenter", "Failed to acquire cloud provider manager parameter.") +
     724        UIErrorString::formatErrorInfo(comCloudProviderManager),
     725        QString(), QString(), pParent);
     726}
     727
     728/* static */
     729void UINotificationMessage::cannotAcquireCloudProviderParameter(const CCloudProvider &comCloudProvider,
     730                                                                UINotificationCenter *pParent /* = 0 */)
     731{
     732    createMessage(
     733        QApplication::translate("UIMessageCenter", "Cloud failure ..."),
     734        QApplication::translate("UIMessageCenter", "Failed to acquire cloud provider parameter.") +
     735        UIErrorString::formatErrorInfo(comCloudProvider),
     736        QString(), QString(), pParent);
     737}
     738
     739/* static */
     740void UINotificationMessage::cannotAcquireCloudProfileParameter(const CCloudProfile &comCloudProfile,
     741                                                               UINotificationCenter *pParent /* = 0 */)
     742{
     743    createMessage(
     744        QApplication::translate("UIMessageCenter", "Cloud failure ..."),
     745        QApplication::translate("UIMessageCenter", "Failed to acquire cloud profile parameter.") +
     746        UIErrorString::formatErrorInfo(comCloudProfile),
    711747        QString(), QString(), pParent);
    712748}
     
    9921028
    9931029/* static */
     1030void UINotificationMessage::cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, UINotificationCenter *pParent /* = 0 */)
     1031{
     1032    createMessage(
     1033        QApplication::translate("UIMessageCenter", "Can't create VSD ..."),
     1034        QApplication::translate("UIMessageCenter", "Failed to create virtual system description.") +
     1035        UIErrorString::formatErrorInfo(comAppliance),
     1036        QString(), QString(), pParent);
     1037}
     1038
     1039/* static */
    9941040void UINotificationMessage::cannotOpenExtPack(const CExtPackManager &comExtPackManager, const QString &strFilename)
    9951041{
     
    11221168        QApplication::translate("UIMessageCenter", "Failed to refresh cloud machine.") +
    11231169        UIErrorString::formatErrorInfo(comProgress));
     1170}
     1171
     1172/* static */
     1173void UINotificationMessage::cannotCreateCloudClient(const CCloudProfile &comProfile, UINotificationCenter *pParent /* = 0 */)
     1174{
     1175    createMessage(
     1176        QApplication::translate("UIMessageCenter", "Can't create cloud client ..."),
     1177        QApplication::translate("UIMessageCenter", "Failed to create cloud client.") +
     1178        UIErrorString::formatErrorInfo(comProfile),
     1179        QString(), QString(), pParent);
    11241180}
    11251181
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r92151 r92173  
    5252class UINotificationCenter;
    5353class CAudioAdapter;
     54class CCloudProviderManager;
     55class CCloudProvider;
     56class CCloudProfile;
    5457class CEmulatedUSB;
    5558class CNetworkAdapter;
     
    250253        /** Notifies about inability to acquire IVirtualBox parameter.
    251254          * @param  comVBox  Brings the object parameter get acquired from. */
    252         static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox);
     255        static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox,
     256                                                     UINotificationCenter *pParent = 0);
    253257        /** Notifies about inability to acquire IAppliance parameter.
    254258          * @param  comVBox  Brings the object parameter get acquired from. */
     
    295299        static void cannotAcquireVirtualSystemDescriptionFormParameter(const CVirtualSystemDescriptionForm &comVsdForm,
    296300                                                                       UINotificationCenter *pParent = 0);
     301        /** Notifies about inability to acquire ICloudProviderManager parameter.
     302          * @param  comCloudProviderManager  Brings the object parameter get acquired from. */
     303        static void cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comCloudProviderManager,
     304                                                               UINotificationCenter *pParent = 0);
     305        /** Notifies about inability to acquire ICloudProvider parameter.
     306          * @param  comCloudProvider  Brings the object parameter get acquired from. */
     307        static void cannotAcquireCloudProviderParameter(const CCloudProvider &comCloudProvider,
     308                                                        UINotificationCenter *pParent = 0);
     309        /** Notifies about inability to acquire ICloudProfile parameter.
     310          * @param  comCloudProfile  Brings the object parameter get acquired from. */
     311        static void cannotAcquireCloudProfileParameter(const CCloudProfile &comCloudProfile,
     312                                                       UINotificationCenter *pParent = 0);
    297313
    298314        /** Notifies about inability to change IMedium parameter.
     
    393409          * @param  comAppliance  Brings appliance we are trying to interpret. */
    394410        static void cannotInterpretAppliance(const CAppliance &comAppliance, UINotificationCenter *pParent = 0);
     411        /** Notifies about inability to create VSD.
     412          * @param  comAppliance  Brings appliance trying to create VSD. */
     413        static void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, UINotificationCenter *pParent = 0);
    395414
    396415        /** Notifies about inability to open extension pack.
     
    445464          * @param  comProgress  Brings the progress of machine being refreshed. */
    446465        static void cannotRefreshCloudMachine(const CProgress &comProgress);
     466        /** Notifies about inability to create cloud client.
     467          * @param  comProfile  Brings the profile client being created for. */
     468        static void cannotCreateCloudClient(const CCloudProfile &comProfile, UINotificationCenter *pParent = 0);
    447469
    448470        /** Notifies about inability to open machine.
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r92033 r92173  
    170170{
    171171    /* Populate providers: */
    172     populateProviders(m_pProviderComboBox);
     172    populateProviders(m_pProviderComboBox, wizard()->notificationCenter());
    173173    /* Translate providers: */
    174174    retranslateUi();
     
    214214
    215215    /* Update profiles: */
    216     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     216    populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName());
    217217    sltHandleProfileComboChange();
    218218
     
    225225    /* Update wizard fields: */
    226226    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    227     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     227    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()->notificationCenter()));
    228228
    229229    /* Update profile instances: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.cpp

    r92033 r92173  
    4545*********************************************************************************************************************************/
    4646
    47 void UIWizardAddCloudVMSource::populateProviders(QIComboBox *pCombo)
     47void UIWizardAddCloudVMSource::populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter)
    4848{
    4949    /* Sanity check: */
    5050    AssertPtrReturnVoid(pCombo);
    51     /* We need top-level parent as well: */
    52     QWidget *pParent = pCombo->window();
    53     AssertPtrReturnVoid(pParent);
    5451
    5552    /* Remember current item data to be able to restore it: */
     
    6865
    6966    /* Iterate through existing providers: */
    70     foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
     67    foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter))
    7168    {
    7269        /* Skip if we have nothing to populate (file missing?): */
     
    7572        /* Acquire provider name: */
    7673        QString strProviderName;
    77         if (!cloudProviderName(comProvider, strProviderName, pParent))
     74        if (!cloudProviderName(comProvider, strProviderName, pCenter))
    7875            continue;
    7976        /* Acquire provider short name: */
    8077        QString strProviderShortName;
    81         if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
     78        if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter))
    8279            continue;
    8380
     
    104101
    105102void UIWizardAddCloudVMSource::populateProfiles(QIComboBox *pCombo,
     103                                                UINotificationCenter *pCenter,
    106104                                                const QString &strProviderShortName,
    107105                                                const QString &strProfileName)
     
    109107    /* Sanity check: */
    110108    AssertPtrReturnVoid(pCombo);
    111     /* We need top-level parent as well: */
    112     QWidget *pParent = pCombo->window();
    113     AssertPtrReturnVoid(pParent);
    114109    /* Acquire provider: */
    115     CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pParent);
     110    CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pCenter);
    116111    AssertReturnVoid(comProvider.isNotNull());
    117112
     
    130125
    131126    /* Iterate through existing profiles: */
    132     foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
     127    foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter))
    133128    {
    134129        /* Skip if we have nothing to populate (wtf happened?): */
     
    137132        /* Acquire current profile name: */
    138133        QString strCurrentProfileName;
    139         if (!cloudProfileName(comProfile, strCurrentProfileName, pParent))
     134        if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter))
    140135            continue;
    141136
     
    422417{
    423418    /* Populate providers: */
    424     populateProviders(m_pProviderComboBox);
     419    populateProviders(m_pProviderComboBox, wizard()->notificationCenter());
    425420    /* Translate providers: */
    426421    retranslateUi();
     
    466461
    467462    /* Update profiles: */
    468     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     463    populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName());
    469464    sltHandleProfileComboChange();
    470465
     
    477472    /* Update wizard fields: */
    478473    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    479     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     474    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()->notificationCenter()));
    480475
    481476    /* Update profile instances: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.h

    r91697 r92173  
    3636class QIRichTextLabel;
    3737class QIToolButton;
     38class UINotificationCenter;
    3839class UIWizardAddCloudVM;
    3940
     
    5556{
    5657    /** Populates @a pCombo with known providers. */
    57     void populateProviders(QIComboBox *pCombo);
     58    void populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter);
    5859    /** Populates @a pCombo with known profiles.
    5960      * @param  strProviderShortName  Brings the short name of provider profiles related to.
    6061      * @param  strProfileName        Brings the name of profile to be chosen by default. */
    61     void populateProfiles(QIComboBox *pCombo, const QString &strProviderShortName, const QString &strProfileName);
     62    void populateProfiles(QIComboBox *pCombo, UINotificationCenter *pCenter, const QString &strProviderShortName, const QString &strProfileName);
    6263    /** Populates @a pList with profile instances available in @a comClient. */
    6364    void populateProfileInstances(QListWidget *pList, const CCloudClient &comClient);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r92165 r92173  
    535535    populateVMItems(m_pVMSelector, m_selectedVMNames);
    536536    /* Populate formats: */
    537     populateFormats(m_pFormatComboBox, m_fExportToOCIByDefault);
     537    populateFormats(m_pFormatComboBox, wizard()->notificationCenter(), m_fExportToOCIByDefault);
    538538    /* Populate MAC address policies: */
    539539    populateMACAddressPolicies(m_pMACComboBox);
     
    711711    refreshManifestCheckBoxAccess(m_pManifestCheckbox, wizard()->isFormatCloudOne());
    712712    refreshIncludeISOsCheckBoxAccess(m_pIncludeISOsCheckbox, wizard()->isFormatCloudOne());
    713     refreshProfileCombo(m_pProfileComboBox, wizard()->format(), wizard()->isFormatCloudOne());
     713    refreshProfileCombo(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->format(), wizard()->isFormatCloudOne());
    714714    refreshCloudExportMode(m_exportModeButtons, wizard()->isFormatCloudOne());
    715715
     
    760760    /* Update export settings: */
    761761    refreshCloudProfile(m_comCloudProfile,
     762                        wizard()->notificationCenter(),
    762763                        wizard()->format(),
    763764                        wizard()->profileName(),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.cpp

    r92089 r92173  
    5252*********************************************************************************************************************************/
    5353
    54 void UIWizardExportAppFormat::populateFormats(QIComboBox *pCombo, bool fExportToOCIByDefault)
     54void UIWizardExportAppFormat::populateFormats(QIComboBox *pCombo, UINotificationCenter *pCenter, bool fExportToOCIByDefault)
    5555{
    5656    /* Sanity check: */
    5757    AssertPtrReturnVoid(pCombo);
    58     /* We need top-level parent as well: */
    59     QWidget *pParent = pCombo->window();
    60     AssertPtrReturnVoid(pParent);
    6158
    6259    /* Remember current item data to be able to restore it: */
     
    9390
    9491    /* Iterate through existing providers: */
    95     foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
     92    foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter))
    9693    {
    9794        /* Skip if we have nothing to populate (file missing?): */
     
    10097        /* Acquire provider name: */
    10198        QString strProviderName;
    102         if (!cloudProviderName(comProvider, strProviderName, pParent))
     99        if (!cloudProviderName(comProvider, strProviderName, pCenter))
    103100            continue;
    104101        /* Acquire provider short name: */
    105102        QString strProviderShortName;
    106         if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
     103        if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter))
    107104            continue;
    108105
     
    364361
    365362void UIWizardExportAppFormat::refreshProfileCombo(QIComboBox *pCombo,
     363                                                  UINotificationCenter *pCenter,
    366364                                                  const QString &strFormat,
    367365                                                  bool fIsFormatCloudOne)
     
    373371    if (fIsFormatCloudOne)
    374372    {
    375         /* We need top-level parent as well: */
    376         QWidget *pParent = pCombo->window();
    377         AssertPtrReturnVoid(pParent);
    378373        /* Acquire provider: */
    379         CCloudProvider comProvider = cloudProviderByShortName(strFormat, pParent);
     374        CCloudProvider comProvider = cloudProviderByShortName(strFormat, pCenter);
    380375        AssertReturnVoid(comProvider.isNotNull());
    381376
     
    392387
    393388        /* Iterate through existing profile names: */
    394         foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
     389        foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter))
    395390        {
    396391            /* Skip if we have nothing to populate (wtf happened?): */
     
    399394            /* Acquire profile name: */
    400395            QString strProfileName;
    401             if (!cloudProfileName(comProfile, strProfileName, pParent))
     396            if (!cloudProfileName(comProfile, strProfileName, pCenter))
    402397                continue;
    403398
     
    436431
    437432void UIWizardExportAppFormat::refreshCloudProfile(CCloudProfile &comCloudProfile,
     433                                                  UINotificationCenter *pCenter,
    438434                                                  const QString &strShortProviderName,
    439435                                                  const QString &strProfileName,
     
    442438    /* If format is cloud one: */
    443439    if (fIsFormatCloudOne)
    444         comCloudProfile = cloudProfileByName(strShortProviderName, strProfileName);
     440        comCloudProfile = cloudProfileByName(strShortProviderName, strProfileName, pCenter);
    445441    /* If format is local one: */
    446442    else
     
    990986{
    991987    /* Populate formats: */
    992     populateFormats(m_pFormatComboBox, m_fExportToOCIByDefault);
     988    populateFormats(m_pFormatComboBox, wizard()->notificationCenter(), m_fExportToOCIByDefault);
    993989    /* Populate MAC address policies: */
    994990    populateMACAddressPolicies(m_pMACComboBox);
     
    10661062    refreshManifestCheckBoxAccess(m_pManifestCheckbox, wizard()->isFormatCloudOne());
    10671063    refreshIncludeISOsCheckBoxAccess(m_pIncludeISOsCheckbox, wizard()->isFormatCloudOne());
    1068     refreshProfileCombo(m_pProfileComboBox, wizard()->format(), wizard()->isFormatCloudOne());
     1064    refreshProfileCombo(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->format(), wizard()->isFormatCloudOne());
    10691065    refreshCloudExportMode(m_exportModeButtons, wizard()->isFormatCloudOne());
    10701066
     
    11131109    /* Update export settings: */
    11141110    refreshCloudProfile(m_comCloudProfile,
     1111                        wizard()->notificationCenter(),
    11151112                        wizard()->format(),
    11161113                        wizard()->profileName(),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.h

    r92089 r92173  
    4545class QIToolButton;
    4646class UIEmptyFilePathSelector;
     47class UINotificationCenter;
    4748
    4849/** Format combo data fields. */
     
    6465{
    6566    /** Populates formats. */
    66     void populateFormats(QIComboBox *pCombo, bool fExportToOCIByDefault);
     67    void populateFormats(QIComboBox *pCombo, UINotificationCenter *pCenter, bool fExportToOCIByDefault);
    6768    /** Populates MAC address policies. */
    6869    void populateMACAddressPolicies(QIComboBox *pCombo);
     
    105106    /** Refresh profile combo. */
    106107    void refreshProfileCombo(QIComboBox *pCombo,
     108                             UINotificationCenter *pCenter,
    107109                             const QString &strFormat,
    108110                             bool fIsFormatCloudOne);
    109111    /** Refresh cloud profile. */
    110112    void refreshCloudProfile(CCloudProfile &comCloudProfile,
     113                             UINotificationCenter *pCenter,
    111114                             const QString &strShortProviderName,
    112115                             const QString &strProfileName,
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r92165 r92173  
    415415    /* Populate sources: */
    416416    populateSources(m_pSourceComboBox,
     417                    wizard()->notificationCenter(),
    417418                    m_fImportFromOCIByDefault,
    418419                    m_strSource);
     
    530531    /* Refresh cloud stuff: */
    531532    refreshProfileCombo(m_pProfileComboBox,
     533                        wizard()->notificationCenter(),
    532534                        source(m_pSourceComboBox),
    533535                        m_strProfileName,
     
    565567    /* Refresh profile instances: */
    566568    refreshCloudProfileInstances(m_pProfileInstanceList,
     569                                 wizard()->notificationCenter(),
    567570                                 source(m_pSourceComboBox),
    568571                                 profileName(m_pProfileComboBox),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp

    r92171 r92173  
    4949
    5050void UIWizardImportAppSource::populateSources(QIComboBox *pCombo,
     51                                              UINotificationCenter *pCenter,
    5152                                              bool fImportFromOCIByDefault,
    5253                                              const QString &strSource)
     
    5455    /* Sanity check: */
    5556    AssertPtrReturnVoid(pCombo);
    56     /* We need top-level parent as well: */
    57     QWidget *pParent = pCombo->window();
    58     AssertPtrReturnVoid(pParent);
    5957
    6058    /* Remember current item data to be able to restore it: */
     
    8987
    9088    /* Iterate through existing providers: */
    91     foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
     89    foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter))
    9290    {
    9391        /* Skip if we have nothing to populate (file missing?): */
     
    9694        /* Acquire provider name: */
    9795        QString strProviderName;
    98         if (!cloudProviderName(comProvider, strProviderName, pParent))
     96        if (!cloudProviderName(comProvider, strProviderName, pCenter))
    9997            continue;
    10098        /* Acquire provider short name: */
    10199        QString strProviderShortName;
    102         if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
     100        if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter))
    103101            continue;
    104102
     
    158156
    159157void UIWizardImportAppSource::refreshProfileCombo(QIComboBox *pCombo,
     158                                                  UINotificationCenter *pCenter,
    160159                                                  const QString &strSource,
    161160                                                  const QString &strProfileName,
     
    168167    if (fIsSourceCloudOne)
    169168    {
    170         /* We need top-level parent as well: */
    171         QWidget *pParent = pCombo->window();
    172         AssertPtrReturnVoid(pParent);
    173169        /* Acquire provider: */
    174         CCloudProvider comProvider = cloudProviderByShortName(strSource, pParent);
     170        CCloudProvider comProvider = cloudProviderByShortName(strSource, pCenter);
    175171        AssertReturnVoid(comProvider.isNotNull());
    176172
     
    189185
    190186        /* Iterate through existing profile names: */
    191         foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
     187        foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter))
    192188        {
    193189            /* Skip if we have nothing to populate (wtf happened?): */
     
    196192            /* Acquire profile name: */
    197193            QString strCurrentProfileName;
    198             if (!cloudProfileName(comProfile, strCurrentProfileName, pParent))
     194            if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter))
    199195                continue;
    200196
     
    233229
    234230void UIWizardImportAppSource::refreshCloudProfileInstances(QListWidget *pListWidget,
     231                                                           UINotificationCenter *pCenter,
    235232                                                           const QString &strSource,
    236233                                                           const QString &strProfileName,
     
    247244        AssertPtrReturnVoid(pParent);
    248245        /* Acquire client: */
    249         CCloudClient comClient = cloudClientByName(strSource, strProfileName, pParent);
     246        CCloudClient comClient = cloudClientByName(strSource, strProfileName, pCenter);
    250247        AssertReturnVoid(comClient.isNotNull());
    251248
     
    312309    AssertPtrReturnVoid(pWizard);
    313310    /* Acquire client: */
    314     CCloudClient comClient = cloudClientByName(strSource, strProfileName, pWizard);
     311    CCloudClient comClient = cloudClientByName(strSource, strProfileName, pWizard->notificationCenter());
    315312    AssertReturnVoid(comClient.isNotNull());
    316313
     
    694691    /* Populate sources: */
    695692    populateSources(m_pSourceComboBox,
     693                    wizard()->notificationCenter(),
    696694                    m_fImportFromOCIByDefault,
    697695                    m_strSource);
     
    767765                         wizard()->isSourceCloudOne());
    768766    refreshProfileCombo(m_pProfileComboBox,
     767                        wizard()->notificationCenter(),
    769768                        source(m_pSourceComboBox),
    770769                        m_strProfileName,
     
    782781    /* Refresh required settings: */
    783782    refreshCloudProfileInstances(m_pProfileInstanceList,
     783                                 wizard()->notificationCenter(),
    784784                                 source(m_pSourceComboBox),
    785785                                 profileName(m_pProfileComboBox),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.h

    r91966 r92173  
    3434class QIToolButton;
    3535class UIEmptyFilePathSelector;
     36class UINotificationCenter;
    3637class UIWizardImportApp;
    3738class CAppliance;
     
    5758    /** Populates sources. */
    5859    void populateSources(QIComboBox *pCombo,
     60                         UINotificationCenter *pCenter,
    5961                         bool fImportFromOCIByDefault,
    6062                         const QString &strSource);
     
    7173    /** Refresh profile combo. */
    7274    void refreshProfileCombo(QIComboBox *pCombo,
     75                             UINotificationCenter *pCenter,
    7376                             const QString &strSource,
    7477                             const QString &strProfileName,
     
    7679    /** Refresh profile instances. */
    7780    void refreshCloudProfileInstances(QListWidget *pListWidget,
     81                                      UINotificationCenter *pCenter,
    7882                                      const QString &strSource,
    7983                                      const QString &strProfileName,
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r92165 r92173  
    244244    m_pFormEditor->setNotificationCenter(wizard()->notificationCenter());
    245245    /* Populate providers: */
    246     populateProviders(m_pProviderComboBox);
     246    populateProviders(m_pProviderComboBox, wizard()->notificationCenter());
    247247    /* Translate providers: */
    248248    retranslateUi();
     
    314314
    315315    /* Update profiles: */
    316     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     316    populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName());
    317317    sltHandleProfileComboChange();
    318318
     
    325325    /* Update wizard fields: */
    326326    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    327     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     327    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()->notificationCenter()));
    328328
    329329    /* Update source: */
     
    354354    /* Update source image & VSD form: */
    355355    m_strSourceImageId = currentListWidgetData(m_pSourceImageList);
    356     wizard()->setVSD(createVirtualSystemDescription(wizard()));
     356    wizard()->setVSD(createVirtualSystemDescription(wizard()->notificationCenter()));
    357357    populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId);
    358358    wizard()->createVSDForm();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r92036 r92173  
    4646*********************************************************************************************************************************/
    4747
    48 void UIWizardNewCloudVMSource::populateProviders(QIComboBox *pCombo)
     48void UIWizardNewCloudVMSource::populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter)
    4949{
    5050    /* Sanity check: */
    5151    AssertPtrReturnVoid(pCombo);
    52     /* We need top-level parent as well: */
    53     QWidget *pParent = pCombo->window();
    54     AssertPtrReturnVoid(pParent);
    5552
    5653    /* Remember current item data to be able to restore it: */
     
    6966
    7067    /* Iterate through existing providers: */
    71     foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
     68    foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter))
    7269    {
    7370        /* Skip if we have nothing to populate (file missing?): */
     
    7673        /* Acquire provider name: */
    7774        QString strProviderName;
    78         if (!cloudProviderName(comProvider, strProviderName, pParent))
     75        if (!cloudProviderName(comProvider, strProviderName, pCenter))
    7976            continue;
    8077        /* Acquire provider short name: */
    8178        QString strProviderShortName;
    82         if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
     79        if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter))
    8380            continue;
    8481
     
    105102
    106103void UIWizardNewCloudVMSource::populateProfiles(QIComboBox *pCombo,
     104                                                UINotificationCenter *pCenter,
    107105                                                const QString &strProviderShortName,
    108106                                                const QString &strProfileName)
     
    110108    /* Sanity check: */
    111109    AssertPtrReturnVoid(pCombo);
    112     /* We need top-level parent as well: */
    113     QWidget *pParent = pCombo->window();
    114     AssertPtrReturnVoid(pParent);
    115110    /* Acquire provider: */
    116     CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pParent);
     111    CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pCenter);
    117112    AssertReturnVoid(comProvider.isNotNull());
    118113
     
    131126
    132127    /* Iterate through existing profiles: */
    133     foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
     128    foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter))
    134129    {
    135130        /* Skip if we have nothing to populate (wtf happened?): */
     
    138133        /* Acquire current profile name: */
    139134        QString strCurrentProfileName;
    140         if (!cloudProfileName(comProfile, strCurrentProfileName, pParent))
     135        if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter))
    141136            continue;
    142137
     
    489484{
    490485    /* Populate providers: */
    491     populateProviders(m_pProviderComboBox);
     486    populateProviders(m_pProviderComboBox, wizard()->notificationCenter());
    492487    /* Translate providers: */
    493488    retranslateUi();
     
    517512
    518513    /* Populate vsd and form properties: */
    519     wizard()->setVSD(createVirtualSystemDescription(wizard()));
     514    wizard()->setVSD(createVirtualSystemDescription(wizard()->notificationCenter()));
    520515    populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId);
    521516    wizard()->createVSDForm();
     
    538533
    539534    /* Update profiles: */
    540     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     535    populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName());
    541536    sltHandleProfileComboChange();
    542537
     
    549544    /* Update wizard fields: */
    550545    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    551     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     546    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()->notificationCenter()));
    552547
    553548    /* Update source: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h

    r92036 r92173  
    3737class QIRichTextLabel;
    3838class QIToolButton;
     39class UINotificationCenter;
    3940class UIWizardNewCloudVM;
    4041class CCloudClient;
     
    5859{
    5960    /** Populates @a pCombo with known providers. */
    60     void populateProviders(QIComboBox *pCombo);
     61    void populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter);
    6162    /** Populates @a pCombo with known profiles.
    6263      * @param  strProviderShortName  Brings the short name of provider profiles related to.
    6364      * @param  strProfileName        Brings the name of profile to be chosen by default. */
    6465    void populateProfiles(QIComboBox *pCombo,
     66                          UINotificationCenter *pCenter,
    6567                          const QString &strProviderShortName,
    6668                          const QString &strProfileName);
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