VirtualBox

Changeset 19225 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 28, 2009 7:10:07 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3837: New registration method - burn fix.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxRegistrationDlg.h

    r19224 r19225  
    7474    void finish();
    7575
     76    bool isFieldValid (QLineEdit *aLe) const;
     77
    7678    VBoxRegistrationDlg **mSelf;
    7779    QIWidgetValidator    *mWvalReg;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxRegistrationDlg.cpp

    r19224 r19225  
    501501    {
    502502        /* Check for fields correctness */
    503         if (mLeOldEmail->validator()->validate (mLeOldEmail->text(), pos) != QValidator::Acceptable ||
    504             mLeOldPassword->validator()->validate (mLeOldPassword->text(), pos) != QValidator::Acceptable)
     503        if (!isFieldValid (mLeOldEmail) || !isFieldValid (mLeOldPassword))
    505504            valid = false;
    506505    }
     
    508507    {
    509508        /* Check for fields correctness */
    510         if (mLeNewFirstName->validator()->validate (mLeNewFirstName->text(), pos) != QValidator::Acceptable ||
    511             mLeNewLastName->validator()->validate (mLeNewLastName->text(), pos) != QValidator::Acceptable ||
    512             mLeNewCompany->validator()->validate (mLeNewCompany->text(), pos) != QValidator::Acceptable ||
    513             mLeNewCountry->validator()->validate (mLeNewCountry->text(), pos) != QValidator::Acceptable ||
    514             mLeNewEmail->validator()->validate (mLeNewEmail->text(), pos) != QValidator::Acceptable ||
    515             mLeNewPassword->validator()->validate (mLeNewPassword->text(), pos) != QValidator::Acceptable ||
    516             mLeNewPassword2->validator()->validate (mLeNewPassword2->text(), pos) != QValidator::Acceptable)
     509        if (!isFieldValid (mLeNewFirstName) || !isFieldValid (mLeNewLastName) ||
     510            !isFieldValid (mLeNewCompany) || !isFieldValid (mLeNewCountry) ||
     511            !isFieldValid (mLeNewEmail) ||
     512            !isFieldValid (mLeNewPassword) || !isFieldValid (mLeNewPassword2))
    517513            valid = false;
    518514
     
    564560}
    565561
     562bool VBoxRegistrationDlg::isFieldValid (QLineEdit *aLe) const
     563{
     564    QString text (aLe->text());
     565    int position;
     566    return aLe->validator()->validate (text, position) == QValidator::Acceptable;
     567}
     568
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