Changeset 19225 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 28, 2009 7:10:07 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxRegistrationDlg.h
r19224 r19225 74 74 void finish(); 75 75 76 bool isFieldValid (QLineEdit *aLe) const; 77 76 78 VBoxRegistrationDlg **mSelf; 77 79 QIWidgetValidator *mWvalReg; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxRegistrationDlg.cpp
r19224 r19225 501 501 { 502 502 /* 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)) 505 504 valid = false; 506 505 } … … 508 507 { 509 508 /* 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)) 517 513 valid = false; 518 514 … … 564 560 } 565 561 562 bool 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.