VirtualBox

Changeset 94837 in vbox


Ignore:
Timestamp:
May 5, 2022 9:37:34 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151236
Message:

FE/Qt: bugref:9515 Don't attempt to set hostname if it is not valid.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp

    r93823 r94837  
    174174    m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(),
    175175                              tr("Hostname should be a string of length 2. Allowed characters are alphanumerics, '-', and '.'" ));
    176     emit sigHostnameDomainNameChanged(hostnameDomainName());
     176    emit sigHostnameDomainNameChanged(hostnameDomainName(), isComplete());
    177177}
    178178
     
    182182                              tr("Domain name should be a string of length 2. Allowed characters are alphanumerics, '-', and '.'" ));
    183183
    184     emit sigHostnameDomainNameChanged(hostnameDomainName());
     184    emit sigHostnameDomainNameChanged(hostnameDomainName(), isComplete());
    185185}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h

    r93115 r94837  
    4242signals:
    4343
    44     void sigHostnameDomainNameChanged(const QString &strHostNameDomain);
     44    void sigHostnameDomainNameChanged(const QString &strHostNameDomain, bool fIsComplete);
    4545
    4646public:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h

    r93646 r94837  
    114114signals:
    115115
    116     void sigHostnameDomainNameChanged(const QString &strHostnameDomainName);
     116    void sigHostnameDomainNameChanged(const QString &strHostnameDomainName, bool fIsComplete);
    117117    void sigProductKeyChanged(const QString &strHostnameDomainName);
    118118    void sigStartHeadlessChanged(bool fChecked);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp

    r94593 r94837  
    832832}
    833833
    834 void UIWizardNewVMExpertPage::sltHostnameDomainNameChanged(const QString &strHostnameDomainName)
    835 {
    836     AssertReturnVoid(wizardWindow<UIWizardNewVM>());
    837     wizardWindow<UIWizardNewVM>()->setHostnameDomainName(strHostnameDomainName);
    838     m_userModifiedParameters << "HostnameDomainName";
    839     emit completeChanged();
     834void UIWizardNewVMExpertPage::sltHostnameDomainNameChanged(const QString &strHostnameDomainName, bool fIsComplete)
     835{
     836    AssertReturnVoid(wizardWindow<UIWizardNewVM>());
     837    emit completeChanged();
     838
     839    if (fIsComplete)
     840    {
     841        wizardWindow<UIWizardNewVM>()->setHostnameDomainName(strHostnameDomainName);
     842        m_userModifiedParameters << "HostnameDomainName";
     843    }
    840844}
    841845
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.h

    r94593 r94837  
    8080    void sltPasswordChanged(const QString &strPassword);
    8181    void sltUserNameChanged(const QString &strUserName);
    82     void sltHostnameDomainNameChanged(const QString &strHostnameDomainName);
     82    void sltHostnameDomainNameChanged(const QString &strHostnameDomainName, bool fIsComplete);
    8383    void sltProductKeyChanged(const QString &strProductKey);
    8484    void sltStartHeadlessChanged(bool fStartHeadless);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPage.cpp

    r93606 r94837  
    208208}
    209209
    210 void UIWizardNewVMUnattendedPage::sltHostnameDomainNameChanged(const QString &strHostnameDomainName)
    211 {
    212     AssertReturnVoid(wizardWindow<UIWizardNewVM>());
    213     wizardWindow<UIWizardNewVM>()->setHostnameDomainName(strHostnameDomainName);
    214     m_userModifiedParameters << "HostnameDomainName";
    215     emit completeChanged();
     210void UIWizardNewVMUnattendedPage::sltHostnameDomainNameChanged(const QString &strHostnameDomainName, bool fIsComplete)
     211{
     212    AssertReturnVoid(wizardWindow<UIWizardNewVM>());
     213    emit completeChanged();
     214
     215    if (fIsComplete)
     216    {
     217        wizardWindow<UIWizardNewVM>()->setHostnameDomainName(strHostnameDomainName);
     218        m_userModifiedParameters << "HostnameDomainName";
     219    }
    216220}
    217221
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPage.h

    r93606 r94837  
    5252    void sltPasswordChanged(const QString &strPassword);
    5353    void sltUserNameChanged(const QString &strUserName);
    54     void sltHostnameDomainNameChanged(const QString &strHostnameDomainName);
     54    void sltHostnameDomainNameChanged(const QString &strHostnameDomainName, bool fIsComplete);
    5555    void sltProductKeyChanged(const QString &strProductKey);
    5656    void sltStartHeadlessChanged(bool fStartHeadless);
Note: See TracChangeset for help on using the changeset viewer.

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