VirtualBox

Changeset 66677 in vbox


Ignore:
Timestamp:
Apr 26, 2017 3:04:53 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115067
Message:

FE/Qt: Global preferences: Network page: Small changes for a couple of error messages.

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  
    986986}
    987987
    988 bool UIMessageCenter::confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent /* = 0*/) const
     988bool UIMessageCenter::confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent /* = 0 */) const
    989989{
    990990    return questionBinary(pParent, MessageType_Question,
     
    10191019}
    10201020
    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>.")
     1021void 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>.")
    10321025             .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
     1029void 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
     1037void 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
     1044void 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
     1051void UIMessageCenter::cannotRemoveHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const
    10511052{
    10521053    error(pParent, MessageType_Error,
    10531054          tr("Failed to remove the host network interface <b>%1</b>.")
    10541055             .arg(strInterfaceName),
    1055           formatErrorInfo(host));
    1056 }
    1057 
    1058 void UIMessageCenter::cannotRemoveHostInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent /* = 0*/)
     1056          formatErrorInfo(comHost));
     1057}
     1058
     1059void UIMessageCenter::cannotRemoveHostNetworkInterface(const CProgress &comProgress, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const
    10591060{
    10601061    error(pParent, MessageType_Error,
    10611062          tr("Failed to remove the host network interface <b>%1</b>.")
    10621063             .arg(strInterfaceName),
    1063           formatErrorInfo(progress));
     1064          formatErrorInfo(comProgress));
    10641065}
    10651066
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r66626 r66677  
    222222    void cannotCreateNATNetwork(const CVirtualBox &vbox, QWidget *pParent = 0);
    223223    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 cannotCreateHostInterface(const CHost &host, QWidget *pParent = 0);
    227     void cannotCreateHostInterface(const CProgress &progress, QWidget *pParent = 0);
    228     void cannotRemoveHostInterface(const CHost &host, const QString &strInterfaceName, QWidget *pParent = 0);
    229     void cannotRemoveHostInterface(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;
    230230    void cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent = 0) const;
    231231
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp

    r66644 r66677  
    720720    CProgress progress = host.CreateHostOnlyNetworkInterface(iface);
    721721    if (!host.isOk())
    722         return msgCenter().cannotCreateHostInterface(host, this);
     722        return msgCenter().cannotCreateHostNetworkInterface(host, this);
    723723    msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0);
    724724    if (!progress.isOk() || progress.GetResultCode() != 0)
    725         return msgCenter().cannotCreateHostInterface(progress, this);
     725        return msgCenter().cannotCreateHostNetworkInterface(progress, this);
    726726
    727727    /* Make sure DHCP server is created too: */
     
    731731        vbox.CreateDHCPServer(iface.GetNetworkName());
    732732        if (!vbox.isOk())
    733             return msgCenter().cannotCreateDHCPServer(vbox, this);
     733            return msgCenter().cannotCreateDHCPServer(vbox, iface.GetNetworkName(), this);
    734734        dhcp = vbox.FindDHCPServerByNetworkName(iface.GetNetworkName());
    735735    }
     
    795795    CProgress progress = host.RemoveHostOnlyNetworkInterface(iface.GetId());
    796796    if (!host.isOk())
    797         return msgCenter().cannotRemoveHostInterface(host, strInterfaceName, this);
     797        return msgCenter().cannotRemoveHostNetworkInterface(host, strInterfaceName, this);
    798798    msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0);
    799799    if (!progress.isOk() || progress.GetResultCode() != 0)
    800         return msgCenter().cannotRemoveHostInterface(progress, strInterfaceName, this);
     800        return msgCenter().cannotRemoveHostNetworkInterface(progress, strInterfaceName, this);
    801801
    802802    /* Update tree: */
     
    14511451        if (!vbox.isOk())
    14521452        {
    1453             msgCenter().cannotCreateDHCPServer(vbox, this);
     1453            msgCenter().cannotCreateDHCPServer(vbox, iface.GetNetworkName(), this);
    14541454            return;
    14551455        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette