summaryrefslogtreecommitdiffstats
path: root/certmanager/certmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/certmanager.cpp')
-rw-r--r--certmanager/certmanager.cpp402
1 files changed, 201 insertions, 201 deletions
diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp
index b27f2ad57..f12411bf5 100644
--- a/certmanager/certmanager.cpp
+++ b/certmanager/certmanager.cpp
@@ -90,8 +90,8 @@
#include <kstdaccel.h>
// Qt
-#include <qfontmetrics.h>
-#include <qpopupmenu.h>
+#include <tqfontmetrics.h>
+#include <tqpopupmenu.h>
// other
#include <algorithm>
@@ -104,17 +104,17 @@ namespace {
public:
~DisplayStrategy() {}
- virtual QFont keyFont( const GpgME::Key& key, const QFont& font ) const {
+ virtual TQFont keyFont( const GpgME::Key& key, const TQFont& font ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
return filter ? filter->font( font ) : font;
}
- virtual QColor keyForeground( const GpgME::Key& key, const QColor& c ) const {
+ virtual TQColor keyForeground( const GpgME::Key& key, const TQColor& c ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
if ( filter && filter->fgColor().isValid() )
return filter->fgColor();
return c;
}
- virtual QColor keyBackground( const GpgME::Key& key, const QColor& c ) const {
+ virtual TQColor keyBackground( const GpgME::Key& key, const TQColor& c ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
if ( filter && filter->bgColor().isValid() )
return filter->bgColor();
@@ -126,30 +126,30 @@ namespace {
public:
~ColumnStrategy() {}
- QString title( int col ) const;
- QString text( const GpgME::Key & key, int col ) const;
- int width( int col, const QFontMetrics & fm ) const;
+ TQString title( int col ) const;
+ TQString text( const GpgME::Key & key, int col ) const;
+ int width( int col, const TQFontMetrics & fm ) const;
};
- QString ColumnStrategy::title( int col ) const {
+ TQString ColumnStrategy::title( int col ) const {
switch ( col ) {
case 0: return i18n("Subject");
case 1: return i18n("Issuer");
case 2: return i18n("Serial");
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
+ TQString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
switch ( col ) {
case 0: return Kleo::DN( key.userID(0).id() ).prettyDN();
case 1: return Kleo::DN( key.issuerName() ).prettyDN();
- case 2: return key.issuerSerial() ? QString::fromUtf8( key.issuerSerial() ) : QString::null ;
- default: return QString::null;
+ case 2: return key.issuerSerial() ? TQString::fromUtf8( key.issuerSerial() ) : TQString::null ;
+ default: return TQString::null;
}
}
- int ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
+ int ColumnStrategy::width( int col, const TQFontMetrics & fm ) const {
int factor = -1;
switch ( col ) {
case 0: factor = 6; break;
@@ -160,8 +160,8 @@ namespace {
}
} // anon namespace
-CertManager::CertManager( bool remote, const QString& query, const QString & import,
- QWidget* parent, const char* name, WFlags f )
+CertManager::CertManager( bool remote, const TQString& query, const TQString & import,
+ TQWidget* parent, const char* name, WFlags f )
: KMainWindow( parent, name, f|WDestructiveClose ),
mCrlView( 0 ),
mDirmngrProc( 0 ),
@@ -184,20 +184,20 @@ CertManager::CertManager( bool remote, const QString& query, const QString & imp
// Main Window --------------------------------------------------
mKeyListView = new CertKeyListView( new ColumnStrategy(), new DisplayStrategy(), this, "mKeyListView" );
- mKeyListView->setSelectionMode( QListView::Extended );
+ mKeyListView->setSelectionMode( TQListView::Extended );
setCentralWidget( mKeyListView );
- connect( mKeyListView, SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const QPoint&,int)),
- SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
- connect( mKeyListView, SIGNAL(returnPressed(Kleo::KeyListViewItem*)),
- SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
- connect( mKeyListView, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()) );
- connect( mKeyListView, SIGNAL(contextMenu(Kleo::KeyListViewItem*, const QPoint&)),
- SLOT(slotContextMenu(Kleo::KeyListViewItem*, const QPoint&)) );
+ connect( mKeyListView, TQT_SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
+ connect( mKeyListView, TQT_SIGNAL(returnPressed(Kleo::KeyListViewItem*)),
+ TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
+ connect( mKeyListView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()) );
+ connect( mKeyListView, TQT_SIGNAL(contextMenu(Kleo::KeyListViewItem*, const TQPoint&)),
+ TQT_SLOT(slotContextMenu(Kleo::KeyListViewItem*, const TQPoint&)) );
- connect( mKeyListView, SIGNAL(dropped(const KURL::List&) ),
- SLOT( slotDropped(const KURL::List&) ) );
+ connect( mKeyListView, TQT_SIGNAL(dropped(const KURL::List&) ),
+ TQT_SLOT( slotDropped(const KURL::List&) ) );
mLineEditAction->setText(query);
if ( !mRemote && !mNextFindRemote || !query.isEmpty() )
@@ -237,24 +237,24 @@ void CertManager::createStatusBar() {
KStatusBar * bar = statusBar();
mProgressBar = new Kleo::ProgressBar( bar, "mProgressBar" );
mProgressBar->reset();
- mProgressBar->setFixedSize( QSize( 100, mProgressBar->height() * 3 / 5 ) );
+ mProgressBar->setFixedSize( TQSize( 100, mProgressBar->height() * 3 / 5 ) );
bar->addWidget( mProgressBar, 0, true );
- mStatusLabel = new QLabel( bar, "mStatusLabel" );
+ mStatusLabel = new TQLabel( bar, "mStatusLabel" );
bar->addWidget( mStatusLabel, 1, false );
}
-static inline void connectEnableOperationSignal( QObject * s, QObject * d ) {
- QObject::connect( s, SIGNAL(enableOperations(bool)),
- d, SLOT(setEnabled(bool)) );
+static inline void connectEnableOperationSignal( TQObject * s, TQObject * d ) {
+ TQObject::connect( s, TQT_SIGNAL(enableOperations(bool)),
+ d, TQT_SLOT(setEnabled(bool)) );
}
void CertManager::createActions() {
KAction * action = 0;
- (void)KStdAction::quit( this, SLOT(close()), actionCollection() );
+ (void)KStdAction::quit( this, TQT_SLOT(close()), actionCollection() );
- action = KStdAction::redisplay( this, SLOT(slotRedisplay()), actionCollection() );
+ action = KStdAction::redisplay( 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));
@@ -263,113 +263,113 @@ void CertManager::createActions() {
connectEnableOperationSignal( this, action );
action = new KAction( i18n("Stop Operation"), "stop", Key_Escape,
- this, SIGNAL(stopOperations()),
+ this, TQT_SIGNAL(stopOperations()),
actionCollection(), "view_stop_operations" );
action->setEnabled( false );
(void) new KAction( i18n("New Key Pair..."), "filenew", 0,
- this, SLOT(newCertificate()),
+ this, TQT_SLOT(newCertificate()),
actionCollection(), "file_new_certificate" );
connect( new KToggleAction( i18n("Hierarchical Key List"), 0,
actionCollection(), "view_hierarchical" ),
- SIGNAL(toggled(bool)), SLOT(slotToggleHierarchicalView(bool)) );
+ TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleHierarchicalView(bool)) );
action = new KAction( i18n("Expand All"), 0, CTRL+Key_Period,
- this, SLOT(slotExpandAll()),
+ this, TQT_SLOT(slotExpandAll()),
actionCollection(), "view_expandall" );
action = new KAction( i18n("Collapse All"), 0, CTRL+Key_Comma,
- this, SLOT(slotCollapseAll()),
+ this, TQT_SLOT(slotCollapseAll()),
actionCollection(), "view_collapseall" );
(void) new KAction( i18n("Refresh CRLs"), 0, 0,
- this, SLOT(slotRefreshKeys()),
+ this, TQT_SLOT(slotRefreshKeys()),
actionCollection(), "certificates_refresh_clr" );
#ifdef NOT_IMPLEMENTED_ANYWAY
mRevokeCertificateAction = new KAction( i18n("Revoke"), 0,
- this, SLOT(revokeCertificate()),
+ this, TQT_SLOT(revokeCertificate()),
actionCollection(), "edit_revoke_certificate" );
connectEnableOperationSignal( this, mRevokeCertificateAction );
mExtendCertificateAction = new KAction( i18n("Extend"), 0,
- this, SLOT(extendCertificate()),
+ this, TQT_SLOT(extendCertificate()),
actionCollection(), "edit_extend_certificate" );
connectEnableOperationSignal( this, mExtendCertificateAction );
#endif
mDeleteCertificateAction = new KAction( i18n("Delete"), "editdelete", Key_Delete,
- this, SLOT(slotDeleteCertificate()),
+ this, TQT_SLOT(slotDeleteCertificate()),
actionCollection(), "edit_delete_certificate" );
connectEnableOperationSignal( this, mDeleteCertificateAction );
mValidateCertificateAction = new KAction( i18n("Validate"), "reload", SHIFT + Key_F5,
- this, SLOT(slotValidate()),
+ this, TQT_SLOT(slotValidate()),
actionCollection(), "certificates_validate" );
connectEnableOperationSignal( this, mValidateCertificateAction );
mImportCertFromFileAction = new KAction( i18n("Import Certificates..."), 0,
- this, SLOT(slotImportCertFromFile()),
+ this, TQT_SLOT(slotImportCertFromFile()),
actionCollection(), "file_import_certificates" );
connectEnableOperationSignal( this, mImportCertFromFileAction );
mImportCRLFromFileAction = new KAction( i18n("Import CRLs..."), 0,
- this, SLOT(importCRLFromFile()),
+ this, TQT_SLOT(importCRLFromFile()),
actionCollection(), "file_import_crls" );
connectEnableOperationSignal( this, mImportCRLFromFileAction );
mExportCertificateAction = new KAction( i18n("Export Certificates..."), "export", 0,
- this, SLOT(slotExportCertificate()),
+ this, TQT_SLOT(slotExportCertificate()),
actionCollection(), "file_export_certificate" );
mExportSecretKeyAction = new KAction( i18n("Export Secret Key..."), "export", 0,
- this, SLOT(slotExportSecretKey()),
+ this, TQT_SLOT(slotExportSecretKey()),
actionCollection(), "file_export_secret_keys" );
connectEnableOperationSignal( this, mExportSecretKeyAction );
mViewCertDetailsAction = new KAction( i18n("Certificate Details..."), 0, 0,
- this, SLOT(slotViewDetails()), actionCollection(),
+ this, TQT_SLOT(slotViewDetails()), actionCollection(),
"view_certificate_details" );
mDownloadCertificateAction = new KAction( i18n( "Download"), 0, 0,
- this, SLOT(slotDownloadCertificate()), actionCollection(),
+ this, TQT_SLOT(slotDownloadCertificate()), actionCollection(),
"download_certificate" );
- const QString dirmngr = KStandardDirs::findExe( "gpgsm" );
+ const TQString dirmngr = KStandardDirs::findExe( "gpgsm" );
mDirMngrFound = !dirmngr.isEmpty();
action = new KAction( i18n("Dump CRL Cache..."), 0,
- this, SLOT(slotViewCRLs()),
+ 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, SLOT(slotClearCRLs()),
+ 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,
- SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
+ 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( QString::null, actionCollection(), this,
- SLOT(slotSearch()),
+ mLineEditAction = new LineEditAction( TQString::null, actionCollection(), this,
+ TQT_SLOT(slotSearch()),
"query_lineedit_action");
- QStringList lst;
+ TQStringList lst;
lst << i18n("In Local Certificates") << i18n("In External Certificates");
- mComboAction = new ComboAction( lst, actionCollection(), this, SLOT( slotToggleRemote(int) ),
+ mComboAction = new ComboAction( lst, actionCollection(), this, TQT_SLOT( slotToggleRemote(int) ),
"location_combo_action", mNextFindRemote? 1 : 0 );
- mFindAction = new KAction( i18n("Find"), "find", 0, this, SLOT(slotSearch()),
+ mFindAction = new KAction( i18n("Find"), "find", 0, this, TQT_SLOT(slotSearch()),
actionCollection(), "find" );
- KStdAction::keyBindings( this, SLOT(slotEditKeybindings()), actionCollection() );
- KStdAction::preferences( this, SLOT(slotShowConfigurationDialog()), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT(slotEditKeybindings()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(slotShowConfigurationDialog()), actionCollection() );
- new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, SLOT(slotConfigureGpgME()),
+ new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, TQT_SLOT(slotConfigureGpgME()),
actionCollection(), "configure_gpgme" );
createStandardStatusBarAction();
@@ -387,7 +387,7 @@ void CertManager::slotEditKeybindings() {
void CertManager::slotShowConfigurationDialog() {
ConfigureDialog dlg( this );
- connect( &dlg, SIGNAL( configCommitted() ), SLOT( slotRepaint() ) );
+ connect( &dlg, TQT_SIGNAL( configCommitted() ), TQT_SLOT( slotRepaint() ) );
dlg.exec();
}
@@ -402,10 +402,10 @@ void CertManager::slotConfigureGpgME() {
// when reopening the configuration dialog.
config->clear();
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
{
// Tell other apps (e.g. kmail) that the gpgconf data might have changed
- kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() );
}
}
}
@@ -436,25 +436,25 @@ void CertManager::slotToggleHierarchicalView( bool hier ) {
}
void CertManager::slotExpandAll() {
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
it.current()->setOpen( true );
}
void CertManager::slotCollapseAll() {
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
it.current()->setOpen( false );
}
-void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString & initialText ) {
+void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const TQString & initialText ) {
assert( mProgressBar );
if ( !job )
return;
if ( !initialText.isEmpty() )
statusBar()->message( initialText );
- connect( job, SIGNAL(progress(const QString&,int,int)),
- mProgressBar, SLOT(slotProgress(const QString&,int,int)) );
- connect( job, SIGNAL(done()), mProgressBar, SLOT(reset()) );
- connect( this, SIGNAL(stopOperations()), job, SLOT(slotCancel()) );
+ connect( job, TQT_SIGNAL(progress(const TQString&,int,int)),
+ mProgressBar, TQT_SLOT(slotProgress(const TQString&,int,int)) );
+ connect( job, TQT_SIGNAL(done()), mProgressBar, TQT_SLOT(reset()) );
+ connect( this, TQT_SIGNAL(stopOperations()), job, TQT_SLOT(slotCancel()) );
action("view_stop_operations")->setEnabled( true );
emit enableOperations( false );
@@ -462,7 +462,7 @@ void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString
void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err ) {
updateStatusBarLabels();
- const QString msg = err.isCanceled() ? i18n("Canceled.")
+ const TQString msg = err.isCanceled() ? i18n("Canceled.")
: err ? i18n("Failed.")
: i18n("Done.") ;
statusBar()->message( msg, 4000 );
@@ -475,7 +475,7 @@ void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err )
void CertManager::updateStatusBarLabels() {
mKeyListView->flushKeys();
int total = 0;
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
++total;
mStatusLabel->setText( i18n( "%n Key.","%n Keys.", total ) );
}
@@ -487,30 +487,30 @@ void CertManager::updateStatusBarLabels() {
//
-static std::set<std::string> extractKeyFingerprints( const QPtrList<Kleo::KeyListViewItem> & items ) {
+static std::set<std::string> extractKeyFingerprints( const TQPtrList<Kleo::KeyListViewItem> & items ) {
std::set<std::string> result;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
result.insert( fpr );
return result;
}
-static QStringList stringlistFromSet( const std::set<std::string> & set ) {
- // ARGH. This is madness. Shitty Qt containers don't support QStringList( patterns.begin(), patterns.end() ) :/
- QStringList sl;
+static TQStringList stringlistFromSet( const std::set<std::string> & set ) {
+ // ARGH. This is madness. Shitty Qt containers don't support TQStringList( patterns.begin(), patterns.end() ) :/
+ TQStringList sl;
for ( std::set<std::string>::const_iterator it = set.begin() ; it != set.end() ; ++it )
- // let's make extra sure, maybe someone tries to make Qt not support std::string->QString conversion
- sl.push_back( QString::fromLatin1( it->c_str() ) );
+ // let's make extra sure, maybe someone tries to make Qt not support std::string->TQString conversion
+ sl.push_back( TQString::fromLatin1( it->c_str() ) );
return sl;
}
void CertManager::slotRefreshKeys() {
- const QStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) );
+ const TQStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) );
Kleo::RefreshKeysJob * job = Kleo::CryptoBackendFactory::instance()->smime()->refreshKeysJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&)),
- this, SLOT(slotRefreshKeysResult(const GpgME::Error&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&)),
+ this, TQT_SLOT(slotRefreshKeysResult(const GpgME::Error&)) );
connectJobToStatusBarProgress( job, i18n("Refreshing keys...") );
if ( const GpgME::Error err = job->start( keys ) )
@@ -523,16 +523,16 @@ 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( QString::fromLocal8Bit( err.asString() ) ),
+ "keys:\n%1").arg( TQString::fromLocal8Bit( err.asString() ) ),
i18n("Refreshing Keys Failed") );
}
-static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
+static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the certificates from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Listing Failed" ) );
}
@@ -557,7 +557,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const std::set
startKeyListing( validating, refresh, stringlistFromSet( patterns ) );
}
-void CertManager::startKeyListing( bool validating, bool refresh, const QStringList & patterns ) {
+void CertManager::startKeyListing( bool validating, bool refresh, const TQStringList & patterns ) {
mRemote = mNextFindRemote;
mLineEditAction->setEnabled( false );
mComboAction->setEnabled( false );
@@ -571,10 +571,10 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL
job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( mRemote, false, validating );
assert( job );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- mKeyListView, refresh ? SLOT(slotRefreshKey(const GpgME::Key&)) : SLOT(slotAddKey(const GpgME::Key&)) );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ mKeyListView, refresh ? TQT_SLOT(slotRefreshKey(const GpgME::Key&)) : TQT_SLOT(slotAddKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
connectJobToStatusBarProgress( job, i18n("Fetching keys...") );
@@ -589,7 +589,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL
static void selectKeys( Kleo::KeyListView * lv, const std::set<std::string> & fprs ) {
if ( !lv || fprs.empty() )
return;
- for ( QListViewItemIterator it( lv ) ; it.current() ; ++it )
+ 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.find( fpr ) != fprs.end() );
@@ -619,10 +619,10 @@ void CertManager::slotKeyListResult( const GpgME::KeyListResult & res ) {
selectKeys( mKeyListView, mPreviouslySelectedFingerprints );
}
-void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const QPoint& point) {
+void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const TQPoint& point) {
if ( !item )
return;
- if ( QPopupMenu * popup = static_cast<QPopupMenu*>(factory()->container("listview_popup",this)) )
+ if ( TQPopupMenu * popup = static_cast<TQPopupMenu*>(factory()->container("listview_popup",this)) )
popup->exec( point );
}
@@ -666,9 +666,9 @@ void CertManager::extendCertificate()
*/
void CertManager::slotImportCertFromFile()
{
- const QString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime";
- //const QString filter = QString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)");
- slotImportCertFromFile( KFileDialog::getOpenURL( QString::null, filter, this,
+ const TQString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime";
+ //const TQString filter = TQString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)");
+ slotImportCertFromFile( KFileDialog::getOpenURL( TQString::null, filter, this,
i18n( "Select Certificate File" ) ) );
}
@@ -685,7 +685,7 @@ void CertManager::slotImportCertFromFile( const KURL & certURL )
// Download the cert
KIOext::StoredTransferJob* importJob = KIOext::storedGet( certURL );
importJob->setWindow( this );
- connect( importJob, SIGNAL(result(KIO::Job*)), SLOT(slotImportResult(KIO::Job*)) );
+ connect( importJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotImportResult(KIO::Job*)) );
}
void CertManager::slotImportResult( KIO::Job* job )
@@ -700,28 +700,28 @@ void CertManager::slotImportResult( KIO::Job* job )
updateImportActions( true );
}
-static void showCertificateDownloadError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) {
+static void showCertificateDownloadError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while trying "
+ 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( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Download Failed" ) );
}
void CertManager::slotDownloadCertificate() {
mPreviouslySelectedFingerprints.clear();
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
slotStartCertificateDownload( fpr, it.current()->text(0) );
}
// Called from slotDownloadCertificate and from the certificate-details widget
-void CertManager::slotStartCertificateDownload( const QString& fingerprint, const QString& displayName ) {
+void CertManager::slotStartCertificateDownload( const TQString& fingerprint, const TQString& displayName ) {
if ( fingerprint.isEmpty() )
return;
@@ -729,8 +729,8 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons
Kleo::CryptoBackendFactory::instance()->smime()->downloadJob( false /* no armor */ );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotCertificateDownloadResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotCertificateDownloadResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Fetching certificate from server...") );
@@ -743,10 +743,10 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons
}
}
-QString CertManager::displayNameForJob( const Kleo::Job *job )
+TQString CertManager::displayNameForJob( const Kleo::Job *job )
{
JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.find( job );
- QString displayName;
+ TQString displayName;
if ( it != mJobsDisplayNameMap.end() ) {
displayName = *it;
mJobsDisplayNameMap.remove( it );
@@ -757,9 +757,9 @@ QString CertManager::displayNameForJob( const Kleo::Job *job )
}
// Don't call directly!
-void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const QByteArray & keyData ) {
+void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const TQByteArray & keyData ) {
- QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
+ TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
if ( err )
showCertificateDownloadError( this, err, displayName );
@@ -768,22 +768,22 @@ void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const
disconnectJobFromStatusBarProgress( err );
}
-static void showCertificateImportError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) {
+static void showCertificateImportError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while trying "
+ 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( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Import Failed" ) );
}
-void CertManager::startCertificateImport( const QByteArray & keyData, const QString& certDisplayName ) {
+void CertManager::startCertificateImport( const TQByteArray & keyData, const TQString& certDisplayName ) {
Kleo::ImportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->importJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::ImportResult&)),
- SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::ImportResult&)),
+ TQT_SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) );
connectJobToStatusBarProgress( job, i18n("Importing certificates...") );
@@ -798,7 +798,7 @@ void CertManager::startCertificateImport( const QByteArray & keyData, const QStr
}
void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res ) {
- QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
+ TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
if ( res.error().isCanceled() ) {
// do nothing
@@ -806,54 +806,54 @@ void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res )
showCertificateImportError( this, res.error(), displayName );
} else {
- const QString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>");
- const QString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>");
+ const TQString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>");
+ const TQString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>");
- QStringList lines;
+ TQStringList lines;
lines.push_back( normalLine.arg( i18n("Total number processed:"),
- QString::number( res.numConsidered() ) ) );
+ TQString::number( res.numConsidered() ) ) );
lines.push_back( normalLine.arg( i18n("Imported:"),
- QString::number( res.numImported() ) ) );
+ TQString::number( res.numImported() ) ) );
if ( res.newSignatures() )
lines.push_back( normalLine.arg( i18n("New signatures:"),
- QString::number( res.newSignatures() ) ) );
+ TQString::number( res.newSignatures() ) ) );
if ( res.newUserIDs() )
lines.push_back( normalLine.arg( i18n("New user IDs:"),
- QString::number( res.newUserIDs() ) ) );
+ TQString::number( res.newUserIDs() ) ) );
if ( res.numKeysWithoutUserID() )
lines.push_back( normalLine.arg( i18n("Keys without user IDs:"),
- QString::number( res.numKeysWithoutUserID() ) ) );
+ TQString::number( res.numKeysWithoutUserID() ) ) );
if ( res.newSubkeys() )
lines.push_back( normalLine.arg( i18n("New subkeys:"),
- QString::number( res.newSubkeys() ) ) );
+ TQString::number( res.newSubkeys() ) ) );
if ( res.newRevocations() )
lines.push_back( boldLine.arg( i18n("Newly revoked:"),
- QString::number( res.newRevocations() ) ) );
+ TQString::number( res.newRevocations() ) ) );
if ( res.notImported() )
lines.push_back( boldLine.arg( i18n("Not imported:"),
- QString::number( res.notImported() ) ) );
+ TQString::number( res.notImported() ) ) );
if ( res.numUnchanged() )
lines.push_back( normalLine.arg( i18n("Unchanged:"),
- QString::number( res.numUnchanged() ) ) );
+ TQString::number( res.numUnchanged() ) ) );
if ( res.numSecretKeysConsidered() )
lines.push_back( normalLine.arg( i18n("Secret keys processed:"),
- QString::number( res.numSecretKeysConsidered() ) ) );
+ TQString::number( res.numSecretKeysConsidered() ) ) );
if ( res.numSecretKeysImported() )
lines.push_back( normalLine.arg( i18n("Secret keys imported:"),
- QString::number( res.numSecretKeysImported() ) ) );
+ TQString::number( res.numSecretKeysImported() ) ) );
if ( res.numSecretKeysConsidered() - res.numSecretKeysImported() - res.numSecretKeysUnchanged() > 0 )
lines.push_back( boldLine.arg( i18n("Secret keys <em>not</em> imported:"),
- QString::number( res.numSecretKeysConsidered()
+ TQString::number( res.numSecretKeysConsidered()
- res.numSecretKeysImported()
- res.numSecretKeysUnchanged() ) ) );
if ( res.numSecretKeysUnchanged() )
lines.push_back( normalLine.arg( i18n("Secret keys unchanged:"),
- QString::number( res.numSecretKeysUnchanged() ) ) );
+ 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( QString::null ) ),
+ .arg( displayName ).arg( lines.join( TQString::null ) ),
i18n( "Certificate Import Result" ) );
disconnectJobFromStatusBarProgress( res.error() );
@@ -881,7 +881,7 @@ void CertManager::slotDirmngrExited() {
delete mDirmngrProc; mDirmngrProc = 0;
if ( !mImportCRLTempFile.isEmpty() )
- QFile::remove( mImportCRLTempFile );
+ TQFile::remove( mImportCRLTempFile );
updateImportActions( true );
}
@@ -889,8 +889,8 @@ void CertManager::slotDirmngrExited() {
This slot will import CRLs from a file.
*/
void CertManager::importCRLFromFile() {
- QString filter = QString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)");
- KURL url = KFileDialog::getOpenURL( QString::null,
+ TQString filter = TQString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)");
+ KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Select CRL File" ) );
@@ -905,8 +905,8 @@ void CertManager::importCRLFromFile() {
destURL.setPath( tempFile.name() );
KIO::Job* copyJob = KIO::file_copy( url, destURL, 0600, true, false );
copyJob->setWindow( this );
- connect( copyJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotImportCRLJobFinished( KIO::Job * ) ) );
+ connect( copyJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotImportCRLJobFinished( KIO::Job * ) ) );
}
}
}
@@ -914,10 +914,10 @@ void CertManager::importCRLFromFile() {
void CertManager::slotImportCRLJobFinished( KIO::Job *job )
{
KIO::FileCopyJob* fcjob = static_cast<KIO::FileCopyJob*>( job );
- QString tempFilePath = fcjob->destURL().path();
+ TQString tempFilePath = fcjob->destURL().path();
if ( job->error() ) {
job->showErrorDialog();
- QFile::remove( tempFilePath ); // unlink tempfile
+ TQFile::remove( tempFilePath ); // unlink tempfile
updateImportActions( true );
return;
}
@@ -928,10 +928,10 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
assert( slot );
assert( processname );
assert( mDirmngrProc );
- mErrorbuffer = QString::null;
- connect( mDirmngrProc, SIGNAL(processExited(KProcess*)), slot );
- connect( mDirmngrProc, SIGNAL(receivedStderr(KProcess*,char*,int) ),
- this, SLOT(slotStderr(KProcess*,char*,int)) );
+ mErrorbuffer = TQString::null;
+ connect( mDirmngrProc, TQT_SIGNAL(processExited(KProcess*)), slot );
+ connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int) ),
+ 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" ) );
@@ -940,16 +940,16 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
return true;
}
-void CertManager::startImportCRL( const QString& filename, bool isTempFile )
+void CertManager::startImportCRL( const TQString& filename, bool isTempFile )
{
assert( !mDirmngrProc );
- mImportCRLTempFile = isTempFile ? filename : QString::null;
+ mImportCRLTempFile = isTempFile ? filename : TQString::null;
mDirmngrProc = new KProcess();
*mDirmngrProc << "gpgsm" << "--call-dirmngr" << "loadcrl" << filename;
- if ( !connectAndStartDirmngr( SLOT(slotDirmngrExited()), "gpgsm" ) ) {
+ if ( !connectAndStartDirmngr( TQT_SLOT(slotDirmngrExited()), "gpgsm" ) ) {
updateImportActions( true );
if ( isTempFile )
- QFile::remove( mImportCRLTempFile ); // unlink tempfile
+ TQFile::remove( mImportCRLTempFile ); // unlink tempfile
}
}
@@ -958,11 +958,11 @@ void CertManager::startClearCRLs() {
mDirmngrProc = new KProcess();
*mDirmngrProc << "dirmngr" << "--flush";
//*mDirmngrProc << "gpgsm" << "--call-dimngr" << "flush"; // use this once it's implemented!
- connectAndStartDirmngr( SLOT(slotClearCRLsResult()), "dirmngr" );
+ connectAndStartDirmngr( TQT_SLOT(slotClearCRLsResult()), "dirmngr" );
}
void CertManager::slotStderr( KProcess*, char* buf, int len ) {
- mErrorbuffer += QString::fromLocal8Bit( buf, len );
+ mErrorbuffer += TQString::fromLocal8Bit( buf, len );
}
/**
@@ -997,12 +997,12 @@ void CertManager::slotClearCRLsResult() {
delete mDirmngrProc; mDirmngrProc = 0;
}
-static void showDeleteError( QWidget * parent, const GpgME::Error & err ) {
+static void showDeleteError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to delete "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to delete "
"the certificates:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Certificate Deletion Failed") );
}
@@ -1020,8 +1020,8 @@ void CertManager::slotDeleteCertificate() {
return;
std::vector<GpgME::Key> keys;
keys.reserve( mItemsToDelete.count() );
- QStringList keyDisplayNames;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it )
+ TQStringList keyDisplayNames;
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() ) {
keys.push_back( it.current()->key() );
keyDisplayNames.push_back( it.current()->text( 0 ) );
@@ -1033,12 +1033,12 @@ void CertManager::slotDeleteCertificate() {
mHierarchyAnalyser = new HierarchyAnalyser( this, "mHierarchyAnalyser" );
Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob();
assert( job );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- mHierarchyAnalyser, SLOT(slotNextKey(const GpgME::Key&)) );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotDeleteCertificate()) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ mHierarchyAnalyser, TQT_SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotDeleteCertificate()) );
connectJobToStatusBarProgress( job, i18n("Checking key dependencies...") );
- if ( const GpgME::Error error = job->start( QStringList() ) ) {
+ if ( const GpgME::Error error = job->start( TQStringList() ) ) {
showKeyListError( this, error );
delete mHierarchyAnalyser; mHierarchyAnalyser = 0;
}
@@ -1072,7 +1072,7 @@ void CertManager::slotDeleteCertificate() {
!= KMessageBox::Continue )
return;
- const QString msg = keysToDelete.size() > keys.size()
+ 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() )
@@ -1089,7 +1089,7 @@ void CertManager::slotDeleteCertificate() {
if ( Kleo::DeleteJob * job = Kleo::CryptoBackendFactory::instance()->smime()->deleteJob() )
job->slotCancel();
else {
- QString str = keys.size() == 1
+ TQString str = keys.size() == 1
? i18n("<qt><p>An error occurred while trying to delete "
"the certificate:</p>"
"<p><b>%1</b><p></qt>" )
@@ -1109,8 +1109,8 @@ void CertManager::slotDeleteCertificate() {
Kleo::MultiDeleteJob * job = new Kleo::MultiDeleteJob( Kleo::CryptoBackendFactory::instance()->smime() );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const GpgME::Key&)),
- SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const GpgME::Key&)),
+ TQT_SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) );
connectJobToStatusBarProgress( job, i18n("Deleting keys...") );
@@ -1128,7 +1128,7 @@ void CertManager::slotDeleteResult( const GpgME::Error & err, const GpgME::Key &
const int infinity = 100; // infinite loop guard...
mItemsToDelete.setAutoDelete( true );
for ( int i = 0 ; i < infinity ; ++i ) {
- QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete );
+ TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete );
while ( Kleo::KeyListViewItem * cur = it.current() ) {
++it;
if ( cur->childCount() == 0 ) {
@@ -1155,14 +1155,14 @@ void CertManager::slotViewDetails( Kleo::KeyListViewItem * item ) {
CertificateInfoWidgetImpl * top = new CertificateInfoWidgetImpl( item->key(), isRemote(), dialog );
dialog->setMainWidget( top );
// </UGH>
- connect( top, SIGNAL(requestCertificateDownload(const QString&, const QString&)),
- SLOT(slotStartCertificateDownload(const QString&, const QString&)) );
+ connect( top, TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)),
+ TQT_SLOT(slotStartCertificateDownload(const TQString&, const TQString&)) );
dialog->show();
}
void CertManager::slotViewDetails()
{
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
if ( items.isEmpty() )
return;
@@ -1187,12 +1187,12 @@ void CertManager::slotSelectionChanged()
}
void CertManager::slotExportCertificate() {
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
if ( items.isEmpty() )
return;
- QStringList fingerprints;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ TQStringList fingerprints;
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
fingerprints.push_back( fpr );
@@ -1200,16 +1200,16 @@ void CertManager::slotExportCertificate() {
startCertificateExport( fingerprints );
}
-static void showCertificateExportError( QWidget * parent, const GpgME::Error & err ) {
+static void showCertificateExportError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to export "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the certificate:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Certificate Export Failed") );
}
-void CertManager::startCertificateExport( const QStringList & fingerprints ) {
+void CertManager::startCertificateExport( const TQStringList & fingerprints ) {
if ( fingerprints.empty() )
return;
@@ -1218,8 +1218,8 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) {
Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->publicKeyExportJob( true );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotCertificateExportResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotCertificateExportResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Exporting certificate...") );
@@ -1231,7 +1231,7 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) {
}
// return true if we should proceed, false if we should abort
-static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w )
+static bool checkOverwrite( const KURL& url, bool& overwrite, TQWidget* w )
{
if ( KIO::NetAccess::exists( url, false /*dest*/, w ) ) {
if ( KMessageBox::Cancel ==
@@ -1247,7 +1247,7 @@ static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w )
return true;
}
-void CertManager::slotCertificateExportResult( const GpgME::Error & err, const QByteArray & data ) {
+void CertManager::slotCertificateExportResult( const GpgME::Error & err, const TQByteArray & data ) {
disconnectJobFromStatusBarProgress( err );
if ( err ) {
showCertificateExportError( this, err );
@@ -1256,8 +1256,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q
kdDebug() << "CertManager::slotCertificateExportResult(): got " << data.size() << " bytes" << endl;
- const QString filter = QString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)");
- const KURL url = KFileDialog::getOpenURL( QString::null,
+ const TQString filter = TQString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)");
+ const KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Save Certificate" ) );
@@ -1270,8 +1270,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q
KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( this );
- connect( uploadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotUploadResult( KIO::Job* ) ) );
+ connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) );
}
@@ -1287,22 +1287,22 @@ void CertManager::slotExportSecretKey() {
this, "secret key export key selection dialog" );
//dlg.setHideInvalidKeys( false );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
startSecretKeyExport( dlg.fingerprint() );
}
-static void showSecretKeyExportError( QWidget * parent, const GpgME::Error & err ) {
+static void showSecretKeyExportError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to export "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the secret key:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Secret-Key Export Failed") );
}
-void CertManager::startSecretKeyExport( const QString & fingerprint ) {
+void CertManager::startSecretKeyExport( const TQString & fingerprint ) {
if ( fingerprint.isEmpty() )
return;
@@ -1310,7 +1310,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
// Check if gpgsm supports --p12-charset
Kleo::CryptoConfig* config = Kleo::CryptoBackendFactory::instance()->config();
- QString charset;
+ TQString charset;
if ( config && config->entry( "gpgsm", "Configuration", "p12-charset" ) ) {
// This comes from gnupg's sources, agent/minip12.c
// In fact, any charset supported by iconv would work, but we don't link to iconv directly...
@@ -1333,9 +1333,9 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
"big5",
NULL
};
- QStringList charsetList;
+ TQStringList charsetList;
for ( const char** c = charsets; *c; ++c ) {
- charsetList.append( QString::fromLatin1( *c ) );
+ charsetList.append( TQString::fromLatin1( *c ) );
}
// TODO this selection could be done in a derived KeySelectionDialog which would add a combobox,
@@ -1353,8 +1353,8 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->secretKeyExportJob( false, charset );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotSecretKeyExportResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotSecretKeyExportResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Exporting secret key...") );
@@ -1365,7 +1365,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
mProgressBar->setProgress( 0, 0 );
}
-void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QByteArray & data ) {
+void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const TQByteArray & data ) {
disconnectJobFromStatusBarProgress( err );
if ( err ) {
showSecretKeyExportError( this, err );
@@ -1373,8 +1373,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy
}
kdDebug() << "CertManager::slotSecretKeyExportResult(): got " << data.size() << " bytes" << endl;
- QString filter = QString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)");
- KURL url = KFileDialog::getOpenURL( QString::null,
+ TQString filter = TQString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)");
+ KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Save Certificate" ) );
@@ -1387,8 +1387,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy
KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( this );
- connect( uploadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotUploadResult( KIO::Job* ) ) );
+ connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) );
}
void CertManager::slotUploadResult( KIO::Job* job )