Commit d75c732e authored by Kevin Ottens's avatar Kevin Ottens
Browse files

Don't use the deprecated KIO::PasswordDialog, use KPasswordDialog

instead.

CCMAIL: mcguire@kde.org

svn path=/trunk/KDE/kdepim/runtime/; revision=1199932
parent 8ef4ab27
......@@ -192,17 +192,22 @@ void POP3Resource::showPasswordDialog( const QString &queryText )
bool rememberPassword = Settings::self()->storePassword();
// FIXME: give this a proper parent widget
if ( KIO::PasswordDialog::getNameAndPassword(
login, mPassword, &rememberPassword, queryText,
false, name(), name(), i18n( "Account:" ) ) != KDialog::Accepted )
{
KPasswordDialog dlg( 0, KPasswordDialog::ShowUsernameLine | KPasswordDialog::ShowKeepPassword );
dlg.setUsername( login );
dlg.setPassword( mPassword );
dlg.setKeepPassword( rememberPassword );
dlg.setPrompt( queryText );
dlg.setCaption( name() );
dlg.addCommentLine( i18n( "Account:" ), name() );
if ( dlg.exec() != KDialog::Accepted ) {
cancelSync( i18n( "No username and password supplied." ) );
return;
} else {
Settings::self()->setLogin( login );
Settings::self()->writeConfig();
Settings::self()->setStorePassword( false );
if ( rememberPassword ) {
if ( dlg.keepPassword() ) {
// setStorePassword( true ) is called only after the password is written into
// the wallet, as otherwise, the resource thinks the password is in the wallet
// and loads an empty password from it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment