Changeset 91165 in vbox
- Timestamp:
- Sep 8, 2021 3:34:03 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146819
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r91159 r91165 1367 1367 } 1368 1368 1369 void UIMessageCenter::cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1370 { 1371 error(pParent, MessageType_Error, 1372 tr("Failed to create cloud client."), 1373 UIErrorString::formatErrorInfo(comProfile)); 1374 } 1375 1369 1376 void UIMessageCenter::cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent /* = 0 */) const 1370 1377 { … … 1402 1409 } 1403 1410 1404 void UIMessageCenter::cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1405 { 1406 error(pParent, MessageType_Error, 1407 tr("Failed to create cloud client."), 1408 UIErrorString::formatErrorInfo(comProfile)); 1411 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent /* = 0 */) const 1412 { 1413 error(pParent, MessageType_Error, 1414 tr("Failed to acquire cloud machine parameter."), 1415 UIErrorString::formatErrorInfo(comMachine)); 1416 } 1417 1418 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const 1419 { 1420 error(pParent, MessageType_Error, 1421 tr("Failed to acquire cloud machine parameter."), 1422 UIErrorString::formatErrorInfo(comProgress)); 1423 } 1424 1425 void UIMessageCenter::cannotAssignFormValue(const QString &strError, QWidget *pParent /* = 0 */) const 1426 { 1427 error(pParent, MessageType_Error, 1428 tr("Failed to assign form value."), 1429 strError); 1409 1430 } 1410 1431 … … 1425 1446 UIErrorString::formatErrorInfo(progress)); 1426 1447 return false; 1427 }1428 1429 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent /* = 0 */) const1430 {1431 error(pParent, MessageType_Error,1432 tr("Failed to acquire cloud machine parameter."),1433 UIErrorString::formatErrorInfo(comMachine));1434 }1435 1436 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const1437 {1438 error(pParent, MessageType_Error,1439 tr("Failed to acquire cloud machine parameter."),1440 UIErrorString::formatErrorInfo(comProgress));1441 }1442 1443 void UIMessageCenter::cannotAcquireCloudMachineParameter(const QString &strErrorDetails, QWidget *pParent /* = 0 */) const1444 {1445 error(pParent, MessageType_Error,1446 tr("Failed to acquire cloud machine parameter."),1447 strErrorDetails);1448 }1449 1450 void UIMessageCenter::cannotAssignFormValue(const QString &strError, QWidget *pParent /* = 0 */) const1451 {1452 error(pParent, MessageType_Error,1453 tr("Failed to assign form value."),1454 strError);1455 1448 } 1456 1449 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r91159 r91165 374 374 * @{ */ 375 375 void cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent = 0) const; 376 377 376 void cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent = 0) const; 378 377 void cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent = 0) const; 379 378 void cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 380 379 void cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent = 0) const; 381 380 void cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent = 0) const; … … 383 382 void cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent = 0) const; 384 383 void cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent = 0) const; 385 386 void cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 384 void cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent = 0) const; 385 void cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent = 0) const; 386 /** @} */ 387 388 /** @name VirtualBox Manager / Cloud machine settings. 389 * @{ */ 390 void cannotAssignFormValue(const QString &strError, QWidget *pParent = 0) const; 387 391 /** @} */ 388 392 … … 392 396 bool cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const; 393 397 /** @} */ 394 395 void cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent = 0) const;396 void cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent = 0) const;397 void cannotAcquireCloudMachineParameter(const QString &strErrorDetails, QWidget *pParent = 0) const;398 void cannotAssignFormValue(const QString &strError, QWidget *pParent = 0) const;399 398 400 399 /* API: Cloud Console Manager warnings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UITaskCloudGetSettingsForm.cpp
r84098 r91165 22 22 #include "UICommon.h" 23 23 #include "UICloudNetworkingStuff.h" 24 #include "UI MessageCenter.h"24 #include "UINotificationCenter.h" 25 25 #include "UITaskCloudGetSettingsForm.h" 26 26 #include "UIThreadPool.h" … … 88 88 else 89 89 { 90 msgCenter().cannotAcquireCloudMachineParameter(pSettingsTask->errorInfo(), m_pParent);90 UINotificationMessage::cannotAcquireCloudMachineSettings(pSettingsTask->errorInfo()); 91 91 emit sigTaskFailed(pSettingsTask->errorInfo()); 92 92 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r91125 r91165 26 26 #include "UIErrorString.h" 27 27 #include "UIIconPool.h" 28 #include "UI MessageCenter.h"28 #include "UINotificationCenter.h" 29 29 #include "UIProgressTask.h" 30 30 #include "UIThreadPool.h" … … 36 36 37 37 38 /** UIProgressTask extension performing cloud machine refresh task. */ 38 /** UIProgressTask extension performing cloud machine refresh task. 39 * @todo rework this task to be a part of notification-center. */ 39 40 class UIProgressTaskRefreshCloudMachine : public UIProgressTask 40 41 { … … 78 79 CProgress comProgress = m_comCloudMachine.Refresh(); 79 80 if (!m_comCloudMachine.isOk()) 80 msgCenter().cannotAcquireCloudMachineParameter(m_comCloudMachine);81 UINotificationMessage::cannotRefreshCloudMachine(m_comCloudMachine); 81 82 else 82 83 comResult = comProgress; … … 90 91 /* Handle progress-wrapper errors: */ 91 92 if (!comProgress.GetCanceled() && (!comProgress.isOk() || comProgress.GetResultCode() != 0)) 92 msgCenter().cannotAcquireCloudMachineParameter(comProgress);93 UINotificationMessage::cannotRefreshCloudMachine(comProgress); 93 94 } 94 95 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r91149 r91165 129 129 "name.</p><p>Please resolve this name conflict and try again.</p>") 130 130 .arg(strCollisionName, strGroupName)); 131 } 132 133 /* static */ 134 void UINotificationMessage::cannotAcquireCloudMachineSettings(const QString &strErrorDetails) 135 { 136 createMessage( 137 QApplication::translate("UIMessageCenter", "Cloud machine failure ..."), 138 QApplication::translate("UIMessageCenter", "Failed to acquire cloud machine settings.") + 139 strErrorDetails); 131 140 } 132 141 … … 770 779 QApplication::translate("UIMessageCenter", "Failed to import cloud profiles.") + 771 780 UIErrorString::formatErrorInfo(comProvider)); 781 } 782 783 /* static */ 784 void UINotificationMessage::cannotRefreshCloudMachine(const CCloudMachine &comMachine) 785 { 786 createMessage( 787 QApplication::translate("UIMessageCenter", "Can't refresh cloud machine ..."), 788 QApplication::translate("UIMessageCenter", "Failed to refresh cloud machine.") + 789 UIErrorString::formatErrorInfo(comMachine)); 790 } 791 792 /* static */ 793 void UINotificationMessage::cannotRefreshCloudMachine(const CProgress &comProgress) 794 { 795 createMessage( 796 QApplication::translate("UIMessageCenter", "Can't refresh cloud machine ..."), 797 QApplication::translate("UIMessageCenter", "Failed to refresh cloud machine.") + 798 UIErrorString::formatErrorInfo(comProgress)); 772 799 } 773 800 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r91149 r91165 89 89 * @param strGroupName Brings the group name. */ 90 90 static void cannotResolveCollisionAutomatically(const QString &strCollisionName, const QString &strGroupName); 91 92 /** Notifies about inability to acquire cloud machine settings. 93 * @param strErrorDetails Brings the error details. */ 94 static void cannotAcquireCloudMachineSettings(const QString &strErrorDetails); 91 95 92 96 /** Notifies about public key path is empty. */ … … 303 307 * @param comProvider Brings the provider profiles being imported for. */ 304 308 static void cannotImportCloudProfiles(const CCloudProvider &comProvider); 309 /** Notifies about inability to refresh cloud machine. 310 * @param comMachine Brings the machine being refreshed. */ 311 static void cannotRefreshCloudMachine(const CCloudMachine &comMachine); 312 /** Notifies about inability to refresh cloud machine. 313 * @param comProgress Brings the progress of machine being refreshed. */ 314 static void cannotRefreshCloudMachine(const CProgress &comProgress); 305 315 306 316 /** Notifies about inability to open machine.
Note:
See TracChangeset
for help on using the changeset viewer.