Changeset 66677 in vbox
- Timestamp:
- Apr 26, 2017 3:04:53 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115067
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r66626 r66677 986 986 } 987 987 988 bool UIMessageCenter::confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent /* = 0 */) const988 bool UIMessageCenter::confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent /* = 0 */) const 989 989 { 990 990 return questionBinary(pParent, MessageType_Question, … … 1019 1019 } 1020 1020 1021 void UIMessageCenter::cannotCreateDHCPServer(const CVirtualBox &vbox, QWidget *pParent /* = 0*/) 1022 { 1023 error(pParent, MessageType_Error, 1024 tr("Failed to create DHCP server."), 1025 formatErrorInfo(vbox)); 1026 } 1027 1028 void UIMessageCenter::cannotRemoveDHCPServer(const CVirtualBox &vbox, const QString &strInterfaceName, QWidget *pParent /* = 0*/) 1029 { 1030 error(pParent, MessageType_Error, 1031 tr("Failed to remove DHCP server for network interface <b>%1</b>.") 1021 void UIMessageCenter::cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1022 { 1023 error(pParent, MessageType_Error, 1024 tr("Failed to create a DHCP server for the network interface <b>%1</b>.") 1032 1025 .arg(strInterfaceName), 1033 formatErrorInfo(vbox)); 1034 } 1035 1036 void UIMessageCenter::cannotCreateHostInterface(const CHost &host, QWidget *pParent /* = 0*/) 1037 { 1038 error(pParent, MessageType_Error, 1039 tr("Failed to create the host network interface."), 1040 formatErrorInfo(host)); 1041 } 1042 1043 void UIMessageCenter::cannotCreateHostInterface(const CProgress &progress, QWidget *pParent /* = 0*/) 1044 { 1045 error(pParent, MessageType_Error, 1046 tr("Failed to create the host network interface."), 1047 formatErrorInfo(progress)); 1048 } 1049 1050 void UIMessageCenter::cannotRemoveHostInterface(const CHost &host, const QString &strInterfaceName, QWidget *pParent /* = 0*/) 1026 formatErrorInfo(comVBox)); 1027 } 1028 1029 void UIMessageCenter::cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1030 { 1031 error(pParent, MessageType_Error, 1032 tr("Failed to remove the DHCP server for the network interface <b>%1</b>.") 1033 .arg(strInterfaceName), 1034 formatErrorInfo(comVBox)); 1035 } 1036 1037 void UIMessageCenter::cannotCreateHostNetworkInterface(const CHost &comHost, QWidget *pParent /* = 0 */) const 1038 { 1039 error(pParent, MessageType_Error, 1040 tr("Failed to create a host network interface."), 1041 formatErrorInfo(comHost)); 1042 } 1043 1044 void UIMessageCenter::cannotCreateHostNetworkInterface(const CProgress &comProgress, QWidget *pParent /* = 0 */) const 1045 { 1046 error(pParent, MessageType_Error, 1047 tr("Failed to create a host network interface."), 1048 formatErrorInfo(comProgress)); 1049 } 1050 1051 void UIMessageCenter::cannotRemoveHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1051 1052 { 1052 1053 error(pParent, MessageType_Error, 1053 1054 tr("Failed to remove the host network interface <b>%1</b>.") 1054 1055 .arg(strInterfaceName), 1055 formatErrorInfo( host));1056 } 1057 1058 void UIMessageCenter::cannotRemoveHost Interface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent /* = 0*/)1056 formatErrorInfo(comHost)); 1057 } 1058 1059 void UIMessageCenter::cannotRemoveHostNetworkInterface(const CProgress &comProgress, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1059 1060 { 1060 1061 error(pParent, MessageType_Error, 1061 1062 tr("Failed to remove the host network interface <b>%1</b>.") 1062 1063 .arg(strInterfaceName), 1063 formatErrorInfo( progress));1064 formatErrorInfo(comProgress)); 1064 1065 } 1065 1066 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r66626 r66677 222 222 void cannotCreateNATNetwork(const CVirtualBox &vbox, QWidget *pParent = 0); 223 223 void cannotRemoveNATNetwork(const CVirtualBox &vbox, const QString &strNetworkName, QWidget *pParent = 0); 224 void cannotCreateDHCPServer(const CVirtualBox & vbox, QWidget *pParent = 0);225 void cannotRemoveDHCPServer(const CVirtualBox & vbox, const QString &strInterfaceName, QWidget *pParent = 0);226 void cannotCreateHost Interface(const CHost &host, QWidget *pParent = 0);227 void cannotCreateHost Interface(const CProgress &progress, QWidget *pParent = 0);228 void cannotRemoveHost Interface(const CHost &host, const QString &strInterfaceName, QWidget *pParent = 0);229 void cannotRemoveHost Interface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent = 0);224 void cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent = 0) const; 225 void cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent = 0) const; 226 void cannotCreateHostNetworkInterface(const CHost &comHost, QWidget *pParent = 0) const; 227 void cannotCreateHostNetworkInterface(const CProgress &comProgress, QWidget *pParent = 0) const; 228 void cannotRemoveHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent = 0) const; 229 void cannotRemoveHostNetworkInterface(const CProgress &comProgress, const QString &strInterfaceName, QWidget *pParent = 0) const; 230 230 void cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent = 0) const; 231 231 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
r66644 r66677 720 720 CProgress progress = host.CreateHostOnlyNetworkInterface(iface); 721 721 if (!host.isOk()) 722 return msgCenter().cannotCreateHost Interface(host, this);722 return msgCenter().cannotCreateHostNetworkInterface(host, this); 723 723 msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0); 724 724 if (!progress.isOk() || progress.GetResultCode() != 0) 725 return msgCenter().cannotCreateHost Interface(progress, this);725 return msgCenter().cannotCreateHostNetworkInterface(progress, this); 726 726 727 727 /* Make sure DHCP server is created too: */ … … 731 731 vbox.CreateDHCPServer(iface.GetNetworkName()); 732 732 if (!vbox.isOk()) 733 return msgCenter().cannotCreateDHCPServer(vbox, this);733 return msgCenter().cannotCreateDHCPServer(vbox, iface.GetNetworkName(), this); 734 734 dhcp = vbox.FindDHCPServerByNetworkName(iface.GetNetworkName()); 735 735 } … … 795 795 CProgress progress = host.RemoveHostOnlyNetworkInterface(iface.GetId()); 796 796 if (!host.isOk()) 797 return msgCenter().cannotRemoveHost Interface(host, strInterfaceName, this);797 return msgCenter().cannotRemoveHostNetworkInterface(host, strInterfaceName, this); 798 798 msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0); 799 799 if (!progress.isOk() || progress.GetResultCode() != 0) 800 return msgCenter().cannotRemoveHost Interface(progress, strInterfaceName, this);800 return msgCenter().cannotRemoveHostNetworkInterface(progress, strInterfaceName, this); 801 801 802 802 /* Update tree: */ … … 1451 1451 if (!vbox.isOk()) 1452 1452 { 1453 msgCenter().cannotCreateDHCPServer(vbox, this);1453 msgCenter().cannotCreateDHCPServer(vbox, iface.GetNetworkName(), this); 1454 1454 return; 1455 1455 }
Note:
See TracChangeset
for help on using the changeset viewer.