VirtualBox

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


Ignore:
Timestamp:
Apr 30, 2020 10:50:00 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: UICloudNetworkingStuff: Handle progress canceling for few known cases.

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

Legend:

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

    r84056 r84099  
    525525                                        strMachineName,
    526526                                        ":/progress_settings_90px.png", pParent, 0);
     527    if (comProgress.GetCanceled())
     528        return false;
    527529    if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    528530    {
     
    553555    /* Wait for "Get settings form" progress: */
    554556    comProgress.WaitForCompletion(-1);
     557    if (comProgress.GetCanceled())
     558        return false;
    555559    if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    556560    {
     
    625629        else
    626630            comProgress.WaitForCompletion(-1);
    627         if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     631        if (!comProgress.GetCanceled())
    628632        {
    629             if (pParent)
    630                 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);
     633            if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     634            {
     635                if (pParent)
     636                    msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);
     637                else
     638                    strErrorMessage = UIErrorString::formatErrorInfo(comProgress);
     639            }
    631640            else
    632                 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);
    633         }
    634         else
    635         {
    636             /* Fetch acquired objects to map: */
    637             const QVector<QString> instanceIds = comIDs.GetValues();
    638             const QVector<QString> instanceNames = comNames.GetValues();
    639             QMap<QString, QString> resultMap;
    640             for (int i = 0; i < instanceIds.size(); ++i)
    641                 resultMap[instanceIds.at(i)] = instanceNames.at(i);
    642             return resultMap;
     641            {
     642                /* Fetch acquired objects to map: */
     643                const QVector<QString> instanceIds = comIDs.GetValues();
     644                const QVector<QString> instanceNames = comNames.GetValues();
     645                QMap<QString, QString> resultMap;
     646                for (int i = 0; i < instanceIds.size(); ++i)
     647                    resultMap[instanceIds.at(i)] = instanceNames.at(i);
     648                return resultMap;
     649            }
    643650        }
    644651    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h

    r84056 r84099  
    2727/* COM includes: */
    2828#include "COMEnums.h"
     29#include "CCloudClient.h"
     30#include "CCloudMachine.h"
    2931#include "CCloudProfile.h"
    3032#include "CCloudProvider.h"
    3133#include "CCloudProviderManager.h"
    32 #include "CCloudClient.h"
    33 #include "CCloudMachine.h"
    3434#include "CForm.h"
    3535
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