[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kleopatra/commands
From: Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date: 2008-05-08 14:58:33
Message-ID: 1210258713.673941.2003.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 805416 by osterfeld:
always set a proxy model, filtering all keys on cancel/error
M +1 -0 importcertificatefromfilecommand.cpp
M +11 -3 importcertificatescommand.cpp
M +1 -0 importcertificatescommand_p.h
--- trunk/KDE/kdepim/kleopatra/commands/importcertificatefromfilecommand.cpp \
#805415:805416 @@ -185,6 +185,7 @@
void ImportCertificateFromFileCommand::Private::importResult( const \
GpgME::ImportResult& result ) {
if ( result.error().code() ) {
+ setImportResultProxyModel( result );
if ( result.error().isCanceled() )
emit q->canceled();
else
--- trunk/KDE/kdepim/kleopatra/commands/importcertificatescommand.cpp #805415:805416
@@ -191,9 +191,13 @@
}
+void ImportCertificatesCommand::Private::setImportResultProxyModel( const \
ImportResult & result ) { + inject_import_result_proxy_model( view(), result );
+}
+
void ImportCertificatesCommand::Private::showDetails( QWidget * parent, const \
ImportResult & res, const QString & id ) {
- inject_import_result_proxy_model( view(), res );
+ setImportResultProxyModel( res );
const KLocalizedString normalLine = ki18n("<tr><td \
align=\"right\">%1</td><td>%2</td></tr>");
const KLocalizedString boldLine = ki18n("<tr><td \
align=\"right\"><b>%1</b></td><td>%2</td></tr>"); @@ -274,14 +278,15 @@
// ### merge results when gpgme gains copy ctors for result objects
- if ( result.error().code() )
+ if ( result.error().code() ) {
+ setImportResultProxyModel( result );
if ( result.error().isCanceled() )
emit q->canceled();
else
showError( result.error() );
+ }
else
showDetails( result );
-
finished();
}
@@ -289,6 +294,7 @@
assert( protocol != UnknownProtocol );
const Kleo::CryptoBackend::Protocol * const backend = \
CryptoBackendFactory::instance()->protocol( protocol ); if ( !backend ) {
+ setImportResultProxyModel( ImportResult() );
KMessageBox::error( view(),
i18n( "The type of this certificate (%1) is not \
supported by this Kleopatra installation.", Formatting::displayName( protocol ) ),
@@ -303,9 +309,11 @@
connect( job.get(), SIGNAL(progress(QString,int,int)),
q, SIGNAL(progress(QString,int,int)) );
if ( const GpgME::Error err = job->start( data ) ) {
+ setImportResultProxyModel( ImportResult( err ) );
showError( err, id );
finished();
} else if ( err.isCanceled() ) {
+ setImportResultProxyModel( ImportResult( err ) );
emit q->canceled();
finished();
} else {
--- trunk/KDE/kdepim/kleopatra/commands/importcertificatescommand_p.h #805415:805416
@@ -68,6 +68,7 @@
void showDetails( const GpgME::ImportResult & result, const QString & \
id=QString() ) { showDetails( view(), result, id );
}
+ void setImportResultProxyModel( const GpgME::ImportResult & result );
private:
QPointer<Kleo::ImportJob> cmsImportJob, pgpImportJob;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic