summaryrefslogtreecommitdiffstats
path: root/libkgpgfile
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-01 13:19:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-01 13:19:48 -0600
commitaa85254cd16cb870b8d1649ef1dbad09bd8491e8 (patch)
tree850c18efae9bd6bc03f83c16fe4caf8670b67f43 /libkgpgfile
parent4aafeadd9f7ae0e603589579d467588c7421a283 (diff)
downloadkmymoney-aa85254cd16cb870b8d1649ef1dbad09bd8491e8.tar.gz
kmymoney-aa85254cd16cb870b8d1649ef1dbad09bd8491e8.zip
Rename additional global TQt functions
Diffstat (limited to 'libkgpgfile')
-rw-r--r--libkgpgfile/kgpgfile.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp
index 56f3dd5..0cf449f 100644
--- a/libkgpgfile/kgpgfile.cpp
+++ b/libkgpgfile/kgpgfile.cpp
@@ -74,7 +74,7 @@ KGPGFile::KGPGFile(const TQString& fn, const TQString& homedir, const TQString&
setName(fn);
m_exitStatus = -2;
m_comment = "created by KGPGFile";
- // qDebug("ungetchbuffer %d", m_ungetchBuffer.length());
+ // tqDebug("ungetchbuffer %d", m_ungetchBuffer.length());
}
KGPGFile::~KGPGFile()
@@ -99,7 +99,7 @@ void KGPGFile::setName(const TQString& fn)
TQDir dir(fn);
m_fn = dir.absPath();
}
- // qDebug("setName: '%s'", m_fn.data());
+ // tqDebug("setName: '%s'", m_fn.data());
}
void KGPGFile::flush(void)
@@ -121,30 +121,30 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
{
bool useOwnPassphrase = (getenv("GPG_AGENT_INFO") == 0);
- // qDebug("KGPGFile::open(%d)", mode);
+ // tqDebug("KGPGFile::open(%d)", mode);
m_errmsg.resize(1);
if(isOpen()) {
- // qDebug("File already open");
+ // tqDebug("File already open");
return false;
}
- // qDebug("check filename empty");
+ // tqDebug("check filename empty");
if(m_fn.isEmpty())
return false;
- // qDebug("setup file structures");
+ // tqDebug("setup file structures");
init();
setMode(mode);
- // qDebug("check valid access mode");
+ // tqDebug("check valid access mode");
if(!(isReadable() || isWritable()))
return false;
if(isWritable()) {
- // qDebug("check recipient count");
+ // tqDebug("check recipient count");
if(m_recipient.count() == 0)
return false;
- // qDebug("check access rights");
+ // tqDebug("check access rights");
if(!checkAccess(m_fn, W_OK))
return false;
}
@@ -191,11 +191,11 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
pwd = TQCString(dlg.password());
}
- // qDebug("starting GPG process");
+ // tqDebug("starting GPG process");
if(!startProcess(args))
return false;
- // qDebug("check GPG process running");
+ // tqDebug("check GPG process running");
if(!m_process) {
// if the process is not present anymore, we have to check
// if it was a read operation and we might already have data
@@ -209,9 +209,9 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
}
if(isReadable() && useOwnPassphrase && !skipPasswd) {
- // qDebug("Passphrase is '%s'", pwd.data());
+ // tqDebug("Passphrase is '%s'", pwd.data());
if(_writeBlock(pwd.data(), pwd.length()) == -1) {
- // qDebug("Sending passphrase failed");
+ // tqDebug("Sending passphrase failed");
return false;
}
m_process->closeStdin();
@@ -219,7 +219,7 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
setState( IO_Open );
at( 0 );
- // qDebug("File open");
+ // tqDebug("File open");
return true;
}
@@ -231,7 +231,7 @@ bool KGPGFile::startProcess(const TQStringList& args)
*m_process << args;
// TQString arglist = args.join(":");
- // qDebug("gpg '%s'", arglist.data());
+ // tqDebug("gpg '%s'", arglist.data());
connect(m_process, TQT_SIGNAL(processExited(KProcess *)),
this, TQT_SLOT(slotGPGExited(KProcess *)));
@@ -246,7 +246,7 @@ bool KGPGFile::startProcess(const TQStringList& args)
this, TQT_SLOT(slotSendDataToGPG(KProcess *)));
if(!m_process->start(KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdin|KProcess::Stdout|KProcess::Stderr))) {
- // qDebug("m_process->start failed");
+ // tqDebug("m_process->start failed");
delete m_process;
m_process = 0;
return false;
@@ -259,16 +259,16 @@ bool KGPGFile::startProcess(const TQStringList& args)
void KGPGFile::close(void)
{
- // qDebug("KGPGFile::close()");
+ // tqDebug("KGPGFile::close()");
if(!isOpen()) {
- // qDebug("File not open");
+ // tqDebug("File not open");
return;
}
// finish the KProcess and clean up things
if(m_process) {
if(isWritable()) {
- // qDebug("Finish writing");
+ // tqDebug("Finish writing");
if(m_process->isRunning()) {
m_process->closeStdin();
// now wait for GPG to finish
@@ -278,7 +278,7 @@ void KGPGFile::close(void)
m_process->kill();
} else if(isReadable()) {
- // qDebug("Finish reading");
+ // tqDebug("Finish reading");
if(m_process->isRunning()) {
m_process->closeStdout();
// now wait for GPG to finish
@@ -291,7 +291,7 @@ void KGPGFile::close(void)
m_ungetchBuffer = TQCString();
setState(0);
m_recipient.clear();
- // qDebug("File closed");
+ // tqDebug("File closed");
}
int KGPGFile::getch(void)
@@ -312,7 +312,7 @@ int KGPGFile::getch(void)
ch = (readBlock(buf,1) == 1) ? (buf[0] & 0xff) : EOF;
}
- // qDebug("getch returns 0x%02X", ch);
+ // tqDebug("getch returns 0x%02X", ch);
return ch;
}
@@ -324,7 +324,7 @@ int KGPGFile::ungetch(int ch)
return EOF;
if(ch != EOF) {
- // qDebug("store 0x%02X in ungetchbuffer", ch & 0xff);
+ // tqDebug("store 0x%02X in ungetchbuffer", ch & 0xff);
m_ungetchBuffer.insert(0, ch & 0xff);
}
@@ -391,7 +391,7 @@ TQ_LONG KGPGFile::readBlock(char *data, TQ_ULONG maxlen)
m_ungetchBuffer.remove(0, l);
if(!m_process) {
- // qDebug("read %d bytes from unget buffer", nread);
+ // tqDebug("read %d bytes from unget buffer", nread);
// dumpBuffer(oridata, nread);
return nread;
}
@@ -399,7 +399,7 @@ TQ_LONG KGPGFile::readBlock(char *data, TQ_ULONG maxlen)
// check for EOF
if(!m_process) {
- // qDebug("EOF (no process)");
+ // tqDebug("EOF (no process)");
return EOF;
}
@@ -412,10 +412,10 @@ TQ_LONG KGPGFile::readBlock(char *data, TQ_ULONG maxlen)
}
// if nothing has been read (maxlen-m_readRemain == 0) then we assume EOF
if((maxlen - m_readRemain) == 0) {
- // qDebug("EOF (nothing read)");
+ // tqDebug("EOF (nothing read)");
return EOF;
}
- // qDebug("return %d bytes", maxlen - m_readRemain);
+ // tqDebug("return %d bytes", maxlen - m_readRemain);
// dumpBuffer(oridata, maxlen - m_readRemain);
return maxlen - m_readRemain;
}
@@ -439,7 +439,7 @@ TQByteArray KGPGFile::readAll(void)
void KGPGFile::slotGPGExited(KProcess* )
{
- // qDebug("GPG finished");
+ // tqDebug("GPG finished");
if(m_process) {
if(m_process->normalExit()) {
m_exitStatus = m_process->exitStatus();
@@ -460,7 +460,7 @@ void KGPGFile::slotGPGExited(KProcess* )
void KGPGFile::slotDataFromGPG(KProcess* proc, char* buf, int len)
{
- // qDebug("Received %d bytes on stdout", len);
+ // tqDebug("Received %d bytes on stdout", len);
// copy current buffer to application
int copylen;
@@ -487,12 +487,12 @@ void KGPGFile::slotDataFromGPG(KProcess* proc, char* buf, int len)
tqApp->exit_loop();
}
}
- // qDebug("end slotDataFromGPG");
+ // tqDebug("end slotDataFromGPG");
}
void KGPGFile::slotErrorFromGPG(KProcess *, char *buf, int len)
{
- // qDebug("Received %d bytes on stderr", len);
+ // tqDebug("Received %d bytes on stderr", len);
TQCString msg;
msg.setRawData(buf, len);
m_errmsg += msg;
@@ -501,7 +501,7 @@ void KGPGFile::slotErrorFromGPG(KProcess *, char *buf, int len)
void KGPGFile::slotSendDataToGPG(KProcess *)
{
- // qDebug("wrote stdin");
+ // tqDebug("wrote stdin");
if(m_needExitLoop) {
m_needExitLoop = false;
tqApp->exit_loop();
@@ -562,7 +562,7 @@ void KGPGFile::publicKeyList(TQStringList& list, const TQString& pattern)
TQStringList::iterator it;
TQString currentKey;
for(it = lines.begin(); it != lines.end(); ++it) {
- // qDebug("Parsing: '%s'", (*it).data());
+ // tqDebug("Parsing: '%s'", (*it).data());
TQStringList fields = TQStringList::split(":", (*it), true);
TQString val;
if(fields[0] == "pub") {
@@ -572,7 +572,7 @@ void KGPGFile::publicKeyList(TQStringList& list, const TQString& pattern)
val = TQString("%1:%2").arg(currentKey).arg(fields[9]);
map[val] = val;
} else {
- qDebug("'%s' is expired", fields[9].data());
+ tqDebug("'%s' is expired", fields[9].data());
}
} else if(fields[0] == "uid") {
val = TQString("%1:%2").arg(currentKey).arg(fields[9]);
@@ -610,7 +610,7 @@ void KGPGFile::secretKeyList(TQStringList& list)
TQStringList::iterator it;
TQString currentKey;
for(it = lines.begin(); it != lines.end(); ++it) {
- // qDebug("Parsing: '%s'", (*it).data());
+ // tqDebug("Parsing: '%s'", (*it).data());
TQStringList fields = TQStringList::split(":", (*it), true);
if(fields[0] == "sec") {
currentKey = fields[4];
@@ -663,7 +663,7 @@ void KGPGFile::dumpBuffer(char *s, int len) const
while(1) {
if(addr && !(addr & 0x0f)) {
- qDebug("%s %s", data.data(), chars.data());
+ tqDebug("%s %s", data.data(), chars.data());
if(!len)
break;
}