本文整理汇总了C++中Import::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ Import::isNull方法的具体用法?C++ Import::isNull怎么用?C++ Import::isNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Import
的用法示例。
在下文中一共展示了Import::isNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: importMetaData
QString Formatting::importMetaData( const Import & import ) {
if ( import.isNull() )
return QString();
if ( import.error().isCanceled() )
return i18n( "The import of this certificate was canceled." );
if ( import.error() )
return i18n( "An error occurred importing this certificate: %1",
QString::fromLocal8Bit( import.error().asString() ) );
const unsigned int status = import.status();
if ( status & Import::NewKey )
return ( status & Import::ContainedSecretKey )
? i18n( "This certificate was new to your keystore. The secret key is available." )
: i18n( "This certificate is new to your keystore." ) ;
QStringList results;
if ( status & Import::NewUserIDs )
results.push_back( i18n( "New user-ids were added to this certificate by the import." ) );
if ( status & Import::NewSignatures )
results.push_back( i18n( "New signatures were added to this certificate by the import." ) );
if ( status & Import::NewSubkeys )
results.push_back( i18n( "New subkeys were added to this certificate by the import." ) );
return results.empty()
? i18n( "The import contained no new data for this certificate. It is unchanged.")
: results.join( "\n" );
}