~ubuntu-branches/ubuntu/quantal/kdepimlibs/quantal-proposed

« back to all changes in this revision

Viewing changes to mailtransport/transport.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-01-19 12:01:20 UTC
  • mfrom: (1.1.75)
  • Revision ID: package-import@ubuntu.com-20120119120120-yyou3lhmzdch0c50
Tags: 4:4.8.0a-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
    kDebug() << "migrating password from kmail wallet";
296
296
    KWallet::Wallet *wallet = TransportManager::self()->wallet();
297
297
    if ( wallet ) {
 
298
      QString pwd;
298
299
      wallet->setFolder( KMAIL_WALLET_FOLDER );
299
 
      wallet->readPassword( QString::fromLatin1( "transport-%1" ).arg( id() ), d->password );
 
300
      if ( wallet->readPassword( QString::fromLatin1( "transport-%1" ).arg( id() ), pwd ) == 0 ) {
 
301
        setPassword( pwd );
 
302
        writeConfig();
 
303
      } else {
 
304
        d->password.clear();
 
305
        d->passwordLoaded = false;
 
306
      }
300
307
      wallet->removeEntry( QString::fromLatin1( "transport-%1" ).arg( id() ) );
301
308
      wallet->setFolder( WALLET_FOLDER );
302
 
      d->passwordDirty = true;
303
 
      writeConfig();
304
309
    }
305
310
    return;
306
311
  }
310
315
  if ( wallet ) {
311
316
    QString pwd;
312
317
    if ( wallet->readPassword( QString::number( id() ), pwd ) == 0 ) {
313
 
      d->password = pwd;
 
318
      setPassword( pwd );
314
319
    } else {
315
320
      d->password.clear();
316
321
      d->passwordLoaded = false;