Changeset 90157 in vbox
- Timestamp:
- Jul 12, 2021 11:14:38 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145660
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r90151 r90157 2655 2655 comUnattendedInstaller.SetPassword(unattendedData.m_strPassword); 2656 2656 checkUnattendedInstallError(comUnattendedInstaller); 2657 comUnattendedInstaller.SetHostname(unattendedData.m_strHostnameDomain );2657 comUnattendedInstaller.SetHostname(unattendedData.m_strHostnameDomainName); 2658 2658 checkUnattendedInstallError(comUnattendedInstaller); 2659 2659 comUnattendedInstaller.SetProductKey(unattendedData.m_strProductKey); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp
r90155 r90157 38 38 : QIWithRetranslateUI<QWidget>(pParent) 39 39 , m_pHostnameLineEdit(0) 40 , m_pDomain LineEdit(0)40 , m_pDomainNameLineEdit(0) 41 41 , m_pHostnameLabel(0) 42 , m_pDomain Label(0)42 , m_pDomainNameLabel(0) 43 43 { 44 44 prepare(); … … 55 55 { 56 56 return m_pHostnameLineEdit && m_pHostnameLineEdit->hasAcceptableInput() && 57 m_pDomain LineEdit && m_pDomainLineEdit->hasAcceptableInput();57 m_pDomainNameLineEdit && m_pDomainNameLineEdit->hasAcceptableInput(); 58 58 } 59 59 … … 64 64 } 65 65 66 QString UIHostnameDomainNameEditor::domain () const66 QString UIHostnameDomainNameEditor::domainName() const 67 67 { 68 if (m_pDomain LineEdit)69 return m_pDomain LineEdit->text();68 if (m_pDomainNameLineEdit) 69 return m_pDomainNameLineEdit->text(); 70 70 return QString(); 71 71 } 72 72 73 void UIHostnameDomainNameEditor::setDomain (const QString &strDomain)73 void UIHostnameDomainNameEditor::setDomainName(const QString &strDomain) 74 74 { 75 if (m_pDomain LineEdit)76 m_pDomain LineEdit->setText(strDomain);75 if (m_pDomainNameLineEdit) 76 m_pDomainNameLineEdit->setText(strDomain); 77 77 } 78 78 79 QString UIHostnameDomainNameEditor::hostnameDomain () const79 QString UIHostnameDomainNameEditor::hostnameDomainName() const 80 80 { 81 if (m_pHostnameLineEdit && m_pDomain LineEdit)82 return QString("%1.%2").arg(m_pHostnameLineEdit->text()).arg(m_pDomain LineEdit->text());81 if (m_pHostnameLineEdit && m_pDomainNameLineEdit) 82 return QString("%1.%2").arg(m_pHostnameLineEdit->text()).arg(m_pDomainNameLineEdit->text()); 83 83 return QString(); 84 84 } … … 95 95 if (m_pHostnameLineEdit) 96 96 m_pHostnameLineEdit->setToolTip(strHostnameTooltip); 97 if (m_pDomain Label)97 if (m_pDomainNameLabel) 98 98 { 99 m_pDomain Label->setText(tr("&Domain"));100 m_pDomain Label->setToolTip(strDomainTooltip);99 m_pDomainNameLabel->setText(tr("&Domain")); 100 m_pDomainNameLabel->setToolTip(strDomainTooltip); 101 101 } 102 m_pDomain LineEdit->setToolTip(strDomainTooltip);102 m_pDomainNameLineEdit->setToolTip(strDomainTooltip); 103 103 } 104 104 … … 140 140 int iRow = 0; 141 141 addLineEdit(iRow, m_pHostnameLabel, m_pHostnameLineEdit, pMainLayout); 142 addLineEdit(iRow, m_pDomain Label, m_pDomainLineEdit, pMainLayout);142 addLineEdit(iRow, m_pDomainNameLabel, m_pDomainNameLineEdit, pMainLayout); 143 143 144 144 connect(m_pHostnameLineEdit, &QILineEdit::textChanged, 145 145 this, &UIHostnameDomainNameEditor::sltHostnameChanged); 146 connect(m_pDomain LineEdit, &QILineEdit::textChanged,146 connect(m_pDomainNameLineEdit, &QILineEdit::textChanged, 147 147 this, &UIHostnameDomainNameEditor::sltDomainChanged); 148 148 … … 155 155 m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(), 156 156 tr("Hostname should be a string of length 2. Allowed characters are alphanumerics, '-', and '.'" )); 157 emit sigHostnameDomain Changed(hostnameDomain());157 emit sigHostnameDomainNameChanged(hostnameDomainName()); 158 158 } 159 159 160 160 void UIHostnameDomainNameEditor::sltDomainChanged() 161 161 { 162 m_pDomain LineEdit->mark(!m_pDomainLineEdit->hasAcceptableInput(),162 m_pDomainNameLineEdit->mark(!m_pDomainNameLineEdit->hasAcceptableInput(), 163 163 tr("Domain name should be a string of length 2. Allowed characters are alphanumerics, '-', and '.'" )); 164 164 165 emit sigHostnameDomain Changed(hostnameDomain());165 emit sigHostnameDomainNameChanged(hostnameDomainName()); 166 166 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h
r90155 r90157 42 42 signals: 43 43 44 void sigHostnameDomain Changed(const QString &strHostNameDomain);44 void sigHostnameDomainNameChanged(const QString &strHostNameDomain); 45 45 46 46 public: … … 51 51 void setHostname(const QString &strHostname); 52 52 53 QString domain () const;54 void setDomain (const QString &strDomain);53 QString domainName() const; 54 void setDomainName(const QString &strDomain); 55 55 56 QString hostnameDomain () const;56 QString hostnameDomainName() const; 57 57 58 58 bool isComplete() const; … … 73 73 74 74 QILineEdit *m_pHostnameLineEdit; 75 QILineEdit *m_pDomain LineEdit;75 QILineEdit *m_pDomainNameLineEdit; 76 76 77 77 QLabel *m_pHostnameLabel; 78 QLabel *m_pDomain Label;78 QLabel *m_pDomainNameLabel; 79 79 80 80 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r90151 r90157 742 742 } 743 743 744 const QString &UIWizardNewVM::hostnameDomain () const745 { 746 return m_unattendedInstallData.m_strHostnameDomain ;747 } 748 749 void UIWizardNewVM::setHostnameDomain (const QString &strHostnameDomain)750 { 751 m_unattendedInstallData.m_strHostnameDomain = strHostnameDomain;744 const QString &UIWizardNewVM::hostnameDomainName() const 745 { 746 return m_unattendedInstallData.m_strHostnameDomainName; 747 } 748 749 void UIWizardNewVM::setHostnameDomainName(const QString &strHostnameDomain) 750 { 751 m_unattendedInstallData.m_strHostnameDomainName = strHostnameDomain; 752 752 } 753 753 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r90151 r90157 52 52 QString m_strUserName; 53 53 QString m_strPassword; 54 QString m_strHostnameDomain ;54 QString m_strHostnameDomainName; 55 55 QString m_strProductKey; 56 56 bool m_fInstallGuestAdditions; … … 134 134 void setGuestAdditionsISOPath(const QString &strGAISOPath); 135 135 136 const QString &hostnameDomain () const;137 void setHostnameDomain (const QString &strHostname);136 const QString &hostnameDomainName() const; 137 void setHostnameDomainName(const QString &strHostnameDomainName); 138 138 139 139 const QString &productKey() const; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
r90155 r90157 102 102 this, &UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle); 103 103 if (m_pHostnameDomainNameEditor) 104 connect(m_pHostnameDomainNameEditor, &UIHostnameDomainNameEditor::sigHostnameDomain Changed,105 this, &UIWizardNewVMUnattendedPageBasic::sltHostnameDomain Changed);104 connect(m_pHostnameDomainNameEditor, &UIHostnameDomainNameEditor::sigHostnameDomainNameChanged, 105 this, &UIWizardNewVMUnattendedPageBasic::sltHostnameDomainNameChanged); 106 106 if (m_pProductKeyLineEdit) 107 107 connect(m_pProductKeyLineEdit, &QLineEdit::textChanged, … … 167 167 m_pHostnameDomainNameEditor->blockSignals(true); 168 168 169 if (!m_userModifiedParameters.contains("HostnameDomain "))169 if (!m_userModifiedParameters.contains("HostnameDomainName")) 170 170 { 171 171 m_pHostnameDomainNameEditor->setHostname(pWizard->machineBaseName()); 172 m_pHostnameDomainNameEditor->setDomain ("myguest.virtualbox.org");172 m_pHostnameDomainNameEditor->setDomainName("myguest.virtualbox.org"); 173 173 /* Initialize unattended hostname here since we cannot get the efault value from CUnattended this early (unlike username etc): */ 174 newVMWizardPropertySet(HostnameDomain , m_pHostnameDomainNameEditor->hostnameDomain());174 newVMWizardPropertySet(HostnameDomainName, m_pHostnameDomainNameEditor->hostnameDomainName()); 175 175 } 176 176 … … 252 252 } 253 253 254 void UIWizardNewVMUnattendedPageBasic::sltHostnameDomain Changed(const QString &strHostnameDomain)255 { 256 newVMWizardPropertySet(HostnameDomain , strHostnameDomain);257 m_userModifiedParameters << "HostnameDomain ";254 void UIWizardNewVMUnattendedPageBasic::sltHostnameDomainNameChanged(const QString &strHostnameDomainName) 255 { 256 newVMWizardPropertySet(HostnameDomainName, strHostnameDomainName); 257 m_userModifiedParameters << "HostnameDomainName"; 258 258 emit completeChanged(); 259 259 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h
r90155 r90157 65 65 void sltPasswordChanged(const QString &strPassword); 66 66 void sltUserNameChanged(const QString &strUserName); 67 void sltHostnameDomain Changed(const QString &strHostname);67 void sltHostnameDomainNameChanged(const QString &strHostnameDomainName); 68 68 void sltProductKeyChanged(const QString &strProductKey); 69 69 void sltStartHeadlessChanged(bool fStartHeadless);
Note:
See TracChangeset
for help on using the changeset viewer.