summaryrefslogtreecommitdiffstats
path: root/certmanager/certmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/certmanager.cpp')
-rw-r--r--certmanager/certmanager.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp
index 59fc73766..5f70bc220 100644
--- a/certmanager/certmanager.cpp
+++ b/certmanager/certmanager.cpp
@@ -2,7 +2,7 @@
certmanager.cpp
This file is part of Kleopatra, the KDE keymanager
- Copyright (c) 2001,2002,2004 Klarälvdalens Datakonsult AB
+ Copyright (c) 2001,2002,2004 Klar�lvdalens Datakonsult AB
Kleopatra is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -252,23 +252,23 @@ static inline void connectEnableOperationSignal( TQObject * s, TQObject * d ) {
void CertManager::createActions() {
KAction * action = 0;
- (void)KStdAction::quit( this, TQT_SLOT(close()), actionCollection() );
+ (void)KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() );
- action = KStdAction::redisplay( this, TQT_SLOT(slotRedisplay()), actionCollection() );
+ action = KStdAction::redisplay( TQT_TQOBJECT(this), TQT_SLOT(slotRedisplay()), actionCollection() );
// work around the fact that the stdaction has no shortcut
KShortcut reloadShortcut = KStdAccel::shortcut(KStdAccel::Reload);
reloadShortcut.append(KKey(CTRL + Key_R));
action->setShortcut( reloadShortcut );
- connectEnableOperationSignal( this, action );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), action );
action = new KAction( i18n("Stop Operation"), "stop", Key_Escape,
- this, TQT_SIGNAL(stopOperations()),
+ TQT_TQOBJECT(this), TQT_SIGNAL(stopOperations()),
actionCollection(), "view_stop_operations" );
action->setEnabled( false );
(void) new KAction( i18n("New Key Pair..."), "filenew", 0,
- this, TQT_SLOT(newCertificate()),
+ TQT_TQOBJECT(this), TQT_SLOT(newCertificate()),
actionCollection(), "file_new_certificate" );
connect( new KToggleAction( i18n("Hierarchical Key List"), 0,
@@ -276,100 +276,100 @@ void CertManager::createActions() {
TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleHierarchicalView(bool)) );
action = new KAction( i18n("Expand All"), 0, CTRL+Key_Period,
- this, TQT_SLOT(slotExpandAll()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotExpandAll()),
actionCollection(), "view_expandall" );
action = new KAction( i18n("Collapse All"), 0, CTRL+Key_Comma,
- this, TQT_SLOT(slotCollapseAll()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotCollapseAll()),
actionCollection(), "view_collapseall" );
(void) new KAction( i18n("Refresh CRLs"), 0, 0,
- this, TQT_SLOT(slotRefreshKeys()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRefreshKeys()),
actionCollection(), "certificates_refresh_clr" );
#ifdef NOT_IMPLEMENTED_ANYWAY
mRevokeCertificateAction = new KAction( i18n("Revoke"), 0,
- this, TQT_SLOT(revokeCertificate()),
+ TQT_TQOBJECT(this), TQT_SLOT(revokeCertificate()),
actionCollection(), "edit_revoke_certificate" );
connectEnableOperationSignal( this, mRevokeCertificateAction );
mExtendCertificateAction = new KAction( i18n("Extend"), 0,
- this, TQT_SLOT(extendCertificate()),
+ TQT_TQOBJECT(this), TQT_SLOT(extendCertificate()),
actionCollection(), "edit_extend_certificate" );
connectEnableOperationSignal( this, mExtendCertificateAction );
#endif
mDeleteCertificateAction = new KAction( i18n("Delete"), "editdelete", Key_Delete,
- this, TQT_SLOT(slotDeleteCertificate()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDeleteCertificate()),
actionCollection(), "edit_delete_certificate" );
- connectEnableOperationSignal( this, mDeleteCertificateAction );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), mDeleteCertificateAction );
mValidateCertificateAction = new KAction( i18n("Validate"), "reload", SHIFT + Key_F5,
- this, TQT_SLOT(slotValidate()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotValidate()),
actionCollection(), "certificates_validate" );
- connectEnableOperationSignal( this, mValidateCertificateAction );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), mValidateCertificateAction );
mImportCertFromFileAction = new KAction( i18n("Import Certificates..."), 0,
- this, TQT_SLOT(slotImportCertFromFile()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotImportCertFromFile()),
actionCollection(), "file_import_certificates" );
- connectEnableOperationSignal( this, mImportCertFromFileAction );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), mImportCertFromFileAction );
mImportCRLFromFileAction = new KAction( i18n("Import CRLs..."), 0,
- this, TQT_SLOT(importCRLFromFile()),
+ TQT_TQOBJECT(this), TQT_SLOT(importCRLFromFile()),
actionCollection(), "file_import_crls" );
- connectEnableOperationSignal( this, mImportCRLFromFileAction );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), mImportCRLFromFileAction );
mExportCertificateAction = new KAction( i18n("Export Certificates..."), "export", 0,
- this, TQT_SLOT(slotExportCertificate()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotExportCertificate()),
actionCollection(), "file_export_certificate" );
mExportSecretKeyAction = new KAction( i18n("Export Secret Key..."), "export", 0,
- this, TQT_SLOT(slotExportSecretKey()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotExportSecretKey()),
actionCollection(), "file_export_secret_keys" );
- connectEnableOperationSignal( this, mExportSecretKeyAction );
+ connectEnableOperationSignal( TQT_TQOBJECT(this), mExportSecretKeyAction );
mViewCertDetailsAction = new KAction( i18n("Certificate Details..."), 0, 0,
- this, TQT_SLOT(slotViewDetails()), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewDetails()), actionCollection(),
"view_certificate_details" );
mDownloadCertificateAction = new KAction( i18n( "Download"), 0, 0,
- this, TQT_SLOT(slotDownloadCertificate()), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDownloadCertificate()), actionCollection(),
"download_certificate" );
const TQString dirmngr = KStandardDirs::findExe( "gpgsm" );
mDirMngrFound = !dirmngr.isEmpty();
action = new KAction( i18n("Dump CRL Cache..."), 0,
- this, TQT_SLOT(slotViewCRLs()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewCRLs()),
actionCollection(), "crl_dump_crl_cache" );
action->setEnabled( mDirMngrFound ); // we also need dirmngr for this
action = new KAction( i18n("Clear CRL Cache..."), 0,
- this, TQT_SLOT(slotClearCRLs()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotClearCRLs()),
actionCollection(), "crl_clear_crl_cache" );
action->setEnabled( mDirMngrFound ); // we also need dirmngr for this
- action = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, this,
+ action = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
// disable action if no kwatchgnupg binary is around
if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) action->setEnabled(false);
(void)new LabelAction( i18n("Search:"), actionCollection(), "label_action" );
- mLineEditAction = new LineEditAction( TQString(), actionCollection(), this,
+ mLineEditAction = new LineEditAction( TQString(), actionCollection(), TQT_TQOBJECT(this),
TQT_SLOT(slotSearch()),
"query_lineedit_action");
TQStringList lst;
lst << i18n("In Local Certificates") << i18n("In External Certificates");
- mComboAction = new ComboAction( lst, actionCollection(), this, TQT_SLOT( slotToggleRemote(int) ),
+ mComboAction = new ComboAction( lst, actionCollection(), TQT_TQOBJECT(this), TQT_SLOT( slotToggleRemote(int) ),
"location_combo_action", mNextFindRemote? 1 : 0 );
- mFindAction = new KAction( i18n("Find"), "tqfind", 0, this, TQT_SLOT(slotSearch()),
+ mFindAction = new KAction( i18n("Find"), "tqfind", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearch()),
actionCollection(), "tqfind" );
- KStdAction::keyBindings( this, TQT_SLOT(slotEditKeybindings()), actionCollection() );
- KStdAction::preferences( this, TQT_SLOT(slotShowConfigurationDialog()), actionCollection() );
+ KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotEditKeybindings()), actionCollection() );
+ KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotShowConfigurationDialog()), actionCollection() );
- new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, TQT_SLOT(slotConfigureGpgME()),
+ new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureGpgME()),
actionCollection(), "configure_gpgme" );
createStandardStatusBarAction();
@@ -523,7 +523,7 @@ void CertManager::slotRefreshKeysResult( const GpgME::Error & err ) {
return;
if ( err )
KMessageBox::error( this, i18n("An error occurred while trying to refresh "
- "keys:\n%1").arg( TQString::fromLocal8Bit( err.asString() ) ),
+ "keys:\n%1").tqarg( TQString::fromLocal8Bit( err.asString() ) ),
i18n("Refreshing Keys Failed") );
}
@@ -532,7 +532,7 @@ static void showKeyListError( TQWidget * tqparent, const GpgME::Error & err ) {
const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the certificates from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n( "Certificate Listing Failed" ) );
}
@@ -592,7 +592,7 @@ static void selectKeys( Kleo::KeyListView * lv, const std::set<std::string> & fp
for ( TQListViewItemIterator it( lv ) ; it.current() ; ++it )
if ( Kleo::KeyListViewItem * item = Kleo::lvi_cast<Kleo::KeyListViewItem>( it.current() ) ) {
const char * fpr = item->key().primaryFingerprint();
- item->setSelected( fpr && fprs.tqfind( fpr ) != fprs.end() );
+ item->setSelected( fpr && fprs.find( fpr ) != fprs.end() );
}
}
@@ -705,8 +705,8 @@ static void showCertificateDownloadError( TQWidget * tqparent, const GpgME::Erro
const TQString msg = i18n( "<qt><p>An error occurred while trying "
"to download the certificate %1:</p>"
"<p><b>%2</b></p></qt>" )
- .arg( certDisplayName )
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( certDisplayName )
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n( "Certificate Download Failed" ) );
}
@@ -773,8 +773,8 @@ static void showCertificateImportError( TQWidget * tqparent, const GpgME::Error
const TQString msg = i18n( "<qt><p>An error occurred while trying "
"to import the certificate %1:</p>"
"<p><b>%2</b></p></qt>" )
- .arg( certDisplayName )
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( certDisplayName )
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n( "Certificate Import Failed" ) );
}
@@ -810,50 +810,50 @@ void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res )
const TQString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>");
TQStringList lines;
- lines.push_back( normalLine.arg( i18n("Total number processed:"),
+ lines.push_back( normalLine.tqarg( i18n("Total number processed:"),
TQString::number( res.numConsidered() ) ) );
- lines.push_back( normalLine.arg( i18n("Imported:"),
+ lines.push_back( normalLine.tqarg( i18n("Imported:"),
TQString::number( res.numImported() ) ) );
if ( res.newSignatures() )
- lines.push_back( normalLine.arg( i18n("New signatures:"),
+ lines.push_back( normalLine.tqarg( i18n("New signatures:"),
TQString::number( res.newSignatures() ) ) );
if ( res.newUserIDs() )
- lines.push_back( normalLine.arg( i18n("New user IDs:"),
+ lines.push_back( normalLine.tqarg( i18n("New user IDs:"),
TQString::number( res.newUserIDs() ) ) );
if ( res.numKeysWithoutUserID() )
- lines.push_back( normalLine.arg( i18n("Keys without user IDs:"),
+ lines.push_back( normalLine.tqarg( i18n("Keys without user IDs:"),
TQString::number( res.numKeysWithoutUserID() ) ) );
if ( res.newSubkeys() )
- lines.push_back( normalLine.arg( i18n("New subkeys:"),
+ lines.push_back( normalLine.tqarg( i18n("New subkeys:"),
TQString::number( res.newSubkeys() ) ) );
if ( res.newRevocations() )
- lines.push_back( boldLine.arg( i18n("Newly revoked:"),
+ lines.push_back( boldLine.tqarg( i18n("Newly revoked:"),
TQString::number( res.newRevocations() ) ) );
if ( res.notImported() )
- lines.push_back( boldLine.arg( i18n("Not imported:"),
+ lines.push_back( boldLine.tqarg( i18n("Not imported:"),
TQString::number( res.notImported() ) ) );
if ( res.numUnchanged() )
- lines.push_back( normalLine.arg( i18n("Unchanged:"),
+ lines.push_back( normalLine.tqarg( i18n("Unchanged:"),
TQString::number( res.numUnchanged() ) ) );
if ( res.numSecretKeysConsidered() )
- lines.push_back( normalLine.arg( i18n("Secret keys processed:"),
+ lines.push_back( normalLine.tqarg( i18n("Secret keys processed:"),
TQString::number( res.numSecretKeysConsidered() ) ) );
if ( res.numSecretKeysImported() )
- lines.push_back( normalLine.arg( i18n("Secret keys imported:"),
+ lines.push_back( normalLine.tqarg( i18n("Secret keys imported:"),
TQString::number( res.numSecretKeysImported() ) ) );
if ( res.numSecretKeysConsidered() - res.numSecretKeysImported() - res.numSecretKeysUnchanged() > 0 )
- lines.push_back( boldLine.arg( i18n("Secret keys <em>not</em> imported:"),
+ lines.push_back( boldLine.tqarg( i18n("Secret keys <em>not</em> imported:"),
TQString::number( res.numSecretKeysConsidered()
- res.numSecretKeysImported()
- res.numSecretKeysUnchanged() ) ) );
if ( res.numSecretKeysUnchanged() )
- lines.push_back( normalLine.arg( i18n("Secret keys unchanged:"),
+ lines.push_back( normalLine.tqarg( i18n("Secret keys unchanged:"),
TQString::number( res.numSecretKeysUnchanged() ) ) );
KMessageBox::information( this,
i18n( "<qt><p>Detailed results of importing %1:</p>"
"<table>%2</table></qt>" )
- .arg( displayName ).arg( lines.join( TQString() ) ),
+ .tqarg( displayName ).tqarg( lines.join( TQString() ) ),
i18n( "Certificate Import Result" ) );
disconnectJobFromStatusBarProgress( res.error() );
@@ -875,7 +875,7 @@ void CertManager::slotDirmngrExited() {
if ( !mDirmngrProc->normalExit() )
KMessageBox::error( this, i18n( "The GpgSM process that tried to import the CRL file ended prematurely because of an unexpected error." ), i18n( "Certificate Manager Error" ) );
else if ( mDirmngrProc->exitStatus() )
- KMessageBox::error( this, i18n( "An error occurred when trying to import the CRL file. The output from GpgSM was:\n%1").arg( mErrorbuffer ), i18n( "Certificate Manager Error" ) );
+ KMessageBox::error( this, i18n( "An error occurred when trying to import the CRL file. The output from GpgSM was:\n%1").tqarg( mErrorbuffer ), i18n( "Certificate Manager Error" ) );
else
KMessageBox::information( this, i18n( "CRL file imported successfully." ), i18n( "Certificate Manager Information" ) );
@@ -935,7 +935,7 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
this, TQT_SLOT(slotStderr(KProcess*,char*,int)) );
if( !mDirmngrProc->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) {
delete mDirmngrProc; mDirmngrProc = 0;
- KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) );
+ KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).tqarg( processname ), i18n( "Certificate Manager Error" ) );
return false;
}
return true;
@@ -992,7 +992,7 @@ void CertManager::slotClearCRLsResult() {
if ( !mDirmngrProc->normalExit() )
KMessageBox::error( this, i18n( "The DirMngr process that tried to clear the CRL cache ended prematurely because of an unexpected error." ), i18n( "Certificate Manager Error" ) );
else if ( mDirmngrProc->exitStatus() )
- KMessageBox::error( this, i18n( "An error occurred when trying to clear the CRL cache. The output from DirMngr was:\n%1").arg( mErrorbuffer ), i18n( "Certificate Manager Error" ) );
+ KMessageBox::error( this, i18n( "An error occurred when trying to clear the CRL cache. The output from DirMngr was:\n%1").tqarg( mErrorbuffer ), i18n( "Certificate Manager Error" ) );
else
KMessageBox::information( this, i18n( "CRL cache cleared successfully." ), i18n( "Certificate Manager Information" ) );
delete mDirmngrProc; mDirmngrProc = 0;
@@ -1003,7 +1003,7 @@ static void showDeleteError( TQWidget * tqparent, const GpgME::Error & err ) {
const TQString msg = i18n("<qt><p>An error occurred while trying to delete "
"the certificates:</p>"
"<p><b>%1</b></p></qt>")
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n("Certificate Deletion Failed") );
}
@@ -1031,7 +1031,7 @@ void CertManager::slotDeleteCertificate() {
return;
if ( !mHierarchyAnalyser ) {
- mHierarchyAnalyser = new HierarchyAnalyser( this, "mHierarchyAnalyser" );
+ mHierarchyAnalyser = new HierarchyAnalyser( TQT_TQOBJECT(this), "mHierarchyAnalyser" );
Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob();
assert( job );
connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
@@ -1076,7 +1076,7 @@ void CertManager::slotDeleteCertificate() {
const TQString msg = keysToDelete.size() > keys.size()
? i18n("Do you really want to delete this certificate and the %1 certificates it certified?",
"Do you really want to delete these %n certificates and the %1 certificates they certified?",
- keys.size() ).arg( keysToDelete.size() - keys.size() )
+ keys.size() ).tqarg( keysToDelete.size() - keys.size() )
: i18n("Do you really want to delete this certificate?",
"Do you really want to delete these %n certificates?", keys.size() ) ;
@@ -1098,7 +1098,7 @@ void CertManager::slotDeleteCertificate() {
"the certificates:</p>"
"<p><b>%1</b><p></qt>" );
KMessageBox::error( this,
- str.arg( i18n("Operation not supported by the backend.") ),
+ str.tqarg( i18n("Operation not supported by the backend.") ),
i18n("Certificate Deletion Failed") );
}
@@ -1206,7 +1206,7 @@ static void showCertificateExportError( TQWidget * tqparent, const GpgME::Error
const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the certificate:</p>"
"<p><b>%1</b></p></qt>")
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n("Certificate Export Failed") );
}
@@ -1239,7 +1239,7 @@ static bool checkOverwrite( const KURL& url, bool& overwrite, TQWidget* w )
KMessageBox::warningContinueCancel(
w,
i18n( "A file named \"%1\" already exists. "
- "Are you sure you want to overwrite it?" ).arg( url.prettyURL() ),
+ "Are you sure you want to overwrite it?" ).tqarg( url.prettyURL() ),
i18n( "Overwrite File?" ),
i18n( "&Overwrite" ) ) )
return false;
@@ -1301,7 +1301,7 @@ static void showSecretKeyExportError( TQWidget * tqparent, const GpgME::Error &
const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the secret key:</p>"
"<p><b>%1</b></p></qt>")
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( tqparent, msg, i18n("Secret-Key Export Failed") );
}