~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to kleopatra/newcertificatewizard/newcertificatewizard.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        return what == ELG;
117
117
    case GPGME_PK_DSA:
118
118
        return what == DSA;
 
119
    default:
 
120
        break;
119
121
    }
120
122
    return false;
121
123
}
145
147
        return;
146
148
    const int idx = cb->findData( static_cast<int>( strength ) );
147
149
    if ( idx < 0 )
148
 
        qWarning( "NewCertificateWizard: AdvancedSettingsDialog: keysize %u not allowed", strength );
 
150
        kWarning() << "keysize " << strength << " not allowed";
149
151
    cb->setCurrentIndex( idx );
150
152
}
151
153
 
569
571
        QString createGnupgKeyParms() const;
570
572
 
571
573
    private Q_SLOTS:
572
 
        void slotResult( const GpgME::KeyGenerationResult & result, const QByteArray & request, const QString & auditLog ) {
 
574
        void slotResult( const GpgME::KeyGenerationResult & result, const QByteArray & request, const QString & auditLog )
 
575
        {
 
576
            Q_UNUSED( auditLog );
573
577
            if ( result.error().code() ) {
574
578
                setField( "error", result.error().isCanceled()
575
579
                          ? i18n("Operation canceled.")
648
652
            ui.saveRequestToFilePB      ->setVisible( !pgp() );
649
653
            ui.makeBackupPB             ->setVisible(  pgp() );
650
654
            ui.createRevocationRequestPB->setVisible(  pgp() && false ); // not implemented
651
 
            
 
655
 
652
656
#ifdef KDEPIM_MOBILE_UI
653
657
            ui.sendCertificateByEMailPB ->setVisible(  false );
654
658
            ui.sendRequestByEMailPB     ->setVisible(  false );
821
825
        void toggleSignEncryptAndRestart() {
822
826
            if ( !wizard() )
823
827
                return;
824
 
            if ( KMessageBox::warningContinueCancel( this,
825
 
                                                     i18nc("@info",
826
 
                                                           "This operation will delete the certification request. "
827
 
                                                           "Please make sure that you have sent or saved it before proceeding." ),
828
 
                                                     i18nc("@title", "Certification Request About To Be Deleted") ) != KMessageBox::Continue )
 
828
            if ( KMessageBox::warningContinueCancel(
 
829
                     this,
 
830
                     i18nc("@info",
 
831
                           "This operation will delete the certification request. "
 
832
                           "Please make sure that you have sent or saved it before proceeding." ),
 
833
                     i18nc("@title", "Certification Request About To Be Deleted") ) != KMessageBox::Continue )
829
834
                return;
830
835
            const bool sign = signingAllowed();
831
836
            const bool encr = encryptionAllowed();
937
942
    return attr;
938
943
}
939
944
 
 
945
#if 0
 
946
//Not used anywhere
940
947
static QString attributeLabelWithColor( const QString & attr, bool pgp ) {
941
948
    const QString result = attributeLabel( attr, pgp );
942
949
    if ( result.isEmpty() )
944
951
    else
945
952
        return result + ':';
946
953
}
 
954
#endif
947
955
 
948
956
static QString attributeFromKey( QString key ) {
949
957
  return key.remove( '!' );
1425
1433
        setSubkeyType( GPGME_PK_ELG_E );
1426
1434
    } else {
1427
1435
        if ( !keyType.isEmpty() && keyType != "RSA" )
1428
 
            qWarning( "NewCertificateWizard: AdvancedSettingsDialog: invalid value \"%s\" for entry \"[CertificateCreationWizard]%s\"",
1429
 
                      qPrintable( keyType ), qPrintable( entry ) );
 
1436
            kWarning() << "invalid value \"" << qPrintable( keyType )
 
1437
                       << "\" for entry \"[CertificateCreationWizard]"
 
1438
                       << qPrintable( entry ) << "\"";
1430
1439
        setKeyType( GPGME_PK_RSA );
1431
1440
        setSubkeyType( 0 );
1432
1441
    }