diff -r fe6b6762fccd -r 53085837e73a securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp --- a/securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp Tue Jul 06 14:18:35 2010 +0300 +++ b/securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp Wed Aug 18 09:50:56 2010 +0300 @@ -11,14 +11,16 @@ * * Contributors: * -* Description: EAP-MSCHAPv2 New Password Input Dialog implementation +* Description: +* EAP-MSCHAPv2 New Password Input Dialog implementation * */ /* -* %version: 4 % +* %version: 5 % */ +// System includes #include #include #include @@ -27,14 +29,30 @@ #include #include #include + +// User includes #include "eapmschapv2newpwddialog.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #endif +/*! + * \class EapMschapv2NewPwdDialog + * \brief Implements EAP-MSCHAPv2 New Password Input Dialog. + */ -/** - * The constructor +// External function prototypes + +// Local constants + +// ======== LOCAL FUNCTIONS ======== + +// ======== MEMBER FUNCTIONS ======== + +/*! + * Constructor. + * + * @param [in] parameters Parameters for the Constructor. */ EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog(const QVariantMap ¶meters) :mEdit1(NULL), @@ -53,8 +71,10 @@ qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog EXIT"); } -/** +/*! * The construction of the dialog + * + * @param [in] parameters Parameters for the Construction of the dialog. */ void EapMschapv2NewPwdDialog::createDialog(const QVariantMap ¶meters ) { @@ -73,17 +93,19 @@ this->setDismissPolicy(HbPopup::NoDismiss); this->setAdditionalRowVisible(true); + //Set the first Line Edit to be on the screen this->setPromptText(labelText1, 0); mEdit1 = this->lineEdit(0); mEdit1->setEchoMode(HbLineEdit::Password); + //Set the second Line Edit to be on the screen also this->setPromptText(labelText2, 1); mEdit2 = this->lineEdit(1); mEdit2->setEchoMode(HbLineEdit::Password); - EapQtConfigInterface eap_config_if; + EapQtConfigInterface eapConfigIf; - mPwdValidator.reset( eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapMschapv2, + mPwdValidator.reset( eapConfigIf.validatorEap(EapQtExpandedEapType::TypeEapMschapv2, EapQtConfig::Password ) ); Q_ASSERT( mPwdValidator.isNull() == false ); @@ -126,8 +148,8 @@ qDebug("EapMschapv2NewPwdDialog::createDialog EXIT"); } -/** - * Destructor +/*! + * Destructor. */ EapMschapv2NewPwdDialog::~EapMschapv2NewPwdDialog() { @@ -140,17 +162,17 @@ OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEAPMSCHAPV2NEWPWDDIALOG_EXIT ); } -/** +/*! * Line edit validator + * + * @return true if content is valid. */ bool EapMschapv2NewPwdDialog::validate() const { qDebug("EapMschapv2NewPwdDialog::validate ENTER"); bool valid = false; - - EapQtValidator::Status test_status = mPwdValidator->validate(mEdit1->text()); - + if ( mPwdValidator->validate(mEdit1->text())== EapQtValidator::StatusOk && mEdit1->text() == mEdit2->text()) { qDebug("EapMschapv2NewPwdDialog::validate: ret val: TRUE"); @@ -160,7 +182,7 @@ return valid; } -/** +/*! * Function is called when the Ok Action button is pressed */ void EapMschapv2NewPwdDialog::okPressed() @@ -190,7 +212,7 @@ qDebug("EapMschapv2NewPwdDialog::okPressed EXIT"); } -/** +/*! * Function is called when the Cancel Action button is pressed */ void EapMschapv2NewPwdDialog::cancelPressed() @@ -206,9 +228,8 @@ OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CANCELPRESSED_EXIT ); } -/** +/*! * Function is called when the dialog is about to close - * */ void EapMschapv2NewPwdDialog::closingDialog() { @@ -219,9 +240,13 @@ OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSINGDIALOG_EXIT ); } -/** - * Updating the dialog during its showing is not allowed. - */ +/*! + * Device dialog parameters to be set while dialog is displayed. + * Not supported. + * + * @param [in] parameters NOT USED + * @return true always. + */ bool EapMschapv2NewPwdDialog::setDeviceDialogParameters (const QVariantMap ¶meters) { @@ -234,8 +259,10 @@ return true; } -/** - * Not supported, 0 always returned +/*! + * Not supported + * + * @return 0 always returned. */ int EapMschapv2NewPwdDialog::deviceDialogError() const { @@ -244,8 +271,10 @@ return 0; } -/** +/*! * Dialog is closed and the signal about closing is emitted + * + * @param [in] byClient indicates when the user closes the dialog */ void EapMschapv2NewPwdDialog::closeDeviceDialog(bool byClient) { @@ -262,8 +291,10 @@ OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSEDEVICEDIALOG_EXIT ); } -/** +/*! * This dialog widget is returned to the caller + * + * @return this dialog widget */ HbPopup *EapMschapv2NewPwdDialog::deviceDialogWidget() const {