--- a/securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordui.cpp Mon May 24 20:32:47 2010 +0300
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordui.cpp Thu May 27 10:23:43 2010 +0300
@@ -17,7 +17,7 @@
*/
/*
- * %version: 23 %
+ * %version: 24 %
*/
// System includes
@@ -100,9 +100,7 @@
{
qDebug("CpEapUserPasswordUi::~CpEapUserPasswordUi");
- delete mValidatorUsername;
- delete mValidatorPassword;
-
+ // mValidatorUsername, mValidatorPassword
// mConfigIf: scoped pointer deleted automatically
}
@@ -197,19 +195,15 @@
if (modelItem == mUsername) {
// When username lineEdit is activated (shown) first time, validator is added
- if (NULL == mValidatorUsername) {
- mValidatorUsername = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
- EapQtConfig::Username);
- }
+ mValidatorUsername.reset(mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+ EapQtConfig::Username));
HbLineEdit *usernameEdit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
mValidatorUsername->updateEditor(usernameEdit);
}
else if (modelItem == mPassword) {
// When password lineEdit is activated (shown) first time, validator is added
- if (NULL == mValidatorPassword){
- mValidatorPassword = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
- EapQtConfig::Password);
- }
+ mValidatorPassword.reset(mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+ EapQtConfig::Password));
mPasswordEdit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
mValidatorPassword->updateEditor(mPasswordEdit);
// Install event filter to clear dummy password, when password is started to edit.