summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkpgp/kpgp.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-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 'libkpgp/kpgp.cpp')
-rw-r--r--libkpgp/kpgp.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp
index 53b77913..f3227ac3 100644
--- a/libkpgp/kpgp.cpp
+++ b/libkpgp/kpgp.cpp
@@ -828,7 +828,7 @@ Module::rereadKey( const KeyID& keyID, const bool readTrust /* = true */ )
return newKey;
}
-QCString
+TQCString
Module::getAsciiPublicKey(const KeyID& keyID)
{
if (0 == pgp) assignPGPBase();
@@ -885,7 +885,7 @@ Module::clear(const bool erasePassPhrase)
wipePassPhrase(true);
}
-const QString
+const TQString
Module::lastErrorMsg(void) const
{
return errMsg;
@@ -930,9 +930,9 @@ Module::selectSecretKey( const TQString& title,
KeyID
Module::selectPublicKey( const TQString& title,
- const TQString& text /* = TQString::null */,
+ const TQString& text /* = TQString() */,
const KeyID& oldKeyId /* = KeyID() */,
- const TQString& address /* = TQString::null */,
+ const TQString& address /* = TQString() */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -966,9 +966,9 @@ Module::selectPublicKey( const TQString& title,
KeyIDList
Module::selectPublicKeys( const TQString& title,
- const TQString& text /* = TQString::null */,
+ const TQString& text /* = TQString() */,
const KeyIDList& oldKeyIds /* = KeyIDList() */,
- const TQString& address /* = TQString::null */,
+ const TQString& address /* = TQString() */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -1044,7 +1044,7 @@ Module::prepareMessageForDecryption( const TQCString& msg,
start = 0;
else
{
- start = msg.find( "\n-----BEGIN PGP" ) + 1;
+ start = msg.tqfind( "\n-----BEGIN PGP" ) + 1;
if( start == 0 )
{
nonPgpBlocks.append( msg );
@@ -1062,20 +1062,20 @@ Module::prepareMessageForDecryption( const TQCString& msg,
else
pgpBlock = UnknownBlock;
- nextEnd = msg.find( "\n-----END PGP", start + 15 );
+ nextEnd = msg.tqfind( "\n-----END PGP", start + 15 );
if( nextEnd == -1 )
{
nonPgpBlocks.append( msg.mid( lastEnd+1 ) );
break;
}
- nextStart = msg.find( "\n-----BEGIN PGP", start + 15 );
+ nextStart = msg.tqfind( "\n-----BEGIN PGP", start + 15 );
if( ( nextStart == -1 ) || ( nextEnd < nextStart ) ||
( pgpBlock == ClearsignedBlock ) )
{ // most likely we found a PGP block (but we don't check if it's valid)
// store the preceding non-PGP block
nonPgpBlocks.append( msg.mid( lastEnd+1, start-lastEnd-1 ) );
- lastEnd = msg.find( "\n", nextEnd + 14 );
+ lastEnd = msg.tqfind( "\n", nextEnd + 14 );
if( lastEnd == -1 )
{
pgpBlocks.append( new Block( msg.mid( start ) ) );
@@ -1086,7 +1086,7 @@ Module::prepareMessageForDecryption( const TQCString& msg,
{
pgpBlocks.append( new Block( msg.mid( start, lastEnd+1-start ) ) );
if( ( nextStart != -1 ) && ( nextEnd > nextStart ) )
- nextStart = msg.find( "\n-----BEGIN PGP", lastEnd+1 );
+ nextStart = msg.tqfind( "\n-----BEGIN PGP", lastEnd+1 );
}
}
@@ -1333,7 +1333,7 @@ Module::checkForPGP(void)
havePgp=FALSE;
path = getenv("PATH");
- while((index = path.find(":",lastindex+1)) != -1)
+ while((index = path.tqfind(":",lastindex+1)) != -1)
{
pSearchPaths.append(path.mid(lastindex+1,index-lastindex-1));
lastindex = index;
@@ -1478,7 +1478,7 @@ Module::assignPGPBase(void)
}
}
-QString
+TQString
Module::canonicalAddress( const TQString& _adress )
{
int index,index2;
@@ -1487,12 +1487,12 @@ Module::canonicalAddress( const TQString& _adress )
address = address.stripWhiteSpace();
// just leave pure e-mail address.
- if((index = address.find("<")) != -1)
- if((index2 = address.find("@",index+1)) != -1)
- if((index2 = address.find(">",index2+1)) != -1)
+ if((index = address.tqfind("<")) != -1)
+ if((index2 = address.tqfind("@",index+1)) != -1)
+ if((index2 = address.tqfind(">",index2+1)) != -1)
return address.mid(index,index2-index+1);
- if((index = address.find("@")) == -1)
+ if((index = address.tqfind("@")) == -1)
{
// local address
//char hostname[1024];
@@ -1503,7 +1503,7 @@ Module::canonicalAddress( const TQString& _adress )
else
{
int index1 = address.findRev(" ",index);
- int index2 = address.find(" ",index);
+ int index2 = address.tqfind(" ",index);
if(index2 == -1) index2 = address.length();
return "<" + address.mid(index1+1 ,index2-index1-1) + ">";
}
@@ -1598,7 +1598,7 @@ Module::readSecretKeys( bool reread )
KeyID
Module::selectKey( const KeyList& keys,
const TQString& title,
- const TQString& text /* = TQString::null */ ,
+ const TQString& text /* = TQString() */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1621,7 +1621,7 @@ Module::selectKey( const KeyList& keys,
KeyIDList
Module::selectKeys( const KeyList& keys,
const TQString& title,
- const TQString& text /* = TQString::null */ ,
+ const TQString& text /* = TQString() */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1646,7 +1646,7 @@ KeyID
Module::selectKey( bool& rememberChoice,
const KeyList& keys,
const TQString& title,
- const TQString& text /* = TQString::null */ ,
+ const TQString& text /* = TQString() */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1674,7 +1674,7 @@ KeyIDList
Module::selectKeys( bool& rememberChoice,
const KeyList& keys,
const TQString& title,
- const TQString& text /* = TQString::null */ ,
+ const TQString& text /* = TQString() */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{