- Timestamp:
- Nov 2, 2021 9:43:08 AM (3 years ago)
- 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 271 271 272 272 /* Look for corresponding provider: */ 273 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName , this);273 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName); 274 274 if (comCloudProvider.isNotNull()) 275 275 { … … 279 279 280 280 /* Look for corresponding profile: */ 281 CCloudProfile comCloudProfile = cloudProfileByName(strShortName, oldData.m_strName , this);281 CCloudProfile comCloudProfile = cloudProfileByName(strShortName, oldData.m_strName); 282 282 if (comCloudProfile.isNotNull()) 283 283 { … … 355 355 356 356 /* Look for corresponding provider: */ 357 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName , this);357 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName); 358 358 if (comCloudProvider.isNotNull()) 359 359 { … … 392 392 393 393 /* Look for corresponding provider: */ 394 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName , this);394 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName); 395 395 if (comCloudProvider.isNotNull()) 396 396 { … … 424 424 425 425 /* Look for corresponding provider: */ 426 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName , this);426 CCloudProvider comCloudProvider = cloudProviderByShortName(strShortName); 427 427 if (comCloudProvider.isNotNull()) 428 428 { 429 429 /* Look for corresponding profile: */ 430 CCloudProfile comCloudProfile = cloudProfileByName(strShortName, strProfileName , this);430 CCloudProfile comCloudProfile = cloudProfileByName(strShortName, strProfileName); 431 431 if (comCloudProfile.isNotNull()) 432 432 { … … 801 801 /* Gather provider settings: */ 802 802 if (comProvider.isOk()) 803 cloudProviderId(comProvider, providerData.m_uId , this);803 cloudProviderId(comProvider, providerData.m_uId); 804 804 if (comProvider.isOk()) 805 805 cloudProviderShortName(comProvider, providerData.m_strShortName); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r92172 r92173 32 32 33 33 34 CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager( QWidget*pParent /* = 0 */)34 CCloudProviderManager UICloudNetworkingStuff::cloudProviderManager(UINotificationCenter *pParent /* = 0 */) 35 35 { 36 36 /* Acquire VBox: */ … … 41 41 CCloudProviderManager comProviderManager = comVBox.GetCloudProviderManager(); 42 42 if (!comVBox.isOk()) 43 msgCenter().cannotAcquireCloudProviderManager(comVBox, pParent);43 UINotificationMessage::cannotAcquireVirtualBoxParameter(comVBox, pParent); 44 44 else 45 45 return comProviderManager; … … 67 67 68 68 CCloudProvider UICloudNetworkingStuff::cloudProviderByShortName(const QString &strProviderShortName, 69 QWidget*pParent /* = 0 */)69 UINotificationCenter *pParent /* = 0 */) 70 70 { 71 71 /* Acquire cloud provider manager: */ … … 76 76 CCloudProvider comProvider = comProviderManager.GetProviderByShortName(strProviderShortName); 77 77 if (!comProviderManager.isOk()) 78 msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);78 UINotificationMessage::cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent); 79 79 else 80 80 return comProvider; … … 104 104 CCloudProfile UICloudNetworkingStuff::cloudProfileByName(const QString &strProviderShortName, 105 105 const QString &strProfileName, 106 QWidget*pParent /* = 0 */)106 UINotificationCenter *pParent /* = 0 */) 107 107 { 108 108 /* Acquire cloud provider: */ … … 113 113 CCloudProfile comProfile = comProvider.GetProfileByName(strProfileName); 114 114 if (!comProvider.isOk()) 115 msgCenter().cannotFindCloudProfile(comProvider, strProfileName, pParent);115 UINotificationMessage::cannotAcquireCloudProviderParameter(comProvider, pParent); 116 116 else 117 117 return comProfile; … … 141 141 142 142 CCloudClient UICloudNetworkingStuff::cloudClient(CCloudProfile comProfile, 143 QWidget*pParent /* = 0 */)143 UINotificationCenter *pParent /* = 0 */) 144 144 { 145 145 /* Create cloud client: */ 146 146 CCloudClient comClient = comProfile.CreateCloudClient(); 147 147 if (!comProfile.isOk()) 148 msgCenter().cannotCreateCloudClient(comProfile, pParent);148 UINotificationMessage::cannotCreateCloudClient(comProfile, pParent); 149 149 else 150 150 return comClient; … … 168 168 CCloudClient UICloudNetworkingStuff::cloudClientByName(const QString &strProviderShortName, 169 169 const QString &strProfileName, 170 QWidget*pParent /* = 0 */)170 UINotificationCenter *pParent /* = 0 */) 171 171 { 172 172 /* Acquire cloud profile: */ … … 190 190 } 191 191 192 CVirtualSystemDescription UICloudNetworkingStuff::createVirtualSystemDescription( QWidget*pParent /* = 0 */)192 CVirtualSystemDescription UICloudNetworkingStuff::createVirtualSystemDescription(UINotificationCenter *pParent /* = 0 */) 193 193 { 194 194 /* Acquire VBox: */ … … 199 199 CAppliance comAppliance = comVBox.CreateAppliance(); 200 200 if (!comVBox.isOk()) 201 msgCenter().cannotCreateAppliance(comVBox, pParent);201 UINotificationMessage::cannotCreateAppliance(comVBox, pParent); 202 202 else 203 203 { … … 205 205 comAppliance.CreateVirtualSystemDescriptions(1); 206 206 if (!comAppliance.isOk()) 207 msgCenter().cannotCreateVirtualSystemDescription(comAppliance, pParent);207 UINotificationMessage::cannotCreateVirtualSystemDescription(comAppliance, pParent); 208 208 else 209 209 { … … 219 219 } 220 220 221 QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders( QWidget*pParent /* = 0 */)221 QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders(UINotificationCenter *pParent /* = 0 */) 222 222 { 223 223 /* Acquire cloud provider manager: */ 224 CCloudProviderManager comProviderManager = cloudProviderManager( );224 CCloudProviderManager comProviderManager = cloudProviderManager(pParent); 225 225 if (comProviderManager.isNotNull()) 226 226 { … … 228 228 QVector<CCloudProvider> providers = comProviderManager.GetProviders(); 229 229 if (!comProviderManager.isOk()) 230 msgCenter().cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent);230 UINotificationMessage::cannotAcquireCloudProviderManagerParameter(comProviderManager, pParent); 231 231 else 232 232 return providers; … … 238 238 bool UICloudNetworkingStuff::cloudProviderId(const CCloudProvider &comCloudProvider, 239 239 QUuid &uResult, 240 QWidget*pParent /* = 0 */)240 UINotificationCenter *pParent /* = 0 */) 241 241 { 242 242 const QUuid uId = comCloudProvider.GetId(); 243 243 if (!comCloudProvider.isOk()) 244 msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);244 UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent); 245 245 else 246 246 { … … 253 253 bool UICloudNetworkingStuff::cloudProviderShortName(const CCloudProvider &comCloudProvider, 254 254 QString &strResult, 255 QWidget*pParent /* = 0 */)255 UINotificationCenter *pParent /* = 0 */) 256 256 { 257 257 const QString strShortName = comCloudProvider.GetShortName(); 258 258 if (!comCloudProvider.isOk()) 259 msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);259 UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent); 260 260 else 261 261 { … … 268 268 bool UICloudNetworkingStuff::cloudProviderName(const CCloudProvider &comCloudProvider, 269 269 QString &strResult, 270 QWidget*pParent /* = 0 */)270 UINotificationCenter *pParent /* = 0 */) 271 271 { 272 272 const QString strName = comCloudProvider.GetName(); 273 273 if (!comCloudProvider.isOk()) 274 msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);274 UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent); 275 275 else 276 276 { … … 282 282 283 283 QVector<CCloudProfile> UICloudNetworkingStuff::listCloudProfiles(CCloudProvider comCloudProvider, 284 QWidget*pParent /* = 0 */)284 UINotificationCenter *pParent /* = 0 */) 285 285 { 286 286 /* Check cloud provider: */ … … 290 290 QVector<CCloudProfile> profiles = comCloudProvider.GetProfiles(); 291 291 if (!comCloudProvider.isOk()) 292 msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent);292 UINotificationMessage::cannotAcquireCloudProviderParameter(comCloudProvider, pParent); 293 293 else 294 294 return profiles; … … 300 300 bool UICloudNetworkingStuff::cloudProfileName(const CCloudProfile &comCloudProfile, 301 301 QString &strResult, 302 QWidget*pParent /* = 0 */)302 UINotificationCenter *pParent /* = 0 */) 303 303 { 304 304 const QString strName = comCloudProfile.GetName(); 305 305 if (!comCloudProfile.isOk()) 306 msgCenter().cannotAcquireCloudProfileParameter(comCloudProfile, pParent);306 UINotificationMessage::cannotAcquireCloudProfileParameter(comCloudProfile, pParent); 307 307 else 308 308 { … … 316 316 QVector<QString> &keys, 317 317 QVector<QString> &values, 318 QWidget*pParent /* = 0 */)318 UINotificationCenter *pParent /* = 0 */) 319 319 { 320 320 QVector<QString> aKeys; … … 322 322 aValues = comCloudProfile.GetProperties(QString(), aKeys); 323 323 if (!comCloudProfile.isOk()) 324 msgCenter().cannotAcquireCloudProfileParameter(comCloudProfile, pParent);324 UINotificationMessage::cannotAcquireCloudProfileParameter(comCloudProfile, pParent); 325 325 else 326 326 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r92172 r92173 24 24 /* GUI includes: */ 25 25 #include "UILibraryDefs.h" 26 #include "UINotificationCenter.h" 26 27 27 28 /* COM includes: */ … … 39 40 /** Acquires cloud provider manager, 40 41 * 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); 42 43 /** Acquires cloud provider manager, 43 44 * using @a strErrorMessage to store messages to. */ … … 46 47 * using @a pParent to show messages according to. */ 47 48 SHARED_LIBRARY_STUFF CCloudProvider cloudProviderByShortName(const QString &strProviderShortName, 48 QWidget*pParent = 0);49 UINotificationCenter *pParent = 0); 49 50 /** Acquires cloud provider specified by @a strProviderShortName, 50 51 * using @a strErrorMessage to store messages to. */ … … 55 56 SHARED_LIBRARY_STUFF CCloudProfile cloudProfileByName(const QString &strProviderShortName, 56 57 const QString &strProfileName, 57 QWidget*pParent = 0);58 UINotificationCenter *pParent = 0); 58 59 /** Acquires cloud profile specified by @a strProviderShortName and @a strProfileName, 59 60 * using @a strErrorMessage to store messages to. */ … … 64 65 * using @a pParent to show messages according to. */ 65 66 SHARED_LIBRARY_STUFF CCloudClient cloudClient(CCloudProfile comProfile, 66 QWidget*pParent = 0);67 UINotificationCenter *pParent = 0); 67 68 /** Acquires cloud client created for @a comProfile, 68 69 * using @a strErrorMessage to store messages to. */ … … 73 74 SHARED_LIBRARY_STUFF CCloudClient cloudClientByName(const QString &strProviderShortName, 74 75 const QString &strProfileName, 75 QWidget*pParent = 0);76 UINotificationCenter *pParent = 0); 76 77 /** Acquires cloud client specified by @a strProviderShortName and @a strProfileName, 77 78 * using @a strErrorMessage to store messages to. */ … … 81 82 82 83 /** 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); 84 85 85 86 /** 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); 87 88 88 89 /** Acquires @a comCloudProvider ID as a @a uResult, using @a pParent to show messages according to. */ 89 90 SHARED_LIBRARY_STUFF bool cloudProviderId(const CCloudProvider &comCloudProvider, 90 91 QUuid &uResult, 91 QWidget*pParent = 0);92 UINotificationCenter *pParent = 0); 92 93 /** Acquires @a comCloudProvider short name as a @a strResult, using @a pParent to show messages according to. */ 93 94 SHARED_LIBRARY_STUFF bool cloudProviderShortName(const CCloudProvider &comCloudProvider, 94 95 QString &strResult, 95 QWidget*pParent = 0);96 UINotificationCenter *pParent = 0); 96 97 /** Acquires @a comCloudProvider name as a @a strResult, using @a pParent to show messages according to. */ 97 98 SHARED_LIBRARY_STUFF bool cloudProviderName(const CCloudProvider &comCloudProvider, 98 99 QString &strResult, 99 QWidget*pParent = 0);100 UINotificationCenter *pParent = 0); 100 101 101 102 /** Acquires cloud profiles of certain @a comCloudProvider, using @a pParent to show messages according to. */ 102 103 SHARED_LIBRARY_STUFF QVector<CCloudProfile> listCloudProfiles(CCloudProvider comCloudProvider, 103 QWidget*pParent = 0);104 UINotificationCenter *pParent = 0); 104 105 105 106 /** Acquires @a comCloudProfile name as a @a strResult, using @a pParent to show messages according to. */ 106 107 SHARED_LIBRARY_STUFF bool cloudProfileName(const CCloudProfile &comCloudProfile, 107 108 QString &strResult, 108 QWidget*pParent = 0);109 UINotificationCenter *pParent = 0); 109 110 /** Acquires @a comCloudProfile properties as a @a keys/values using @a pParent to show messages according to. */ 110 111 SHARED_LIBRARY_STUFF bool cloudProfileProperties(const CCloudProfile &comCloudProfile, 111 112 QVector<QString> &keys, 112 113 QVector<QString> &values, 113 QWidget*pParent = 0);114 UINotificationCenter *pParent = 0); 114 115 115 116 /** 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 1414 1414 } 1415 1415 1416 void UIMessageCenter::cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const1417 {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 */) const1424 {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 */) const1431 {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 */) const1438 {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 */) const1445 {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 */) const1452 {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 */) const1459 {1460 error(pParent, MessageType_Error,1461 tr("Failed to acquire cloud profile parameter."),1462 UIErrorString::formatErrorInfo(comProfile));1463 }1464 1465 1416 void UIMessageCenter::cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const 1466 1417 { … … 1993 1944 tr("Continue", "no hard disk attached"), 1994 1945 tr("Go Back", "no hard disk attached")); 1995 }1996 1997 void UIMessageCenter::cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const1998 {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 */) const2004 {2005 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"),2006 UIErrorString::formatErrorInfo(comAppliance));2007 1946 } 2008 1947 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r92151 r92173 377 377 /** @name VirtualBox Manager / Cloud networking warnings. 378 378 * @{ */ 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;386 379 void cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent = 0) const; 387 380 void cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent = 0) const; … … 449 442 /// @todo move to notification-center after wizards get theirs.. :) 450 443 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;453 444 bool confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent = 0) const; 454 445 bool confirmOverridingFile(const QString &strPath, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r92151 r92173 41 41 #include "CCloudProfile.h" 42 42 #include "CCloudProvider.h" 43 #include "CCloudProviderManager.h" 43 44 #include "CConsole.h" 44 45 #include "CDHCPServer.h" … … 574 575 575 576 /* static */ 576 void UINotificationMessage::cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox) 577 void UINotificationMessage::cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox, 578 UINotificationCenter *pParent /* = 0 */) 577 579 { 578 580 createMessage( 579 581 QApplication::translate("UIMessageCenter", "VirtualBox failure ..."), 580 582 QApplication::translate("UIMessageCenter", "Failed to acquire VirtualBox parameter.") + 581 UIErrorString::formatErrorInfo(comVBox)); 583 UIErrorString::formatErrorInfo(comVBox), 584 QString(), QString(), pParent); 582 585 } 583 586 … … 709 712 QApplication::translate("UIMessageCenter", "Failed to acquire virtual system description form parameter.") + 710 713 UIErrorString::formatErrorInfo(comVsdForm), 714 QString(), QString(), pParent); 715 } 716 717 /* static */ 718 void 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 */ 729 void 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 */ 740 void 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), 711 747 QString(), QString(), pParent); 712 748 } … … 992 1028 993 1029 /* static */ 1030 void 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 */ 994 1040 void UINotificationMessage::cannotOpenExtPack(const CExtPackManager &comExtPackManager, const QString &strFilename) 995 1041 { … … 1122 1168 QApplication::translate("UIMessageCenter", "Failed to refresh cloud machine.") + 1123 1169 UIErrorString::formatErrorInfo(comProgress)); 1170 } 1171 1172 /* static */ 1173 void 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); 1124 1180 } 1125 1181 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r92151 r92173 52 52 class UINotificationCenter; 53 53 class CAudioAdapter; 54 class CCloudProviderManager; 55 class CCloudProvider; 56 class CCloudProfile; 54 57 class CEmulatedUSB; 55 58 class CNetworkAdapter; … … 250 253 /** Notifies about inability to acquire IVirtualBox parameter. 251 254 * @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); 253 257 /** Notifies about inability to acquire IAppliance parameter. 254 258 * @param comVBox Brings the object parameter get acquired from. */ … … 295 299 static void cannotAcquireVirtualSystemDescriptionFormParameter(const CVirtualSystemDescriptionForm &comVsdForm, 296 300 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); 297 313 298 314 /** Notifies about inability to change IMedium parameter. … … 393 409 * @param comAppliance Brings appliance we are trying to interpret. */ 394 410 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); 395 414 396 415 /** Notifies about inability to open extension pack. … … 445 464 * @param comProgress Brings the progress of machine being refreshed. */ 446 465 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); 447 469 448 470 /** Notifies about inability to open machine. -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp
r92033 r92173 170 170 { 171 171 /* Populate providers: */ 172 populateProviders(m_pProviderComboBox );172 populateProviders(m_pProviderComboBox, wizard()->notificationCenter()); 173 173 /* Translate providers: */ 174 174 retranslateUi(); … … 214 214 215 215 /* Update profiles: */ 216 populateProfiles(m_pProfileComboBox, wizard()-> providerShortName(), wizard()->profileName());216 populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName()); 217 217 sltHandleProfileComboChange(); 218 218 … … 225 225 /* Update wizard fields: */ 226 226 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())); 228 228 229 229 /* Update profile instances: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.cpp
r92033 r92173 45 45 *********************************************************************************************************************************/ 46 46 47 void UIWizardAddCloudVMSource::populateProviders(QIComboBox *pCombo )47 void UIWizardAddCloudVMSource::populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter) 48 48 { 49 49 /* Sanity check: */ 50 50 AssertPtrReturnVoid(pCombo); 51 /* We need top-level parent as well: */52 QWidget *pParent = pCombo->window();53 AssertPtrReturnVoid(pParent);54 51 55 52 /* Remember current item data to be able to restore it: */ … … 68 65 69 66 /* Iterate through existing providers: */ 70 foreach (const CCloudProvider &comProvider, listCloudProviders(p Parent))67 foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter)) 71 68 { 72 69 /* Skip if we have nothing to populate (file missing?): */ … … 75 72 /* Acquire provider name: */ 76 73 QString strProviderName; 77 if (!cloudProviderName(comProvider, strProviderName, p Parent))74 if (!cloudProviderName(comProvider, strProviderName, pCenter)) 78 75 continue; 79 76 /* Acquire provider short name: */ 80 77 QString strProviderShortName; 81 if (!cloudProviderShortName(comProvider, strProviderShortName, p Parent))78 if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter)) 82 79 continue; 83 80 … … 104 101 105 102 void UIWizardAddCloudVMSource::populateProfiles(QIComboBox *pCombo, 103 UINotificationCenter *pCenter, 106 104 const QString &strProviderShortName, 107 105 const QString &strProfileName) … … 109 107 /* Sanity check: */ 110 108 AssertPtrReturnVoid(pCombo); 111 /* We need top-level parent as well: */112 QWidget *pParent = pCombo->window();113 AssertPtrReturnVoid(pParent);114 109 /* Acquire provider: */ 115 CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, p Parent);110 CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pCenter); 116 111 AssertReturnVoid(comProvider.isNotNull()); 117 112 … … 130 125 131 126 /* Iterate through existing profiles: */ 132 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, p Parent))127 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter)) 133 128 { 134 129 /* Skip if we have nothing to populate (wtf happened?): */ … … 137 132 /* Acquire current profile name: */ 138 133 QString strCurrentProfileName; 139 if (!cloudProfileName(comProfile, strCurrentProfileName, p Parent))134 if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter)) 140 135 continue; 141 136 … … 422 417 { 423 418 /* Populate providers: */ 424 populateProviders(m_pProviderComboBox );419 populateProviders(m_pProviderComboBox, wizard()->notificationCenter()); 425 420 /* Translate providers: */ 426 421 retranslateUi(); … … 466 461 467 462 /* Update profiles: */ 468 populateProfiles(m_pProfileComboBox, wizard()-> providerShortName(), wizard()->profileName());463 populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName()); 469 464 sltHandleProfileComboChange(); 470 465 … … 477 472 /* Update wizard fields: */ 478 473 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())); 480 475 481 476 /* Update profile instances: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.h
r91697 r92173 36 36 class QIRichTextLabel; 37 37 class QIToolButton; 38 class UINotificationCenter; 38 39 class UIWizardAddCloudVM; 39 40 … … 55 56 { 56 57 /** Populates @a pCombo with known providers. */ 57 void populateProviders(QIComboBox *pCombo );58 void populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter); 58 59 /** Populates @a pCombo with known profiles. 59 60 * @param strProviderShortName Brings the short name of provider profiles related to. 60 61 * @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); 62 63 /** Populates @a pList with profile instances available in @a comClient. */ 63 64 void populateProfileInstances(QListWidget *pList, const CCloudClient &comClient); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r92165 r92173 535 535 populateVMItems(m_pVMSelector, m_selectedVMNames); 536 536 /* Populate formats: */ 537 populateFormats(m_pFormatComboBox, m_fExportToOCIByDefault);537 populateFormats(m_pFormatComboBox, wizard()->notificationCenter(), m_fExportToOCIByDefault); 538 538 /* Populate MAC address policies: */ 539 539 populateMACAddressPolicies(m_pMACComboBox); … … 711 711 refreshManifestCheckBoxAccess(m_pManifestCheckbox, wizard()->isFormatCloudOne()); 712 712 refreshIncludeISOsCheckBoxAccess(m_pIncludeISOsCheckbox, wizard()->isFormatCloudOne()); 713 refreshProfileCombo(m_pProfileComboBox, wizard()-> format(), wizard()->isFormatCloudOne());713 refreshProfileCombo(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->format(), wizard()->isFormatCloudOne()); 714 714 refreshCloudExportMode(m_exportModeButtons, wizard()->isFormatCloudOne()); 715 715 … … 760 760 /* Update export settings: */ 761 761 refreshCloudProfile(m_comCloudProfile, 762 wizard()->notificationCenter(), 762 763 wizard()->format(), 763 764 wizard()->profileName(), -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.cpp
r92089 r92173 52 52 *********************************************************************************************************************************/ 53 53 54 void UIWizardExportAppFormat::populateFormats(QIComboBox *pCombo, bool fExportToOCIByDefault)54 void UIWizardExportAppFormat::populateFormats(QIComboBox *pCombo, UINotificationCenter *pCenter, bool fExportToOCIByDefault) 55 55 { 56 56 /* Sanity check: */ 57 57 AssertPtrReturnVoid(pCombo); 58 /* We need top-level parent as well: */59 QWidget *pParent = pCombo->window();60 AssertPtrReturnVoid(pParent);61 58 62 59 /* Remember current item data to be able to restore it: */ … … 93 90 94 91 /* Iterate through existing providers: */ 95 foreach (const CCloudProvider &comProvider, listCloudProviders(p Parent))92 foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter)) 96 93 { 97 94 /* Skip if we have nothing to populate (file missing?): */ … … 100 97 /* Acquire provider name: */ 101 98 QString strProviderName; 102 if (!cloudProviderName(comProvider, strProviderName, p Parent))99 if (!cloudProviderName(comProvider, strProviderName, pCenter)) 103 100 continue; 104 101 /* Acquire provider short name: */ 105 102 QString strProviderShortName; 106 if (!cloudProviderShortName(comProvider, strProviderShortName, p Parent))103 if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter)) 107 104 continue; 108 105 … … 364 361 365 362 void UIWizardExportAppFormat::refreshProfileCombo(QIComboBox *pCombo, 363 UINotificationCenter *pCenter, 366 364 const QString &strFormat, 367 365 bool fIsFormatCloudOne) … … 373 371 if (fIsFormatCloudOne) 374 372 { 375 /* We need top-level parent as well: */376 QWidget *pParent = pCombo->window();377 AssertPtrReturnVoid(pParent);378 373 /* Acquire provider: */ 379 CCloudProvider comProvider = cloudProviderByShortName(strFormat, p Parent);374 CCloudProvider comProvider = cloudProviderByShortName(strFormat, pCenter); 380 375 AssertReturnVoid(comProvider.isNotNull()); 381 376 … … 392 387 393 388 /* Iterate through existing profile names: */ 394 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, p Parent))389 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter)) 395 390 { 396 391 /* Skip if we have nothing to populate (wtf happened?): */ … … 399 394 /* Acquire profile name: */ 400 395 QString strProfileName; 401 if (!cloudProfileName(comProfile, strProfileName, p Parent))396 if (!cloudProfileName(comProfile, strProfileName, pCenter)) 402 397 continue; 403 398 … … 436 431 437 432 void UIWizardExportAppFormat::refreshCloudProfile(CCloudProfile &comCloudProfile, 433 UINotificationCenter *pCenter, 438 434 const QString &strShortProviderName, 439 435 const QString &strProfileName, … … 442 438 /* If format is cloud one: */ 443 439 if (fIsFormatCloudOne) 444 comCloudProfile = cloudProfileByName(strShortProviderName, strProfileName );440 comCloudProfile = cloudProfileByName(strShortProviderName, strProfileName, pCenter); 445 441 /* If format is local one: */ 446 442 else … … 990 986 { 991 987 /* Populate formats: */ 992 populateFormats(m_pFormatComboBox, m_fExportToOCIByDefault);988 populateFormats(m_pFormatComboBox, wizard()->notificationCenter(), m_fExportToOCIByDefault); 993 989 /* Populate MAC address policies: */ 994 990 populateMACAddressPolicies(m_pMACComboBox); … … 1066 1062 refreshManifestCheckBoxAccess(m_pManifestCheckbox, wizard()->isFormatCloudOne()); 1067 1063 refreshIncludeISOsCheckBoxAccess(m_pIncludeISOsCheckbox, wizard()->isFormatCloudOne()); 1068 refreshProfileCombo(m_pProfileComboBox, wizard()-> format(), wizard()->isFormatCloudOne());1064 refreshProfileCombo(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->format(), wizard()->isFormatCloudOne()); 1069 1065 refreshCloudExportMode(m_exportModeButtons, wizard()->isFormatCloudOne()); 1070 1066 … … 1113 1109 /* Update export settings: */ 1114 1110 refreshCloudProfile(m_comCloudProfile, 1111 wizard()->notificationCenter(), 1115 1112 wizard()->format(), 1116 1113 wizard()->profileName(), -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.h
r92089 r92173 45 45 class QIToolButton; 46 46 class UIEmptyFilePathSelector; 47 class UINotificationCenter; 47 48 48 49 /** Format combo data fields. */ … … 64 65 { 65 66 /** Populates formats. */ 66 void populateFormats(QIComboBox *pCombo, bool fExportToOCIByDefault);67 void populateFormats(QIComboBox *pCombo, UINotificationCenter *pCenter, bool fExportToOCIByDefault); 67 68 /** Populates MAC address policies. */ 68 69 void populateMACAddressPolicies(QIComboBox *pCombo); … … 105 106 /** Refresh profile combo. */ 106 107 void refreshProfileCombo(QIComboBox *pCombo, 108 UINotificationCenter *pCenter, 107 109 const QString &strFormat, 108 110 bool fIsFormatCloudOne); 109 111 /** Refresh cloud profile. */ 110 112 void refreshCloudProfile(CCloudProfile &comCloudProfile, 113 UINotificationCenter *pCenter, 111 114 const QString &strShortProviderName, 112 115 const QString &strProfileName, -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r92165 r92173 415 415 /* Populate sources: */ 416 416 populateSources(m_pSourceComboBox, 417 wizard()->notificationCenter(), 417 418 m_fImportFromOCIByDefault, 418 419 m_strSource); … … 530 531 /* Refresh cloud stuff: */ 531 532 refreshProfileCombo(m_pProfileComboBox, 533 wizard()->notificationCenter(), 532 534 source(m_pSourceComboBox), 533 535 m_strProfileName, … … 565 567 /* Refresh profile instances: */ 566 568 refreshCloudProfileInstances(m_pProfileInstanceList, 569 wizard()->notificationCenter(), 567 570 source(m_pSourceComboBox), 568 571 profileName(m_pProfileComboBox), -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp
r92171 r92173 49 49 50 50 void UIWizardImportAppSource::populateSources(QIComboBox *pCombo, 51 UINotificationCenter *pCenter, 51 52 bool fImportFromOCIByDefault, 52 53 const QString &strSource) … … 54 55 /* Sanity check: */ 55 56 AssertPtrReturnVoid(pCombo); 56 /* We need top-level parent as well: */57 QWidget *pParent = pCombo->window();58 AssertPtrReturnVoid(pParent);59 57 60 58 /* Remember current item data to be able to restore it: */ … … 89 87 90 88 /* Iterate through existing providers: */ 91 foreach (const CCloudProvider &comProvider, listCloudProviders(p Parent))89 foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter)) 92 90 { 93 91 /* Skip if we have nothing to populate (file missing?): */ … … 96 94 /* Acquire provider name: */ 97 95 QString strProviderName; 98 if (!cloudProviderName(comProvider, strProviderName, p Parent))96 if (!cloudProviderName(comProvider, strProviderName, pCenter)) 99 97 continue; 100 98 /* Acquire provider short name: */ 101 99 QString strProviderShortName; 102 if (!cloudProviderShortName(comProvider, strProviderShortName, p Parent))100 if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter)) 103 101 continue; 104 102 … … 158 156 159 157 void UIWizardImportAppSource::refreshProfileCombo(QIComboBox *pCombo, 158 UINotificationCenter *pCenter, 160 159 const QString &strSource, 161 160 const QString &strProfileName, … … 168 167 if (fIsSourceCloudOne) 169 168 { 170 /* We need top-level parent as well: */171 QWidget *pParent = pCombo->window();172 AssertPtrReturnVoid(pParent);173 169 /* Acquire provider: */ 174 CCloudProvider comProvider = cloudProviderByShortName(strSource, p Parent);170 CCloudProvider comProvider = cloudProviderByShortName(strSource, pCenter); 175 171 AssertReturnVoid(comProvider.isNotNull()); 176 172 … … 189 185 190 186 /* Iterate through existing profile names: */ 191 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, p Parent))187 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter)) 192 188 { 193 189 /* Skip if we have nothing to populate (wtf happened?): */ … … 196 192 /* Acquire profile name: */ 197 193 QString strCurrentProfileName; 198 if (!cloudProfileName(comProfile, strCurrentProfileName, p Parent))194 if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter)) 199 195 continue; 200 196 … … 233 229 234 230 void UIWizardImportAppSource::refreshCloudProfileInstances(QListWidget *pListWidget, 231 UINotificationCenter *pCenter, 235 232 const QString &strSource, 236 233 const QString &strProfileName, … … 247 244 AssertPtrReturnVoid(pParent); 248 245 /* Acquire client: */ 249 CCloudClient comClient = cloudClientByName(strSource, strProfileName, p Parent);246 CCloudClient comClient = cloudClientByName(strSource, strProfileName, pCenter); 250 247 AssertReturnVoid(comClient.isNotNull()); 251 248 … … 312 309 AssertPtrReturnVoid(pWizard); 313 310 /* Acquire client: */ 314 CCloudClient comClient = cloudClientByName(strSource, strProfileName, pWizard );311 CCloudClient comClient = cloudClientByName(strSource, strProfileName, pWizard->notificationCenter()); 315 312 AssertReturnVoid(comClient.isNotNull()); 316 313 … … 694 691 /* Populate sources: */ 695 692 populateSources(m_pSourceComboBox, 693 wizard()->notificationCenter(), 696 694 m_fImportFromOCIByDefault, 697 695 m_strSource); … … 767 765 wizard()->isSourceCloudOne()); 768 766 refreshProfileCombo(m_pProfileComboBox, 767 wizard()->notificationCenter(), 769 768 source(m_pSourceComboBox), 770 769 m_strProfileName, … … 782 781 /* Refresh required settings: */ 783 782 refreshCloudProfileInstances(m_pProfileInstanceList, 783 wizard()->notificationCenter(), 784 784 source(m_pSourceComboBox), 785 785 profileName(m_pProfileComboBox), -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.h
r91966 r92173 34 34 class QIToolButton; 35 35 class UIEmptyFilePathSelector; 36 class UINotificationCenter; 36 37 class UIWizardImportApp; 37 38 class CAppliance; … … 57 58 /** Populates sources. */ 58 59 void populateSources(QIComboBox *pCombo, 60 UINotificationCenter *pCenter, 59 61 bool fImportFromOCIByDefault, 60 62 const QString &strSource); … … 71 73 /** Refresh profile combo. */ 72 74 void refreshProfileCombo(QIComboBox *pCombo, 75 UINotificationCenter *pCenter, 73 76 const QString &strSource, 74 77 const QString &strProfileName, … … 76 79 /** Refresh profile instances. */ 77 80 void refreshCloudProfileInstances(QListWidget *pListWidget, 81 UINotificationCenter *pCenter, 78 82 const QString &strSource, 79 83 const QString &strProfileName, -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp
r92165 r92173 244 244 m_pFormEditor->setNotificationCenter(wizard()->notificationCenter()); 245 245 /* Populate providers: */ 246 populateProviders(m_pProviderComboBox );246 populateProviders(m_pProviderComboBox, wizard()->notificationCenter()); 247 247 /* Translate providers: */ 248 248 retranslateUi(); … … 314 314 315 315 /* Update profiles: */ 316 populateProfiles(m_pProfileComboBox, wizard()-> providerShortName(), wizard()->profileName());316 populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName()); 317 317 sltHandleProfileComboChange(); 318 318 … … 325 325 /* Update wizard fields: */ 326 326 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())); 328 328 329 329 /* Update source: */ … … 354 354 /* Update source image & VSD form: */ 355 355 m_strSourceImageId = currentListWidgetData(m_pSourceImageList); 356 wizard()->setVSD(createVirtualSystemDescription(wizard() ));356 wizard()->setVSD(createVirtualSystemDescription(wizard()->notificationCenter())); 357 357 populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId); 358 358 wizard()->createVSDForm(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp
r92036 r92173 46 46 *********************************************************************************************************************************/ 47 47 48 void UIWizardNewCloudVMSource::populateProviders(QIComboBox *pCombo )48 void UIWizardNewCloudVMSource::populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter) 49 49 { 50 50 /* Sanity check: */ 51 51 AssertPtrReturnVoid(pCombo); 52 /* We need top-level parent as well: */53 QWidget *pParent = pCombo->window();54 AssertPtrReturnVoid(pParent);55 52 56 53 /* Remember current item data to be able to restore it: */ … … 69 66 70 67 /* Iterate through existing providers: */ 71 foreach (const CCloudProvider &comProvider, listCloudProviders(p Parent))68 foreach (const CCloudProvider &comProvider, listCloudProviders(pCenter)) 72 69 { 73 70 /* Skip if we have nothing to populate (file missing?): */ … … 76 73 /* Acquire provider name: */ 77 74 QString strProviderName; 78 if (!cloudProviderName(comProvider, strProviderName, p Parent))75 if (!cloudProviderName(comProvider, strProviderName, pCenter)) 79 76 continue; 80 77 /* Acquire provider short name: */ 81 78 QString strProviderShortName; 82 if (!cloudProviderShortName(comProvider, strProviderShortName, p Parent))79 if (!cloudProviderShortName(comProvider, strProviderShortName, pCenter)) 83 80 continue; 84 81 … … 105 102 106 103 void UIWizardNewCloudVMSource::populateProfiles(QIComboBox *pCombo, 104 UINotificationCenter *pCenter, 107 105 const QString &strProviderShortName, 108 106 const QString &strProfileName) … … 110 108 /* Sanity check: */ 111 109 AssertPtrReturnVoid(pCombo); 112 /* We need top-level parent as well: */113 QWidget *pParent = pCombo->window();114 AssertPtrReturnVoid(pParent);115 110 /* Acquire provider: */ 116 CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, p Parent);111 CCloudProvider comProvider = cloudProviderByShortName(strProviderShortName, pCenter); 117 112 AssertReturnVoid(comProvider.isNotNull()); 118 113 … … 131 126 132 127 /* Iterate through existing profiles: */ 133 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, p Parent))128 foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pCenter)) 134 129 { 135 130 /* Skip if we have nothing to populate (wtf happened?): */ … … 138 133 /* Acquire current profile name: */ 139 134 QString strCurrentProfileName; 140 if (!cloudProfileName(comProfile, strCurrentProfileName, p Parent))135 if (!cloudProfileName(comProfile, strCurrentProfileName, pCenter)) 141 136 continue; 142 137 … … 489 484 { 490 485 /* Populate providers: */ 491 populateProviders(m_pProviderComboBox );486 populateProviders(m_pProviderComboBox, wizard()->notificationCenter()); 492 487 /* Translate providers: */ 493 488 retranslateUi(); … … 517 512 518 513 /* Populate vsd and form properties: */ 519 wizard()->setVSD(createVirtualSystemDescription(wizard() ));514 wizard()->setVSD(createVirtualSystemDescription(wizard()->notificationCenter())); 520 515 populateFormProperties(wizard()->vsd(), wizard(), m_pSourceTabBar, m_strSourceImageId); 521 516 wizard()->createVSDForm(); … … 538 533 539 534 /* Update profiles: */ 540 populateProfiles(m_pProfileComboBox, wizard()-> providerShortName(), wizard()->profileName());535 populateProfiles(m_pProfileComboBox, wizard()->notificationCenter(), wizard()->providerShortName(), wizard()->profileName()); 541 536 sltHandleProfileComboChange(); 542 537 … … 549 544 /* Update wizard fields: */ 550 545 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())); 552 547 553 548 /* Update source: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h
r92036 r92173 37 37 class QIRichTextLabel; 38 38 class QIToolButton; 39 class UINotificationCenter; 39 40 class UIWizardNewCloudVM; 40 41 class CCloudClient; … … 58 59 { 59 60 /** Populates @a pCombo with known providers. */ 60 void populateProviders(QIComboBox *pCombo );61 void populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter); 61 62 /** Populates @a pCombo with known profiles. 62 63 * @param strProviderShortName Brings the short name of provider profiles related to. 63 64 * @param strProfileName Brings the name of profile to be chosen by default. */ 64 65 void populateProfiles(QIComboBox *pCombo, 66 UINotificationCenter *pCenter, 65 67 const QString &strProviderShortName, 66 68 const QString &strProfileName);
Note:
See TracChangeset
for help on using the changeset viewer.