Changeset 85110 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 8, 2020 2:23:18 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139044
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIUserNamePasswordEditor.cpp
r84969 r85110 122 122 } 123 123 124 bool UIUserNamePasswordEditor::is Complete()125 { 126 if (m_pUserNameLineEdit && m_pUserNameLineEdit->text().isEmpty())127 {128 markLineEdit(m_pUserNameLineEdit, true);129 return false; 130 } 131 else 132 markLineEdit(m_pUserNameLineEdit, false); 124 bool UIUserNamePasswordEditor::isUserNameComplete() 125 { 126 bool fComplete = (m_pUserNameLineEdit && !m_pUserNameLineEdit->text().isEmpty()); 127 markLineEdit(m_pUserNameLineEdit, !fComplete); 128 return fComplete; 129 } 130 131 bool UIUserNamePasswordEditor::isPasswordComplete() 132 { 133 133 bool fPasswordOK = true; 134 134 if (m_pPasswordLineEdit && m_pPasswordRepeatLineEdit) … … 144 144 } 145 145 146 bool UIUserNamePasswordEditor::isComplete() 147 { 148 bool fUserNameField = isUserNameComplete(); 149 bool fPasswordField = isPasswordComplete(); 150 return fUserNameField && fPasswordField; 151 } 152 146 153 void UIUserNamePasswordEditor::retranslateUi() 147 154 { … … 182 189 pLabel->setBuddy(pLineEdit); 183 190 ++iRow; 184 connect(pLineEdit, &T::textChanged, this, &UIUserNamePasswordEditor::s igSomeTextChanged);191 connect(pLineEdit, &T::textChanged, this, &UIUserNamePasswordEditor::sltSomeTextChanged); 185 192 return; 186 193 } … … 228 235 m_pPasswordRepeatLineEdit->toggleTextVisibility(fPasswordVisible); 229 236 } 237 238 void UIUserNamePasswordEditor::sltSomeTextChanged() 239 { 240 /* Check text lines edits and mark them accordingly: */ 241 isComplete(); 242 emit sigSomeTextChanged(); 243 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIUserNamePasswordEditor.h
r84969 r85110 91 91 92 92 void sltHandlePasswordVisibility(bool fPasswordVisible); 93 void sltSomeTextChanged(); 93 94 94 95 private: … … 99 100 /** Changes @p pLineEdit's base color to indicate an error or reverts it to the original color. */ 100 101 void markLineEdit(QLineEdit *pLineEdit, bool fError); 102 103 bool isUserNameComplete(); 104 bool isPasswordComplete(); 101 105 102 106 QLineEdit *m_pUserNameLineEdit; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r85090 r85110 207 207 { 208 208 if (m_pNameAndSystemEditor) 209 {210 m_pNameAndSystemEditor->blockSignals(true);211 209 m_pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId)); 212 m_pNameAndSystemEditor->blockSignals(false);213 }214 210 break; 215 211 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r85108 r85110 352 352 return false; 353 353 } 354 if (m_pUserNamePasswordEditor) 355 { 356 if (!m_pUserNamePasswordEditor->isComplete()) 357 return false; 358 } 354 359 return true; 355 360 }
Note:
See TracChangeset
for help on using the changeset viewer.