Hello i have this nap of code which is mentioned to save the password to a .db file but it dosen't seem to work because it always got to passwdJob.error() .Could you please help me to fix this out


QKeychain::WritePasswordJob passwdJob(_OCS_APP_NAME);

passwdJob.setAutoDelete(false);

passwdJob.setKey( mAccountName );

passwdJob.setTextData(mPassword);

QEventLoop passwdLoop;

passwdLoop.connect( &passwdJob, SIGNAL(finished(QKeychain::Job*)),
&passwdLoop,SLOT(quit()));
passwdJob.start();
passwdLoop.exec();
if(passwdJob.error()) {
syncDebug() << "Error: Unable to save password!"<< passwdJob.error();

}