securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpassword.cpp
changeset 27 9660a5eb236f
parent 26 9abfd4f00d37
child 34 ad1f037f1ac2
equal deleted inserted replaced
26:9abfd4f00d37 27:9660a5eb236f
    15  *   EAP method validator: password
    15  *   EAP method validator: password
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 /*
    19 /*
    20  * %version: 6 %
    20  * %version: 7 %
    21  */
    21  */
    22 
    22 
    23 #include <HbEditorInterface>
    23 #include <HbEditorInterface>
    24 #include <HbLineEdit>
    24 #include <HbLineEdit>
    25 
    25 
    81     return status;
    81     return status;
    82 }
    82 }
    83 
    83 
    84 void EapQtValidatorPassword::updateEditor(HbLineEdit *edit)
    84 void EapQtValidatorPassword::updateEditor(HbLineEdit *edit)
    85 {
    85 {
       
    86     Q_ASSERT(edit);
       
    87     if(edit == NULL) {
       
    88         return;
       
    89     }
       
    90 
    86     switch (mEapType.type()) {
    91     switch (mEapType.type()) {
    87     case EapQtExpandedEapType::TypeEapGtc:
    92     case EapQtExpandedEapType::TypeEapGtc:
    88     case EapQtExpandedEapType::TypeEapMschapv2:
    93     case EapQtExpandedEapType::TypeEapMschapv2:
    89     case EapQtExpandedEapType::TypeLeap:
    94     case EapQtExpandedEapType::TypeLeap:
    90     case EapQtExpandedEapType::TypePap:
    95     case EapQtExpandedEapType::TypePap:
    99 
   104 
   100 void EapQtValidatorPassword::updateEditorGeneral(HbLineEdit *edit)
   105 void EapQtValidatorPassword::updateEditorGeneral(HbLineEdit *edit)
   101 {
   106 {
   102     qDebug("EapQtValidatorPassword::updateEditorGeneral()");
   107     qDebug("EapQtValidatorPassword::updateEditorGeneral()");
   103 
   108 
       
   109     Q_ASSERT(edit);
       
   110 
   104     edit->setMaxLength(EapQtConfigInterfacePrivate::StringMaxLength);
   111     edit->setMaxLength(EapQtConfigInterfacePrivate::StringMaxLength);
   105     edit->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase
   112     edit->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase
   106         | Qt::ImhNoPredictiveText);
   113         | Qt::ImhNoPredictiveText);
   107 
   114 
   108     // do not set editor class or auto completing since they might leak the pwd
   115     // do not set editor class or auto completing since they might leak the pwd