diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:49:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:49:30 -0600 |
commit | a9bde819f2b421dcc44741156e75eca4bb5fb4f4 (patch) | |
tree | d087071b1e8fcf79698938efec19f8e48bab0799 /certmanager | |
parent | 5c4a80ead2b1fe57dc6a8c29d0368792344cd61e (diff) | |
download | tdepim-a9bde819f2b421dcc44741156e75eca4bb5fb4f4.tar.gz tdepim-a9bde819f2b421dcc44741156e75eca4bb5fb4f4.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'certmanager')
28 files changed, 130 insertions, 130 deletions
diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp index 74b476c80..c6add9515 100644 --- a/certmanager/certificateinfowidgetimpl.cpp +++ b/certmanager/certificateinfowidgetimpl.cpp @@ -96,7 +96,7 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo connect( importButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotImportCertificate() ) ); - dumpView->setFont( KGlobalSettings::fixedFont() ); + dumpView->setFont( TDEGlobalSettings::fixedFont() ); if ( !key.isNull() ) setKey( key ); @@ -253,36 +253,36 @@ void CertificateInfoWidgetImpl::startCertificateChainListing() { } void CertificateInfoWidgetImpl::startCertificateDump() { - KProcess* proc = new KProcess( TQT_TQOBJECT(this) ); + TDEProcess* proc = new TDEProcess( TQT_TQOBJECT(this) ); (*proc) << "gpgsm"; // must be in the PATH (*proc) << "--dump-keys"; (*proc) << mChain.front().primaryFingerprint(); - TQObject::connect( proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ), - this, TQT_SLOT( slotCollectStdout(KProcess *, char *, int) ) ); - TQObject::connect( proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ), - this, TQT_SLOT( slotCollectStderr(KProcess *, char *, int) ) ); - TQObject::connect( proc, TQT_SIGNAL( processExited(KProcess*) ), - this, TQT_SLOT( slotDumpProcessExited(KProcess*) ) ); + TQObject::connect( proc, TQT_SIGNAL( receivedStdout(TDEProcess *, char *, int) ), + this, TQT_SLOT( slotCollectStdout(TDEProcess *, char *, int) ) ); + TQObject::connect( proc, TQT_SIGNAL( receivedStderr(TDEProcess *, char *, int) ), + this, TQT_SLOT( slotCollectStderr(TDEProcess *, char *, int) ) ); + TQObject::connect( proc, TQT_SIGNAL( processExited(TDEProcess*) ), + this, TQT_SLOT( slotDumpProcessExited(TDEProcess*) ) ); - if ( !proc->start( KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdout | KProcess::Stderr) ) ) { + if ( !proc->start( TDEProcess::NotifyOnExit, (TDEProcess::Communication)(TDEProcess::Stdout | TDEProcess::Stderr) ) ) { TQString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) ); dumpView->setText( TQStyleSheet::escape( wmsg ) ); delete proc; } } -void CertificateInfoWidgetImpl::slotCollectStdout(KProcess *, char *buffer, int buflen) +void CertificateInfoWidgetImpl::slotCollectStdout(TDEProcess *, char *buffer, int buflen) { mDumpOutput += TQCString(buffer, buflen+1); // like KProcIO does } -void CertificateInfoWidgetImpl::slotCollectStderr(KProcess *, char *buffer, int buflen) +void CertificateInfoWidgetImpl::slotCollectStderr(TDEProcess *, char *buffer, int buflen) { mDumpError += TQCString(buffer, buflen+1); // like KProcIO does } -void CertificateInfoWidgetImpl::slotDumpProcessExited(KProcess* proc) { +void CertificateInfoWidgetImpl::slotDumpProcessExited(TDEProcess* proc) { int rc = ( proc->normalExit() ) ? proc->exitStatus() : -1 ; if ( rc == 0 ) { diff --git a/certmanager/certificateinfowidgetimpl.h b/certmanager/certificateinfowidgetimpl.h index fef553358..9536ddb36 100644 --- a/certmanager/certificateinfowidgetimpl.h +++ b/certmanager/certificateinfowidgetimpl.h @@ -39,7 +39,7 @@ #include <tqvaluelist.h> -class KProcess; +class TDEProcess; class TQListViewItem; namespace GpgME { @@ -66,9 +66,9 @@ private slots: void slotNextKey( const GpgME::Key & key ); void slotKeyExistanceCheckNextCandidate( const GpgME::Key & key ); void slotKeyExistanceCheckFinished(); - void slotCollectStdout(KProcess *, char *, int); - void slotCollectStderr(KProcess *, char *, int); - void slotDumpProcessExited(KProcess*); + void slotCollectStdout(TDEProcess *, char *, int); + void slotCollectStderr(TDEProcess *, char *, int); + void slotDumpProcessExited(TDEProcess*); private: void startCertificateChainListing(); diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp index c8aab3151..789f24b06 100644 --- a/certmanager/certificatewizardimpl.cpp +++ b/certmanager/certificatewizardimpl.cpp @@ -129,7 +129,7 @@ CertificateWizardImpl::CertificateWizardImpl( TQWidget* parent, const char* nam connect( storeUR, TQT_SIGNAL( urlSelected( const TQString& ) ), this, TQT_SLOT( slotURLSelected( const TQString& ) ) ); - const KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" ); + const KConfigGroup config( TDEGlobal::config(), "CertificateCreationWizard" ); caEmailED->setText( config.readEntry( "CAEmailAddress" ) ); connect( this, TQT_SIGNAL( helpClicked() ), @@ -337,7 +337,7 @@ void CertificateWizardImpl::createPersonalDataPage() TQGridLayout* grid = new TQGridLayout( edContainer, 2, 1, KDialog::marginHint(), KDialog::spacingHint() ); - KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" ); + KConfigGroup config( TDEGlobal::config(), "CertificateCreationWizard" ); TQStringList attrOrder = config.readListEntry( "DNAttributeOrder" ); if ( attrOrder.empty() ) attrOrder << "CN!" << "L" << "OU" << "O!" << "C!" << "EMAIL!"; diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp index 2fd144d4c..66f53fe19 100644 --- a/certmanager/certmanager.cpp +++ b/certmanager/certmanager.cpp @@ -930,10 +930,10 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces assert( processname ); assert( mDirmngrProc ); mErrorbuffer = TQString(); - 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 ) ) { + connect( mDirmngrProc, TQT_SIGNAL(processExited(TDEProcess*)), slot ); + connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int) ), + this, TQT_SLOT(slotStderr(TDEProcess*,char*,int)) ); + if( !mDirmngrProc->start( TDEProcess::NotifyOnExit, TDEProcess::Stderr ) ) { delete mDirmngrProc; mDirmngrProc = 0; KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) ); return false; @@ -945,7 +945,7 @@ void CertManager::startImportCRL( const TQString& filename, bool isTempFile ) { assert( !mDirmngrProc ); mImportCRLTempFile = isTempFile ? filename : TQString(); - mDirmngrProc = new KProcess(); + mDirmngrProc = new TDEProcess(); *mDirmngrProc << "gpgsm" << "--call-dirmngr" << "loadcrl" << filename; if ( !connectAndStartDirmngr( TQT_SLOT(slotDirmngrExited()), "gpgsm" ) ) { updateImportActions( true ); @@ -956,13 +956,13 @@ void CertManager::startImportCRL( const TQString& filename, bool isTempFile ) void CertManager::startClearCRLs() { assert( !mDirmngrProc ); - mDirmngrProc = new KProcess(); + mDirmngrProc = new TDEProcess(); *mDirmngrProc << "dirmngr" << "--flush"; //*mDirmngrProc << "gpgsm" << "--call-dimngr" << "flush"; // use this once it's implemented! connectAndStartDirmngr( TQT_SLOT(slotClearCRLsResult()), "dirmngr" ); } -void CertManager::slotStderr( KProcess*, char* buf, int len ) { +void CertManager::slotStderr( TDEProcess*, char* buf, int len ) { mErrorbuffer += TQString::fromLocal8Bit( buf, len ); } @@ -1423,10 +1423,10 @@ void CertManager::importNextURLOrRedisplay() void CertManager::slotStartWatchGnuPG() { - KProcess certManagerProc; + TDEProcess certManagerProc; certManagerProc << "kwatchgnupg"; - if( !certManagerProc.start( KProcess::DontCare ) ) + if( !certManagerProc.start( TDEProcess::DontCare ) ) KMessageBox::error( this, i18n( "Could not start GnuPG LogViewer (kwatchgnupg). " "Please check your installation!" ), i18n( "Kleopatra Error" ) ); diff --git a/certmanager/certmanager.h b/certmanager/certmanager.h index 8f992a00d..835f408c5 100644 --- a/certmanager/certmanager.h +++ b/certmanager/certmanager.h @@ -54,7 +54,7 @@ namespace Kleo { namespace KIO { class Job; } -class KProcess; +class TDEProcess; class KToolBar; class KAction; @@ -118,7 +118,7 @@ private slots: void slotImportCRLJobFinished( KIO::Job * ); void slotDirmngrExited(); - void slotStderr( KProcess*, char*, int ); + void slotStderr( TDEProcess*, char*, int ); void slotToggleRemote(int idx); void slotToggleHierarchicalView( bool ); @@ -182,7 +182,7 @@ private: Kleo::ProgressBar * mProgressBar; TQLabel * mStatusLabel; - KProcess * mDirmngrProc; + TDEProcess * mDirmngrProc; TQString mErrorbuffer; TQPtrList<Kleo::KeyListViewItem> mItemsToDelete; KURL::List mURLsToImport; diff --git a/certmanager/conf/configuredialog.cpp b/certmanager/conf/configuredialog.cpp index db9c7739f..57ed0ee41 100644 --- a/certmanager/conf/configuredialog.cpp +++ b/certmanager/conf/configuredialog.cpp @@ -52,7 +52,7 @@ ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal // the KCMultiDialog starts with the size of the first kcm, not // the largest one. This way at least after the first showing of // the largest kcm the size is kept. - const KConfigGroup geometry( KGlobal::config(), "Geometry" ); + const KConfigGroup geometry( TDEGlobal::config(), "Geometry" ); const int width = geometry.readNumEntry( "ConfigureDialogWidth" ); const int height = geometry.readNumEntry( "ConfigureDialogHeight" ); if ( width != 0 && height != 0 ) { @@ -62,7 +62,7 @@ ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal } void ConfigureDialog::hideEvent( TQHideEvent * ) { - KConfigGroup geometry( KGlobal::config(), "Geometry" ); + KConfigGroup geometry( TDEGlobal::config(), "Geometry" ); geometry.writeEntry( "ConfigureDialogWidth", width() ); geometry.writeEntry( "ConfigureDialogHeight",height() ); } diff --git a/certmanager/crlview.cpp b/certmanager/crlview.cpp index 3318f8ddf..49c27d3e6 100644 --- a/certmanager/crlview.cpp +++ b/certmanager/crlview.cpp @@ -57,7 +57,7 @@ CRLView::CRLView( TQWidget* parent, const char* name, bool modal ) topLayout->addWidget( new TQLabel( i18n("CRL cache dump:"), this ) ); _textView = new TQTextEdit( this ); - _textView->setFont( KGlobalSettings::fixedFont() ); + _textView->setFont( TDEGlobalSettings::fixedFont() ); _textView->setTextFormat( TQTextEdit::LogText ); topLayout->addWidget( _textView ); @@ -99,22 +99,22 @@ void CRLView::slotUpdateView() _textView->clear(); _buffer = TQString(); if( _process == 0 ) { - _process = new KProcess(); + _process = new TDEProcess(); *_process << "gpgsm" << "--call-dirmngr" << "listcrls"; - connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int) ), - this, TQT_SLOT( slotReadStdout( KProcess*, char*, int ) ) ); - connect( _process, TQT_SIGNAL( processExited( KProcess* ) ), + connect( _process, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int) ), + this, TQT_SLOT( slotReadStdout( TDEProcess*, char*, int ) ) ); + connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ), this, TQT_SLOT( slotProcessExited() ) ); } if( _process->isRunning() ) _process->kill(); - if( !_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) { + if( !_process->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout ) ) { KMessageBox::error( this, i18n( "Unable to start gpgsm process. Please check your installation." ), i18n( "Certificate Manager Error" ) ); slotProcessExited(); } _timer->start( 1000 ); } -void CRLView::slotReadStdout( KProcess*, char* buf, int len) +void CRLView::slotReadStdout( TDEProcess*, char* buf, int len) { _buffer.append( TQString::fromUtf8( buf, len ) ); } diff --git a/certmanager/crlview.h b/certmanager/crlview.h index 3de715e2a..eef97debc 100644 --- a/certmanager/crlview.h +++ b/certmanager/crlview.h @@ -38,7 +38,7 @@ class TQTextEdit; class TQPushButton; -class KProcess; +class TDEProcess; class TQTimer; class CRLView : public TQDialog { @@ -51,7 +51,7 @@ public slots: void slotUpdateView(); protected slots: - void slotReadStdout( KProcess*, char* buf, int len); + void slotReadStdout( TDEProcess*, char* buf, int len); void slotProcessExited(); void slotAppendBuffer(); @@ -62,7 +62,7 @@ private: TQTextEdit* _textView; TQPushButton* _updateButton; TQPushButton* _closeButton; - KProcess* _process; + TDEProcess* _process; TQTimer* _timer; TQString _buffer; }; diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp index c50796b46..242643196 100644 --- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp +++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp @@ -69,7 +69,7 @@ KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name setCentralWidget( mCentralWidget ); mWatcher = new KProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) ); - connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + connect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ), this, TQT_SLOT( slotWatcherExited() ) ); connect( mWatcher, TQT_SIGNAL( readReady(KProcIO*) ), this, TQT_SLOT( slotReadStdout() ) ); @@ -127,7 +127,7 @@ void KWatchGnuPGMainWindow::slotConfigureToolbars() void KWatchGnuPGMainWindow::startWatcher() { - disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + disconnect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ), this, TQT_SLOT( slotWatcherExited() ) ); if( mWatcher->isRunning() ) { mWatcher->kill(); @@ -150,7 +150,7 @@ void KWatchGnuPGMainWindow::startWatcher() mCentralWidget->append( tqtr("[%1] Log started") .arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) ); } - connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + connect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ), this, TQT_SLOT( slotWatcherExited() ) ); } @@ -251,7 +251,7 @@ void KWatchGnuPGMainWindow::slotSaveAs() void KWatchGnuPGMainWindow::slotQuit() { - disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ), + disconnect( mWatcher, TQT_SIGNAL( processExited(TDEProcess*) ), this, TQT_SLOT( slotWatcherExited() ) ); mWatcher->kill(); kapp->quit(); diff --git a/certmanager/kwatchgnupg/tray.cpp b/certmanager/kwatchgnupg/tray.cpp index f7740b2f1..a8d2f5872 100644 --- a/certmanager/kwatchgnupg/tray.cpp +++ b/certmanager/kwatchgnupg/tray.cpp @@ -44,7 +44,7 @@ KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin ) { kdDebug() << "KWatchGnuPGTray::KWatchGnuPGTray" << endl; - KGlobal::iconLoader()->addAppDir( "kwatchgnupg" ); + TDEGlobal::iconLoader()->addAppDir( "kwatchgnupg" ); mNormalPix = loadIcon("kwatchgnupg"); mAttentionPix = loadIcon("kwatchgnupg2"); diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp index edfe9be52..2154f7aa6 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp @@ -110,8 +110,8 @@ GpgME::Error Kleo::ChiasmusJob::start() { if ( const GpgME::Error err = setup() ) return mError = err; - connect( mSymCryptRun, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotProcessExited(KProcess*)) ); + connect( mSymCryptRun, TQT_SIGNAL(processExited(TDEProcess*)), + this, TQT_SLOT(slotProcessExited(TDEProcess*)) ); if ( !mSymCryptRun->launch( mInput ) ) return mError = gpg_error( GPG_ERR_ENOENT ); // what else? @@ -120,7 +120,7 @@ GpgME::Error Kleo::ChiasmusJob::start() { return mError = 0; } -GpgME::Error Kleo::ChiasmusJob::slotProcessExited( KProcess * proc ) { +GpgME::Error Kleo::ChiasmusJob::slotProcessExited( TDEProcess * proc ) { if ( proc != mSymCryptRun ) mError = gpg_error( GPG_ERR_INTERNAL ); else if ( mCanceled ) @@ -172,7 +172,7 @@ GpgME::Error Kleo::ChiasmusJob::exec() { if ( const GpgME::Error err = setup() ) return mError = err; - if ( !mSymCryptRun->launch( mInput, KProcess::Block ) ) { + if ( !mSymCryptRun->launch( mInput, TDEProcess::Block ) ) { delete mSymCryptRun; mSymCryptRun = 0; return mError = gpg_error( GPG_ERR_ENOENT ); // what else? } diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.h b/certmanager/lib/backends/chiasmus/chiasmusjob.h index a9e26a04a..1ca6ba19c 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.h +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.h @@ -40,7 +40,7 @@ #include <gpgmepp/context.h> -class KProcess; +class TDEProcess; namespace Kleo { @@ -91,7 +91,7 @@ namespace Kleo { void slotCancel(); private slots: - GpgME::Error slotProcessExited( KProcess * ); + GpgME::Error slotProcessExited( TDEProcess * ); void slotTimeout(); private: diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp index 231cf6ad3..ec396537e 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp @@ -45,7 +45,7 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, c const TQString & keyFile, const TQString & options, Operation mode, TQObject * parent, const char * name ) - : KProcess( parent, name ), + : TDEProcess( parent, name ), mOperation( mode ), mOptions( options ) { *this << "symcryptrun" @@ -58,10 +58,10 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, c Kleo::SymCryptRunProcessBase::~SymCryptRunProcessBase() {} bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm ) { - connect( this, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), - this, TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)) ); - connect( this, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - this, TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)) ); + connect( this, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStdout(TDEProcess*,char*,int)) ); + connect( this, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStderr(TDEProcess*,char*,int)) ); if ( rm == Block ) { KTempFile tempfile; tempfile.setAutoDelete( true ); @@ -72,15 +72,15 @@ bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm tempfile.close(); *this << "--input" << tempfile.name(); addOptions(); - return KProcess::start( Block, All ); + return TDEProcess::start( Block, All ); } else { addOptions(); - const bool ok = KProcess::start( rm, All ); + const bool ok = TDEProcess::start( rm, All ); if ( !ok ) return ok; mInput = input.copy(); writeStdin( mInput.begin(), mInput.size() ); - connect( this, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(closeStdin()) ); + connect( this, TQT_SIGNAL(wroteStdin(TDEProcess*)), this, TQT_SLOT(closeStdin()) ); return true; } } @@ -93,14 +93,14 @@ void Kleo::SymCryptRunProcessBase::addOptions() { } } -void Kleo::SymCryptRunProcessBase::slotReceivedStdout( KProcess * proc, char * buf, int len ) { +void Kleo::SymCryptRunProcessBase::slotReceivedStdout( TDEProcess * proc, char * buf, int len ) { Q_ASSERT( proc == this ); const int oldsize = mOutput.size(); mOutput.resize( oldsize + len ); memcpy( mOutput.data() + oldsize, buf, len ); } -void Kleo::SymCryptRunProcessBase::slotReceivedStderr( KProcess * proc, char * buf, int len ) { +void Kleo::SymCryptRunProcessBase::slotReceivedStderr( TDEProcess * proc, char * buf, int len ) { Q_ASSERT( proc == this ); if ( len > 0 ) mStderr += TQString::fromLocal8Bit( buf, len ); diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h index 281b85530..36866e137 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h @@ -41,7 +41,7 @@ class TQString; namespace Kleo { -class SymCryptRunProcessBase : public KProcess { +class SymCryptRunProcessBase : public TDEProcess { Q_OBJECT public: @@ -61,11 +61,11 @@ public: public slots: /*! upgraded to slot */ - void closeStdin() { KProcess::closeStdin(); } + void closeStdin() { TDEProcess::closeStdin(); } private slots: - void slotReceivedStdout( KProcess *, char *, int ); - void slotReceivedStderr( KProcess *, char *, int ); + void slotReceivedStdout( TDEProcess *, char *, int ); + void slotReceivedStderr( TDEProcess *, char *, int ); private: void addOptions(); diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index 53142fad8..bfd00ac92 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -57,7 +57,7 @@ struct Kleo::GnuPGProcessBase::Private { Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name ) - : KProcess( parent, name ) + : TDEProcess( parent, name ) { d = new Private(); } @@ -76,7 +76,7 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) { // set up the status-fd. This should be in setupCommunication(), // but then it's too late: we need the fd of the pipe to pass it // as argument to the --status-fd option: - // PENDING(marc) find out why KProcess uses both pipe() and socketpair()... + // PENDING(marc) find out why TDEProcess uses both pipe() and socketpair()... if ( ::pipe( d->statusFD ) < 0 ) { kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::start: pipe(2) failed: " << perror << endl; return false; @@ -94,11 +94,11 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) { //arguments.insert( it, "--enable-progress-filter" ); // gpgsm doesn't know this } } - return KProcess::start( runmode, comm ); + return TDEProcess::start( runmode, comm ); } int Kleo::GnuPGProcessBase::setupCommunication( Communication comm ) { - if ( int ok = KProcess::setupCommunication( comm ) ) + if ( int ok = TDEProcess::setupCommunication( comm ) ) return ok; if ( d->usetStatusFD ) { // base class impl returned error, so close our fd's, too @@ -115,13 +115,13 @@ int Kleo::GnuPGProcessBase::commSetupDoneP() { d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this ); connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) ); } - return KProcess::commSetupDoneP(); + return TDEProcess::commSetupDoneP(); } int Kleo::GnuPGProcessBase::commSetupDoneC() { if ( d->usetStatusFD ) ::fcntl( d->statusFD[1], F_SETFD, 0 ); - return KProcess::commSetupDoneC(); + return TDEProcess::commSetupDoneC(); } void Kleo::GnuPGProcessBase::slotChildStatus( int fd ) { @@ -192,7 +192,7 @@ void Kleo::GnuPGProcessBase::parsetStatusOutput() { } void Kleo::GnuPGProcessBase::virtual_hook( int id, void * data ) { - KProcess::virtual_hook( id, data ); + TDEProcess::virtual_hook( id, data ); } #include "gnupgprocessbase.moc" diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h index 4f6dc4ad6..528179a2c 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h @@ -40,12 +40,12 @@ namespace Kleo { /** * @short a base class for GPG and GPGSM processes. * - * This KProcess subclass implements the status-fd handling common + * This TDEProcess subclass implements the status-fd handling common * to GPG and GPGSM. * * @author Marc Mutz <mutz@kde.org> */ - class GnuPGProcessBase : public KProcess { + class GnuPGProcessBase : public TDEProcess { Q_OBJECT public: diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 053a8b924..191ff4279 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -80,7 +80,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) // run the process: int rc = 0; - if ( !proc.start( KProcess::Block ) ) + if ( !proc.start( TDEProcess::Block ) ) rc = -1; else rc = ( proc.normalExit() ) ? proc.exitStatus() : -2 ; @@ -179,7 +179,7 @@ void QGpgMECryptoConfigComponent::runGpgConf() // run the process: int rc = 0; - if ( !proc.start( KProcess::Block ) ) + if ( !proc.start( TDEProcess::Block ) ) rc = -1; else rc = ( proc.normalExit() ) ? proc.exitStatus() : -1 ; @@ -280,20 +280,20 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) if ( runtime ) commandLine += " --runtime"; commandLine += " --change-options "; - commandLine += KProcess::quote( mName ); + commandLine += TDEProcess::quote( mName ); commandLine += " < "; - commandLine += KProcess::quote( tmpFile.name() ); + commandLine += TDEProcess::quote( tmpFile.name() ); //kdDebug(5150) << commandLine << endl; //system( TQCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG - KProcess proc; + TDEProcess proc; proc.setUseShell( true ); proc << commandLine; // run the process: int rc = 0; - if ( !proc.start( KProcess::Block ) ) + if ( !proc.start( TDEProcess::Block ) ) rc = -1; else rc = ( proc.normalExit() ) ? proc.exitStatus() : -1 ; diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp index 16846b59b..6d05e1ecc 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp @@ -107,14 +107,14 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() { mProcess->setUsetStatusFD( true ); - connect( mProcess, TQT_SIGNAL(processExited(KProcess*)), - TQT_SLOT(slotProcessExited(KProcess*)) ); - connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - TQT_SLOT(slotStderr(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(processExited(TDEProcess*)), + TQT_SLOT(slotProcessExited(TDEProcess*)) ); + connect( mProcess, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + TQT_SLOT(slotStderr(TDEProcess*,char*,int)) ); connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); - if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) { + if ( !mProcess->start( TDEProcess::NotifyOnExit, TDEProcess::Stderr ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? deleteLater(); return mError; @@ -182,11 +182,11 @@ void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const TQSt } } -void Kleo::QGpgMERefreshKeysJob::slotStderr( KProcess *, char *, int ) { +void Kleo::QGpgMERefreshKeysJob::slotStderr( TDEProcess *, char *, int ) { // implement? or not? } -void Kleo::QGpgMERefreshKeysJob::slotProcessExited( KProcess * proc ) { +void Kleo::QGpgMERefreshKeysJob::slotProcessExited( TDEProcess * proc ) { if ( proc != mProcess ) return; diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h index ebe871ce6..ac160036f 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h @@ -45,7 +45,7 @@ namespace GpgME { class Error; } -class KProcess; +class TDEProcess; namespace Kleo { @@ -64,8 +64,8 @@ namespace Kleo { void slotCancel(); void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); - void slotStderr( KProcess *, char *, int ); - void slotProcessExited( KProcess * ); + void slotStderr( TDEProcess *, char *, int ); + void slotProcessExited( TDEProcess * ); private: GpgME::Error startAProcess(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp index f409df735..f553c7039 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp @@ -88,16 +88,16 @@ GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const TQStringList & pattern mProcess->setUsetStatusFD( true ); - connect( mProcess, TQT_SIGNAL(processExited(KProcess*)), - TQT_SLOT(slotProcessExited(KProcess*)) ); - connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), - TQT_SLOT(slotStdout(KProcess*,char*,int)) ); - connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - TQT_SLOT(slotStderr(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(processExited(TDEProcess*)), + TQT_SLOT(slotProcessExited(TDEProcess*)) ); + connect( mProcess, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + TQT_SLOT(slotStdout(TDEProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + TQT_SLOT(slotStderr(TDEProcess*,char*,int)) ); connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); - if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { + if ( !mProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? deleteLater(); return mError; @@ -165,7 +165,7 @@ void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const } } -void Kleo::QGpgMESecretKeyExportJob::slotStdout( KProcess * proc, char * buf, int buflen ) { +void Kleo::QGpgMESecretKeyExportJob::slotStdout( TDEProcess * proc, char * buf, int buflen ) { if ( proc != mProcess ) return; if ( buflen <= 0 ) @@ -177,11 +177,11 @@ void Kleo::QGpgMESecretKeyExportJob::slotStdout( KProcess * proc, char * buf, in memcpy( mKeyData.data() + oldlen, buf, buflen ); } -void Kleo::QGpgMESecretKeyExportJob::slotStderr( KProcess *, char *, int ) { +void Kleo::QGpgMESecretKeyExportJob::slotStderr( TDEProcess *, char *, int ) { // implement? or not? } -void Kleo::QGpgMESecretKeyExportJob::slotProcessExited( KProcess * proc ) { +void Kleo::QGpgMESecretKeyExportJob::slotProcessExited( TDEProcess * proc ) { if ( proc != mProcess ) return; diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h index 4c3c8b820..335fd7703 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h @@ -50,7 +50,7 @@ namespace QGpgME { class TQByteArrayDataProvider; } -class KProcess; +class TDEProcess; namespace Kleo { @@ -69,9 +69,9 @@ namespace Kleo { void slotCancel(); void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); - void slotStdout( KProcess *, char *, int ); - void slotStderr( KProcess *, char *, int ); - void slotProcessExited( KProcess * ); + void slotStdout( TDEProcess *, char *, int ); + void slotStderr( TDEProcess *, char *, int ); + void slotProcessExited( TDEProcess * ); private: GnuPGProcessBase * mProcess; diff --git a/certmanager/lib/tests/gnupgviewer.h b/certmanager/lib/tests/gnupgviewer.h index f52774732..9a310d495 100644 --- a/certmanager/lib/tests/gnupgviewer.h +++ b/certmanager/lib/tests/gnupgviewer.h @@ -39,7 +39,7 @@ namespace Kleo { class GnuPGProcessBase; } -class KProcess; +class TDEProcess; class TQStringList; class GnuPGViewer : public TQTextEdit { @@ -52,10 +52,10 @@ public: void setProcess( Kleo::GnuPGProcessBase * process ); private slots: - void slotStdout( KProcess *, char *, int ); - void slotStderr( KProcess *, char *, int ); + void slotStdout( TDEProcess *, char *, int ); + void slotStderr( TDEProcess *, char *, int ); void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); - void slotProcessExited( KProcess * ); + void slotProcessExited( TDEProcess * ); private: Kleo::GnuPGProcessBase * mProcess; diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp index dd94b8d6e..33267350b 100644 --- a/certmanager/lib/tests/test_gnupgprocessbase.cpp +++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp @@ -62,12 +62,12 @@ void GnuPGViewer::setProcess( Kleo::GnuPGProcessBase * process ) { if ( !process ) return; mProcess = process; - connect( mProcess, TQT_SIGNAL(processExited(KProcess*)), - TQT_SLOT(slotProcessExited(KProcess*)) ); - connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), - TQT_SLOT(slotStdout(KProcess*,char*,int)) ); - connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - TQT_SLOT(slotStderr(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(processExited(TDEProcess*)), + TQT_SLOT(slotProcessExited(TDEProcess*)) ); + connect( mProcess, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + TQT_SLOT(slotStdout(TDEProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + TQT_SLOT(slotStderr(TDEProcess*,char*,int)) ); connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); } @@ -91,13 +91,13 @@ static TQString escape( TQString str ) { return str.replace( '&', "&" ).replace( '<', "<" ).replace( '>', ">" ); } -void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) { +void GnuPGViewer::slotStdout( TDEProcess *, char * buffer, int buflen ) { const TQStringList l = split( buffer, buflen, mLastStdout ); for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) append( "stdout: " + escape( *it ) ); } -void GnuPGViewer::slotStderr( KProcess *, char * buffer, int buflen ) { +void GnuPGViewer::slotStderr( TDEProcess *, char * buffer, int buflen ) { const TQStringList l = split( buffer, buflen, mLastStderr ); for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) append( "<b>stderr: " + escape( *it ) + "</b>" ); @@ -105,7 +105,7 @@ void GnuPGViewer::slotStderr( KProcess *, char * buffer, int buflen ) { void GnuPGViewer::slotStatus( Kleo::GnuPGProcessBase *, const TQString & type, const TQStringList & args ) { append( "<b><font color=\"red\">status: " + escape( type + ' ' + args.join( " " ) ) + "</font></b>" ); } -void GnuPGViewer::slotProcessExited( KProcess * proc ) { +void GnuPGViewer::slotProcessExited( TDEProcess * proc ) { if ( !proc ) return; if ( proc->normalExit() ) @@ -135,7 +135,7 @@ int main( int argc, char** argv ) { app.setMainWidget( gv ); gv->show(); - gpg.start( KProcess::NotifyOnExit, KProcess::AllOutput ); + gpg.start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ); return app.exec(); } diff --git a/certmanager/lib/tests/test_keyselectiondialog.cpp b/certmanager/lib/tests/test_keyselectiondialog.cpp index e74c18d84..763a1637a 100644 --- a/certmanager/lib/tests/test_keyselectiondialog.cpp +++ b/certmanager/lib/tests/test_keyselectiondialog.cpp @@ -48,7 +48,7 @@ int main( int argc, char ** argv ) { TDECmdLineArgs::init( argc, argv, &aboutData ); TDEApplication app; - KGlobal::iconLoader()->addAppDir( "libkleopatra" ); + TDEGlobal::iconLoader()->addAppDir( "libkleopatra" ); Kleo::KeySelectionDialog dlg( "Kleo::KeySelectionDialog Test", "Please select a key:", diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp index 1fdbc9e04..cb6e37a8f 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.cpp +++ b/certmanager/lib/ui/cryptoconfigmodule.cpp @@ -58,7 +58,7 @@ using namespace Kleo; static inline TQPixmap loadIcon( TQString s ) { - return KGlobal::instance()->iconLoader() + return TDEGlobal::instance()->iconLoader() ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); } diff --git a/certmanager/lib/ui/keyapprovaldialog.cpp b/certmanager/lib/ui/keyapprovaldialog.cpp index 3933b0a5e..434699d06 100644 --- a/certmanager/lib/ui/keyapprovaldialog.cpp +++ b/certmanager/lib/ui/keyapprovaldialog.cpp @@ -189,7 +189,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients + 2; // don't make the dialog too large - const TQRect desk = KGlobalSettings::desktopGeometry( this ); + const TQRect desk = TDEGlobalSettings::desktopGeometry( this ); setInitialSize( TQSize( kMin( dialogWidth, 3 * desk.width() / 4 ), kMin( dialogHeight, 7 * desk.height() / 8 ) ) ); } diff --git a/certmanager/lib/ui/keyselectiondialog.cpp b/certmanager/lib/ui/keyselectiondialog.cpp index 5bd858ffd..35a97611c 100644 --- a/certmanager/lib/ui/keyselectiondialog.cpp +++ b/certmanager/lib/ui/keyselectiondialog.cpp @@ -395,7 +395,7 @@ void Kleo::KeySelectionDialog::init( bool rememberChoice, bool extendedSelection TQLineEdit * le = new TQLineEdit( page ); le->setText( initialQuery ); TQToolButton *clearButton = new TQToolButton( page ); - clearButton->setIconSet( KGlobal::iconLoader()->loadIconSet( + clearButton->setIconSet( TDEGlobal::iconLoader()->loadIconSet( TDEApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) ); hlay->addWidget( clearButton ); hlay->addWidget( new TQLabel( le, i18n("&Search for:"), page ) ); @@ -449,14 +449,14 @@ void Kleo::KeySelectionDialog::init( bool rememberChoice, bool extendedSelection KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); TQSize dialogSize( 500, 400 ); - KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" ); + KConfigGroup dialogConfig( TDEGlobal::config(), "Key Selection Dialog" ); dialogSize = dialogConfig.readSizeEntry( "Dialog size", &dialogSize ); resize( dialogSize ); } } Kleo::KeySelectionDialog::~KeySelectionDialog() { - KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" ); + KConfigGroup dialogConfig( TDEGlobal::config(), "Key Selection Dialog" ); dialogConfig.writeEntry( "Dialog size", size() ); dialogConfig.sync(); } @@ -548,12 +548,12 @@ void Kleo::KeySelectionDialog::slotHelp() void Kleo::KeySelectionDialog::slotStartCertificateManager( const TQString &query ) { - KProcess certManagerProc; + TDEProcess certManagerProc; certManagerProc << "kleopatra"; if ( !query.isEmpty() ) certManagerProc << "--external" << "--query" << KURL::decode_string( query ); - if( !certManagerProc.start( KProcess::DontCare ) ) + if( !certManagerProc.start( TDEProcess::DontCare ) ) KMessageBox::error( this, i18n( "Could not start certificate manager; " "please check your installation." ), i18n( "Certificate Manager Error" ) ); diff --git a/certmanager/main.cpp b/certmanager/main.cpp index def899b73..f962e4ec3 100644 --- a/certmanager/main.cpp +++ b/certmanager/main.cpp @@ -63,8 +63,8 @@ int main( int argc, char** argv ) TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - KGlobal::locale()->insertCatalogue( "libkleopatra" ); - KGlobal::iconLoader()->addAppDir( "libkleopatra" ); + TDEGlobal::locale()->insertCatalogue( "libkleopatra" ); + TDEGlobal::iconLoader()->addAppDir( "libkleopatra" ); if( !Kleo::CryptoBackendFactory::instance()->smime() ) { KMessageBox::error(0, |