~ubuntu-branches/debian/sid/kdesvn/sid

« back to all changes in this revision

Viewing changes to src/askpass/kdesvn-askpass.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-10-01 23:39:59 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20091001233959-z99k3dkbk8et09ss
* New upstream release.
* Bump Standards-Version to 3.8.3. Add README.source.
* debian/copyright: Update copyright statement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
    QString prompt;
47
47
    QString kfile;
 
48
    bool error = false;
48
49
 
49
50
    if( !KCmdLineArgs::parsedArgs()->count() ) {
50
51
        prompt = i18n("Please enter your password below.");
51
52
    } else {
52
53
        prompt = KCmdLineArgs::parsedArgs()->arg(0);
 
54
        if (prompt.contains("Bad passphrase",Qt::CaseInsensitive)) {
 
55
            error = true;
 
56
        }
53
57
        kfile = prompt.section(" ", -2).remove(":").simplified();
54
58
    }
55
59
    QString pw;
56
60
    QString wfolder = about.appName();
57
61
 
58
62
    KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), 0 );
59
 
    if (wallet && wallet->hasFolder(wfolder)) {
 
63
    if (!error && wallet && wallet->hasFolder(wfolder)) {
60
64
        wallet->setFolder(wfolder);
61
65
        wallet->readPassword(kfile,pw);
62
66
    }