Changeset 57366 in vbox for trunk/src/VBox
- Timestamp:
- Aug 14, 2015 6:00:53 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r57363 r57366 1154 1154 tr("The current port forwarding rules are not valid. " 1155 1155 "All of the host or guest address values should be correct or empty.")); 1156 return false; 1157 } 1158 1159 bool UIMessageCenter::warnAboutEmptyGuestAddress(QWidget *pParent /* = 0 */) const 1160 { 1161 alert(pParent, MessageType_Error, 1162 tr("The current port forwarding rules are not valid. " 1163 "None of the guest address values may be empty.")); 1156 1164 return false; 1157 1165 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r57362 r57366 239 239 bool warnAboutIncorrectPort(QWidget *pParent = 0) const; 240 240 bool warnAboutIncorrectAddress(QWidget *pParent = 0) const; 241 bool warnAboutEmptyGuestAddress(QWidget *pParent = 0) const; 241 242 bool warnAboutNameShouldBeUnique(QWidget *pParent = 0) const; 242 243 bool warnAboutRulesConflict(QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
r52730 r57366 51 51 { 52 52 /* Create table tabs: */ 53 m_pIPv4Table = new UIPortForwardingTable(ipv4rules, false );54 m_pIPv6Table = new UIPortForwardingTable(ipv6rules, true );53 m_pIPv4Table = new UIPortForwardingTable(ipv4rules, false, false); 54 m_pIPv6Table = new UIPortForwardingTable(ipv6rules, true, false); 55 55 /* Add widgets into tab-widget: */ 56 56 m_pTabWidget->addTab(m_pIPv4Table, QString()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
r52730 r57366 45 45 { 46 46 /* Create table: */ 47 m_pTable = new UIPortForwardingTable(rules, false );47 m_pTable = new UIPortForwardingTable(rules, false, true); 48 48 /* Create button-box: */ 49 49 m_pButtonBox = new QIDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r57362 r57366 567 567 568 568 569 UIPortForwardingTable::UIPortForwardingTable(const UIPortForwardingDataList &rules, bool fIPv6) 570 : m_fIsTableDataChanged(false) 569 UIPortForwardingTable::UIPortForwardingTable(const UIPortForwardingDataList &rules, bool fIPv6, bool fAllowEmptyGuestIPs) 570 : m_fAllowEmptyGuestIPs(fAllowEmptyGuestIPs) 571 , m_fIsTableDataChanged(false) 571 572 , m_pTableView(0) 572 573 , m_pToolBar(0) … … 731 732 return msgCenter().warnAboutIncorrectAddress(window()); 732 733 734 /* If empty guest address is not allowed: */ 735 if ( !m_fAllowEmptyGuestIPs 736 && guestIp.isEmpty()) 737 return msgCenter().warnAboutEmptyGuestAddress(window()); 738 733 739 /* Make sure non of the names were previosly used: */ 734 740 if (!names.contains(name)) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h
r57361 r57366 130 130 131 131 /* Constructor: */ 132 UIPortForwardingTable(const UIPortForwardingDataList &rules, bool fIPv6 );132 UIPortForwardingTable(const UIPortForwardingDataList &rules, bool fIPv6, bool fAllowEmptyGuestIPs); 133 133 134 134 /* API: Rules stuff: */ … … 159 159 160 160 /* Flags: */ 161 bool m_fAllowEmptyGuestIPs; 161 162 bool m_fIsTableDataChanged; 162 163
Note:
See TracChangeset
for help on using the changeset viewer.