Changeset 91150 in vbox
- Timestamp:
- Sep 8, 2021 12:56:22 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
-
UICloudNetworkingStuff.cpp (modified) (3 diffs)
-
UICloudNetworkingStuff.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r91145 r91150 176 176 } 177 177 178 CCloudClient UICloudNetworkingStuff::cloudClient(CCloudProfile comProfile, 179 QWidget *pParent /* = 0 */) 180 { 181 /* Create cloud client: */ 182 CCloudClient comClient = comProfile.CreateCloudClient(); 183 if (!comProfile.isOk()) 184 msgCenter().cannotCreateCloudClient(comProfile, pParent); 185 else 186 return comClient; 187 /* Null by default: */ 188 return CCloudClient(); 189 } 190 191 CCloudClient UICloudNetworkingStuff::cloudClient(CCloudProfile comProfile, 192 QString &strErrorMessage) 193 { 194 /* Create cloud client: */ 195 CCloudClient comClient = comProfile.CreateCloudClient(); 196 if (!comProfile.isOk()) 197 strErrorMessage = UIErrorString::formatErrorInfo(comProfile); 198 else 199 return comClient; 200 /* Null by default: */ 201 return CCloudClient(); 202 } 203 178 204 CCloudClient UICloudNetworkingStuff::cloudClientByName(const QString &strProviderShortName, 179 205 const QString &strProfileName, … … 183 209 CCloudProfile comProfile = cloudProfileByName(strProviderShortName, strProfileName, pParent); 184 210 if (comProfile.isNotNull()) 185 { 186 /* Create cloud client: */ 187 CCloudClient comClient = comProfile.CreateCloudClient(); 188 if (!comProfile.isOk()) 189 msgCenter().cannotAcquireCloudProfileParameter(comProfile, pParent); 190 else 191 return comClient; 192 } 211 return cloudClient(comProfile, pParent); 193 212 /* Null by default: */ 194 213 return CCloudClient(); … … 202 221 CCloudProfile comProfile = cloudProfileByName(strProviderShortName, strProfileName, strErrorMessage); 203 222 if (comProfile.isNotNull()) 204 { 205 /* Create cloud client: */ 206 CCloudClient comClient = comProfile.CreateCloudClient(); 207 if (!comProfile.isOk()) 208 strErrorMessage = UIErrorString::formatErrorInfo(comProfile); 209 else 210 return comClient; 211 } 223 return cloudClient(comProfile, strErrorMessage); 212 224 /* Null by default: */ 213 225 return CCloudClient(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r89998 r91150 69 69 const QString &strProfileName, 70 70 QString &strErrorMessage); 71 /** Acquires cloud client created for @a comProfile, 72 * using @a pParent to show messages according to. */ 73 SHARED_LIBRARY_STUFF CCloudClient cloudClient(CCloudProfile comProfile, 74 QWidget *pParent = 0); 75 /** Acquires cloud client created for @a comProfile, 76 * using @a strErrorMessage to store messages to. */ 77 SHARED_LIBRARY_STUFF CCloudClient cloudClient(CCloudProfile comProfile, 78 QString &strErrorMessage); 71 79 /** Acquires cloud client specified by @a strProviderShortName and @a strProfileName, 72 80 * using @a pParent to show messages according to. */
Note:
See TracChangeset
for help on using the changeset viewer.

