diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp')
-rw-r--r-- | certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index 9e7461791..d179aa953 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -56,8 +56,8 @@ struct Kleo::GnuPGProcessBase::Private { }; -Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name ) - : KProcess( parent, name ) +Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * tqparent, const char * name ) + : KProcess( tqparent, name ) { d = new Private(); } @@ -113,7 +113,7 @@ int Kleo::GnuPGProcessBase::commSetupDoneP() { if ( d->useStatusFD ) { ::close( d->statusFD[1] ); // close the input end of the pipe, we're the reader d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this ); - connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) ); + connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildtqStatus(int)) ); } return KProcess::commSetupDoneP(); } @@ -124,12 +124,12 @@ int Kleo::GnuPGProcessBase::commSetupDoneC() { return KProcess::commSetupDoneC(); } -void Kleo::GnuPGProcessBase::slotChildStatus( int fd ) { - if ( !childStatus(fd) ) - closeStatus(); +void Kleo::GnuPGProcessBase::slotChildtqStatus( int fd ) { + if ( !childtqStatus(fd) ) + closetqStatus(); } -bool Kleo::GnuPGProcessBase::closeStatus() { +bool Kleo::GnuPGProcessBase::closetqStatus() { if ( !d->useStatusFD ) return false; d->useStatusFD = false; @@ -138,7 +138,7 @@ bool Kleo::GnuPGProcessBase::closeStatus() { return true; } -int Kleo::GnuPGProcessBase::childStatus( int fd ) { +int Kleo::GnuPGProcessBase::childtqStatus( int fd ) { char buf[1024]; const int len = ::read( fd, buf, sizeof(buf)-1 ); if ( len > 0 ) { @@ -158,28 +158,28 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { static const int startTokenLen = sizeof startToken / sizeof *startToken - 1; int lineStart = 0; - for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { + for ( int lineEnd = d->statusBuffer.tqfind( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.tqfind( '\n', lineStart = lineEnd+1 ) ) { // get next line: const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) continue; // check status token if ( line.left( startTokenLen ) != startToken ) { - kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childStatus: status-fd protocol error: line doesn't begin with \"" + kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childtqStatus: status-fd protocol error: line doesn't begin with \"" << startToken << "\"" << endl; continue; } // remove status token: const TQCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' '; if ( command == " " ) { - kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childStatus: status-fd protocol error: line without content." << endl; + kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childtqStatus: status-fd protocol error: line without content." << endl; continue; } // split into base and args TQString cmd; TQStringList args; int tagStart = 0; - for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { + for ( int tagEnd = command.tqfind( ' ' ) ; tagEnd >= 0 ; tagEnd = command.tqfind( ' ', tagStart = tagEnd+1 ) ) { const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); |