diff options
Diffstat (limited to 'tdenewstuff/security.cpp')
| -rw-r--r-- | tdenewstuff/security.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tdenewstuff/security.cpp b/tdenewstuff/security.cpp index 3bca16166..07cb798c0 100644 --- a/tdenewstuff/security.cpp +++ b/tdenewstuff/security.cpp @@ -26,7 +26,7 @@ #include <kmdcodec.h> #include <tdemessagebox.h> #include <kpassdlg.h> -#include <kprocio.h> +#include <tdeprocio.h> //app includes #include "security.h" @@ -50,15 +50,15 @@ void Security::readKeys() { if (m_gpgRunning) { - TQTimer::singleShot(5, this, TQT_SLOT(readKeys())); + TQTimer::singleShot(5, this, TQ_SLOT(readKeys())); return; } m_runMode = List; m_keys.clear(); - KProcIO *readProcess=new KProcIO(); + TDEProcIO *readProcess=new TDEProcIO(); *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys"; - connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *))); - connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *))); + connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *))); + connect(readProcess, TQ_SIGNAL(readReady(TDEProcIO *)) ,this, TQ_SLOT(slotDataArrived(TDEProcIO *))); if (!readProcess->start(TDEProcess::NotifyOnExit, true)) KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>")); else @@ -69,14 +69,14 @@ void Security::readSecretKeys() { if (m_gpgRunning) { - TQTimer::singleShot(5, this, TQT_SLOT(readSecretKeys())); + TQTimer::singleShot(5, this, TQ_SLOT(readSecretKeys())); return; } m_runMode = ListSecret; - KProcIO *readProcess=new KProcIO(); + TDEProcIO *readProcess=new TDEProcIO(); *readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys"; - connect(readProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessExited(TDEProcess *))); - connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *))); + connect(readProcess, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(slotProcessExited(TDEProcess *))); + connect(readProcess, TQ_SIGNAL(readReady(TDEProcIO *)) ,this, TQ_SLOT(slotDataArrived(TDEProcIO *))); if (readProcess->start(TDEProcess::NotifyOnExit, true)) m_gpgRunning = true; } @@ -98,7 +98,7 @@ void Security::slotProcessExited(TDEProcess *process) delete process; } -void Security::slotDataArrived(KProcIO *procIO) +void Security::slotDataArrived(TDEProcIO *procIO) { TQString data; while (procIO->readln(data, true) != -1) @@ -206,7 +206,7 @@ void Security::slotCheckValidity() { if (!m_keysRead || m_gpgRunning) { - TQTimer::singleShot(5, this, TQT_SLOT(slotCheckValidity())); + TQTimer::singleShot(5, this, TQ_SLOT(slotCheckValidity())); return; } if (m_keys.count() == 0) @@ -226,7 +226,7 @@ void Security::slotCheckValidity() if (file.open(IO_ReadOnly)) { context.reset(); - context.update(TQT_TQIODEVICE_OBJECT(file)); + context.update(file); md5sum = context.hexDigest(); file.close(); } @@ -246,10 +246,10 @@ void Security::slotCheckValidity() m_signatureKey.trusted = false; //verify the signature - KProcIO *verifyProcess=new KProcIO(); + TDEProcIO *verifyProcess=new TDEProcIO(); *verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName; - connect(verifyProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *))); - connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *))); + connect(verifyProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *))); + connect(verifyProcess, TQ_SIGNAL(readReady(TDEProcIO *)),this, TQ_SLOT(slotDataArrived(TDEProcIO *))); if (verifyProcess->start(TDEProcess::NotifyOnExit,true)) m_gpgRunning = true; else @@ -270,7 +270,7 @@ void Security::slotSignFile() { if (!m_keysRead || m_gpgRunning) { - TQTimer::singleShot(5, this, TQT_SLOT(slotSignFile())); + TQTimer::singleShot(5, this, TQ_SLOT(slotSignFile())); return; } @@ -298,7 +298,7 @@ void Security::slotSignFile() if (file.open(IO_ReadOnly)) { context.reset(); - context.update(TQT_TQIODEVICE_OBJECT(file)); + context.update(file); md5sum = context.hexDigest(); file.close(); } @@ -326,10 +326,10 @@ void Security::slotSignFile() m_secretKey = secretKeys[0]; //verify the signature - KProcIO *signProcess=new KProcIO(); + TDEProcIO *signProcess=new TDEProcIO(); *signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName; - connect(signProcess, TQT_SIGNAL(processExited(TDEProcess *)),this, TQT_SLOT(slotProcessExited(TDEProcess *))); - connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *))); + connect(signProcess, TQ_SIGNAL(processExited(TDEProcess *)),this, TQ_SLOT(slotProcessExited(TDEProcess *))); + connect(signProcess, TQ_SIGNAL(readReady(TDEProcIO *)),this, TQ_SLOT(slotDataArrived(TDEProcIO *))); m_runMode = Sign; if (signProcess->start(TDEProcess::NotifyOnExit,true)) m_gpgRunning = true; |
