VirtualBox

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


Ignore:
Timestamp:
Apr 28, 2020 3:52:06 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137629
Message:

FE/Qt: bugref:9653: UICloudNetworkingStuff: Rework to accept parent being specified where wasn't possible.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp

    r84035 r84051  
    3232
    3333
    34 CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager()
     34CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager(QWidget *pParent /* = 0 */)
    3535{
    3636    /* Acquire VBox: */
     
    4141        CCloudProviderManager comProviderManager = comVBox.GetCloudProviderManager();
    4242        if (!comVBox.isOk())
    43             msgCenter().cannotAcquireCloudProviderManager(comVBox);
     43            msgCenter().cannotAcquireCloudProviderManager(comVBox, pParent);
    4444        else
    4545            return comProviderManager;
     
    4949}
    5050
    51 CCloudProvider UICloudNetworkingStuff::cloudProviderByShortName(const QString &strProviderShortName)
     51CCloudProvider UICloudNetworkingStuff::cloudProviderByShortName(const QString &strProviderShortName,
     52                                                                QWidget *pParent /* = 0 */)
    5253{
    5354    /* Acquire cloud provider manager: */
    54     CCloudProviderManager comProviderManager = cloudProviderManager();
     55    CCloudProviderManager comProviderManager = cloudProviderManager(pParent);
    5556    if (comProviderManager.isNotNull())
    5657    {
     
    5859        CCloudProvider comProvider = comProviderManager.GetProviderByShortName(strProviderShortName);
    5960        if (!comProviderManager.isOk())
    60             msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager);
     61            msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);
    6162        else
    6263            return comProvider;
     
    6768
    6869CCloudProfile UICloudNetworkingStuff::cloudProfileByName(const QString &strProviderShortName,
    69                                                          const QString &strProfileName)
     70                                                         const QString &strProfileName,
     71                                                         QWidget *pParent /* = 0 */)
    7072{
    7173    /* Acquire cloud provider: */
    72     CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName);
     74    CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pParent);
    7375    if (comProvider.isNotNull())
    7476    {
     
    7678        CCloudProfile comProfile = comProvider.GetProfileByName(strProfileName);
    7779        if (!comProvider.isOk())
    78             msgCenter().cannotAcquireCloudProviderParameter(comProvider);
     80            msgCenter().cannotAcquireCloudProviderParameter(comProvider, pParent);
    7981        else
    8082            return comProfile;
     
    8587
    8688CCloudClient UICloudNetworkingStuff::cloudClientByName(const QString &strProviderShortName,
    87                                                        const QString &strProfileName)
     89                                                       const QString &strProfileName,
     90                                                       QWidget *pParent /* = 0 */)
    8891{
    8992    /* Acquire cloud profile: */
    90     CCloudProfile comProfile = cloudProfileByName(strProviderShortName, strProfileName);
     93    CCloudProfile comProfile = cloudProfileByName(strProviderShortName, strProfileName, pParent);
    9194    if (comProfile.isNotNull())
    9295    {
     
    9497        CCloudClient comClient = comProfile.CreateCloudClient();
    9598        if (!comProfile.isOk())
    96             msgCenter().cannotAcquireCloudProfileParameter(comProfile);
     99            msgCenter().cannotAcquireCloudProfileParameter(comProfile, pParent);
    97100        else
    98101            return comClient;
     
    104107CCloudMachine UICloudNetworkingStuff::cloudMachineById(const QString &strProviderShortName,
    105108                                                       const QString &strProfileName,
    106                                                        const QUuid &uMachineId)
     109                                                       const QUuid &uMachineId,
     110                                                       QWidget *pParent /* = 0 */)
    107111{
    108112    /* Acquire cloud client: */
    109     CCloudClient comClient = cloudClientByName(strProviderShortName, strProfileName);
     113    CCloudClient comClient = cloudClientByName(strProviderShortName, strProfileName, pParent);
    110114    if (comClient.isNotNull())
    111115    {
     
    113117        CCloudMachine comMachine = comClient.GetCloudMachine(uMachineId);
    114118        if (!comClient.isOk())
    115             msgCenter().cannotAcquireCloudClientParameter(comClient);
     119            msgCenter().cannotAcquireCloudClientParameter(comClient, pParent);
    116120        else
    117121            return comMachine;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h

    r84035 r84051  
    3737namespace UICloudNetworkingStuff
    3838{
    39     /** Acquires cloud provider manager. */
    40     SHARED_LIBRARY_STUFF CCloudProviderManager cloudProviderManager();
    41     /** Acquires cloud provider specified by @a strProviderShortName. */
    42     SHARED_LIBRARY_STUFF CCloudProvider cloudProviderByShortName(const QString &strProviderShortName);
    43     /** Acquires cloud profile specified by @a strProviderShortName and @a strProfileName. */
     39    /** Acquires cloud provider manager,
     40      * using @a pParent to show messages according to. */
     41    SHARED_LIBRARY_STUFF CCloudProviderManager cloudProviderManager(QWidget *pParent = 0);
     42    /** Acquires cloud provider specified by @a strProviderShortName,
     43      * using @a pParent to show messages according to. */
     44    SHARED_LIBRARY_STUFF CCloudProvider cloudProviderByShortName(const QString &strProviderShortName,
     45                                                                 QWidget *pParent = 0);
     46    /** Acquires cloud profile specified by @a strProviderShortName and @a strProfileName,
     47      * using @a pParent to show messages according to. */
    4448    SHARED_LIBRARY_STUFF CCloudProfile cloudProfileByName(const QString &strProviderShortName,
    45                                                           const QString &strProfileName);
    46     /** Acquires cloud client specified by @a strProviderShortName and @a strProfileName. */
     49                                                          const QString &strProfileName,
     50                                                          QWidget *pParent = 0);
     51    /** Acquires cloud client specified by @a strProviderShortName and @a strProfileName,
     52      * using @a pParent to show messages according to. */
    4753    SHARED_LIBRARY_STUFF CCloudClient cloudClientByName(const QString &strProviderShortName,
    48                                                         const QString &strProfileName);
    49     /** Acquires cloud machine specified by @a strProviderShortName, @a strProfileName and @a uMachineId. */
     54                                                        const QString &strProfileName,
     55                                                        QWidget *pParent = 0);
     56    /** Acquires cloud machine specified by @a strProviderShortName, @a strProfileName and @a uMachineId,
     57      * using @a pParent to show messages according to. */
    5058    SHARED_LIBRARY_STUFF CCloudMachine cloudMachineById(const QString &strProviderShortName,
    5159                                                        const QString &strProfileName,
    52                                                         const QUuid &uMachineId);
     60                                                        const QUuid &uMachineId,
     61                                                        QWidget *pParent = 0);
    5362
    5463    /** Acquires cloud machines of certain @a comCloudClient, using @a pParent to show messages according to. */
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