summaryrefslogtreecommitdiffstats
path: root/kioslave/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/smtp')
-rw-r--r--kioslave/smtp/capabilities.cc2
-rw-r--r--kioslave/smtp/capabilities.h4
-rw-r--r--kioslave/smtp/command.cc4
-rw-r--r--kioslave/smtp/interactivesmtpserver.h8
-rw-r--r--kioslave/smtp/request.cc8
-rw-r--r--kioslave/smtp/response.cc4
-rw-r--r--kioslave/smtp/response.h2
-rw-r--r--kioslave/smtp/smtp.cc2
-rw-r--r--kioslave/smtp/smtp.h4
-rw-r--r--kioslave/smtp/test_commands.cc14
10 files changed, 27 insertions, 25 deletions
diff --git a/kioslave/smtp/capabilities.cc b/kioslave/smtp/capabilities.cc
index 5b2856837..0172934dd 100644
--- a/kioslave/smtp/capabilities.cc
+++ b/kioslave/smtp/capabilities.cc
@@ -126,7 +126,7 @@ namespace KioSMTP {
if ( it.key() == "AUTH" )
result += it.data();
else if ( it.key().startsWith( "AUTH=" ) ) {
- result.push_back( it.key().mid( qstrlen("AUTH=") ) );
+ result.push_back( it.key().mid( tqstrlen("AUTH=") ) );
result += it.data();
}
}
diff --git a/kioslave/smtp/capabilities.h b/kioslave/smtp/capabilities.h
index 9f9464104..e859f4055 100644
--- a/kioslave/smtp/capabilities.h
+++ b/kioslave/smtp/capabilities.h
@@ -54,10 +54,10 @@ namespace KioSMTP {
void clear() { mCapabilities.clear(); }
bool have( const TQString & cap ) const {
- return mCapabilities.find( cap.upper() ) != mCapabilities.end();
+ return mCapabilities.tqfind( cap.upper() ) != mCapabilities.end();
}
bool have( const TQCString & cap ) const { return have( TQString( cap.data() ) ); }
- bool have( const char * cap ) const { return have( TQString::fromLatin1( cap ) ); }
+ bool have( const char * cap ) const { return have( TQString::tqfromLatin1( cap ) ); }
TQString asMetaDataString() const;
diff --git a/kioslave/smtp/command.cc b/kioslave/smtp/command.cc
index 2771baf82..41c9cf78a 100644
--- a/kioslave/smtp/command.cc
+++ b/kioslave/smtp/command.cc
@@ -321,14 +321,14 @@ static sasl_callback_t callbacks[] = {
cmd = mUngetSASLResponse;
mUngetSASLResponse = 0;
} else if ( mFirstTime ) {
- TQString firstCommand = "AUTH " + TQString::fromLatin1( mMechusing );
+ TQString firstCommand = "AUTH " + TQString::tqfromLatin1( mMechusing );
tmp.setRawData( mOut, mOutlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( mOut, mOutlen );
if ( !challenge.isEmpty() ) {
firstCommand += " ";
- firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::tqfromLatin1( challenge.data(), challenge.size() );
}
cmd = firstCommand.latin1();
diff --git a/kioslave/smtp/interactivesmtpserver.h b/kioslave/smtp/interactivesmtpserver.h
index 39a07f6a9..556b3cb3d 100644
--- a/kioslave/smtp/interactivesmtpserver.h
+++ b/kioslave/smtp/interactivesmtpserver.h
@@ -49,10 +49,10 @@ static TQString err2str( int err ) {
static TQString escape( TQString s ) {
return s
- .replace( '&', "&" )
- .replace( '>', ">" )
- .replace( '<', "&lt;" )
- .replace( '"', "&quot;" )
+ .tqreplace( '&', "&amp;" )
+ .tqreplace( '>', "&gt;" )
+ .tqreplace( '<', "&lt;" )
+ .tqreplace( '"', "&quot;" )
;
}
diff --git a/kioslave/smtp/request.cc b/kioslave/smtp/request.cc
index ab02abc1c..22042769b 100644
--- a/kioslave/smtp/request.cc
+++ b/kioslave/smtp/request.cc
@@ -50,7 +50,7 @@ namespace KioSMTP {
kdDebug(7112) << "Parsing request from query:\n" + query.join("\n" ) << endl;
#endif
for ( TQStringList::const_iterator it = query.begin() ; it != query.end() ; ++it ) {
- int equalsPos = (*it).find( '=' );
+ int equalsPos = (*it).tqfind( '=' );
if ( equalsPos <= 0 )
continue;
@@ -93,7 +93,7 @@ namespace KioSMTP {
static bool isUsAscii( const TQString & s ) {
for ( uint i = 0 ; i < s.length() ; ++i )
- if ( s[i].unicode() > 127 ) return false;
+ if ( s[i].tqunicode() > 127 ) return false;
return true;
}
@@ -101,7 +101,7 @@ namespace KioSMTP {
static inline bool isSpecial( char ch ) {
static const TQCString specials = "()<>[]:;@\\,.\"";
- return specials.find( ch ) >= 0;
+ return specials.tqfind( ch ) >= 0;
}
@@ -159,7 +159,7 @@ namespace KioSMTP {
static TQCString formatSubject( TQString s ) {
if ( isUsAscii( s ) )
- return s.remove( '\n' ).latin1(); // don't break header folding,
+ return TQString(s.remove( '\n' )).latin1(); // don't break header folding,
// so remove any line break
// that happen to be around
else
diff --git a/kioslave/smtp/response.cc b/kioslave/smtp/response.cc
index ec5067871..8ae8cdceb 100644
--- a/kioslave/smtp/response.cc
+++ b/kioslave/smtp/response.cc
@@ -103,10 +103,10 @@ namespace KioSMTP {
TQString msg;
if ( lines().count() > 1 )
msg = i18n("The server responded:\n%1")
- .arg( join( '\n', lines() ) );
+ .arg( static_cast<const char *>(join( '\n', lines()) ) );
else
msg = i18n("The server responded: \"%1\"")
- .arg( lines().front() );
+ .arg( static_cast<const char *>(lines().front()) );
if ( first() == 4 )
msg += '\n' + i18n("This is a temporary failure. "
"You may try again later.");
diff --git a/kioslave/smtp/response.h b/kioslave/smtp/response.h
index 26c79b9c1..2fd48ebf3 100644
--- a/kioslave/smtp/response.h
+++ b/kioslave/smtp/response.h
@@ -49,7 +49,7 @@ namespace KioSMTP {
mWellFormed(true) {}
void parseLine( const char * line ) {
- parseLine( line, qstrlen( line ) );
+ parseLine( line, tqstrlen( line ) );
}
void parseLine( const char * line, int len );
diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc
index e493f5132..883ee3ebb 100644
--- a/kioslave/smtp/smtp.cc
+++ b/kioslave/smtp/smtp.cc
@@ -200,7 +200,7 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
KURL open_url = url;
if ( !request.hasProfile() ) {
//kdDebug(7112) << "kio_smtp: Profile is null" << endl;
- bool hasProfile = mset.profiles().contains( open_url.host() );
+ bool hasProfile = mset.profiles().tqcontains( open_url.host() );
if ( hasProfile ) {
mset.setProfile(open_url.host());
open_url.setHost(mset.getSetting(KEMailSettings::OutServer));
diff --git a/kioslave/smtp/smtp.h b/kioslave/smtp/smtp.h
index 18f489c2c..bcdcaaae3 100644
--- a/kioslave/smtp/smtp.h
+++ b/kioslave/smtp/smtp.h
@@ -1,6 +1,6 @@
/* -*- c++ -*-
* Copyright (c) 2000, 2001 Alex Zepeda <[email protected]>
- * Copyright (c) 2001 Michael H�ckel <[email protected]>
+ * Copyright (c) 2001 Michael H�ckel <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,9 @@
class KURL;
class TQCString;
template <typename T> class TQMemArray;
+#ifdef USE_QT3
typedef TQMemArray<char> TQByteArray;
+#endif // USE_QT3
namespace KioSMTP {
class Response;
diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc
index 680514b10..fd3adb949 100644
--- a/kioslave/smtp/test_commands.cc
+++ b/kioslave/smtp/test_commands.cc
@@ -55,7 +55,7 @@ public:
}
bool usingSSL() const { return usesSSL; }
bool usingTLS() const { return usesTLS; }
- bool haveCapability( const char * cap ) const { return caps.contains( cap ); }
+ bool haveCapability( const char * cap ) const { return caps.tqcontains( cap ); }
void error( int id, const TQString & msg ) {
lastErrorCode = id;
lastErrorMessage = msg;
@@ -82,16 +82,16 @@ public:
using namespace KioSMTP;
static const char * foobarbaz = ".Foo bar baz";
-static const unsigned int foobarbaz_len = qstrlen( foobarbaz );
+static const unsigned int foobarbaz_len = tqstrlen( foobarbaz );
static const char * foobarbaz_dotstuffed = "..Foo bar baz";
-static const unsigned int foobarbaz_dotstuffed_len = qstrlen( foobarbaz_dotstuffed );
+static const unsigned int foobarbaz_dotstuffed_len = tqstrlen( foobarbaz_dotstuffed );
static const char * foobarbaz_lf = ".Foo bar baz\n";
-static const unsigned int foobarbaz_lf_len = qstrlen( foobarbaz_lf );
+static const unsigned int foobarbaz_lf_len = tqstrlen( foobarbaz_lf );
static const char * foobarbaz_crlf = "..Foo bar baz\r\n";
-static const unsigned int foobarbaz_crlf_len = qstrlen( foobarbaz_crlf );
+static const unsigned int foobarbaz_crlf_len = tqstrlen( foobarbaz_crlf );
static void checkSuccessfulTransferCommand( bool, bool, bool, bool, bool );
@@ -657,10 +657,10 @@ void checkSuccessfulTransferCommand( bool error, bool preload, bool ungetLast,
mailEndsInNewline ? foobarbaz_lf : foobarbaz
:
mailEndsInNewline ? foobarbaz_crlf : foobarbaz_dotstuffed ;
- const unsigned int s_pre_len = qstrlen( s_pre );
+ const unsigned int s_pre_len = tqstrlen( s_pre );
const char * s_post = mailEndsInNewline ? foobarbaz_crlf : foobarbaz_dotstuffed ;
- //const unsigned int s_post_len = qstrlen( s_post );
+ //const unsigned int s_post_len = tqstrlen( s_post );
TransferCommand xfer( &smtp, preload ? s_post : 0 );