From 13281e2856a2ef43bbab78c5528470309c23aa77 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:48:49 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kioslave/http/kcookiejar/kcookiejar.cpp | 28 +++++++++++------------ kioslave/http/kcookiejar/kcookiejar.h | 2 +- kioslave/http/kcookiejar/kcookiewin.cpp | 2 +- kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 10 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'kioslave/http/kcookiejar') diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index 136fba0b1..ec0a423a6 100644 --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -84,12 +84,12 @@ #define READ_BUFFER_SIZE 8192 #define IP_ADDRESS_EXPRESSION "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" -// Note with respect to TQString::tqfromLatin1( ) +// Note with respect to TQString::fromLatin1( ) // Cookies are stored as 8 bit data and passed to kio_http as // latin1 regardless of their actual encoding. // L1 is used to indicate latin1 constants -#define L1(x) TQString::tqfromLatin1(x) +#define L1(x) TQString::fromLatin1(x) template class TQPtrList; template class TQPtrDict; @@ -154,9 +154,9 @@ KHttpCookie::KHttpCookie(const TQString &_host, // // Checks if a cookie has been expired // -bool KHttpCookie::isExpired(time_t tqcurrentDate) +bool KHttpCookie::isExpired(time_t currentDate) { - return (mExpireDate != 0) && (mExpireDate < tqcurrentDate); + return (mExpireDate != 0) && (mExpireDate < currentDate); } // @@ -479,7 +479,7 @@ static const char * parseNameValue(const char *header, // No '=' sign -> use string as the value, name is empty // (behavior found in Mozilla and IE) Name = ""; - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate( s - header ); Value = Value.stripWhiteSpace(); return (s); @@ -516,12 +516,12 @@ static const char * parseNameValue(const char *header, if ((*s=='\0') || (*s=='\n')) { // End of Name - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate(s - header); return (s); } } - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); // *s == '\"'; if (keepQuotes) Value.truncate( ++s - header ); @@ -542,7 +542,7 @@ static const char * parseNameValue(const char *header, while ((*s != '\0') && (*s != ';') && (*s != '\n')) s++; // End of Name - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate( s - header ); Value = Value.stripWhiteSpace(); } @@ -618,7 +618,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, return; } // Return numeric IPv4 addresses as is... - if ((_fqdn.tqat(0) >= TQChar('0')) && (_fqdn.tqat(0) <= TQChar('9'))) + if ((_fqdn.at(0) >= TQChar('0')) && (_fqdn.at(0) <= TQChar('9'))) { if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) { @@ -1457,11 +1457,11 @@ bool KCookieJar::loadCookies(const TQString &_filename) if ((expDate == 0) || (expDate < curTime)) continue; - KHttpCookie *cookie = new KHttpCookie(TQString::tqfromLatin1(host), - TQString::tqfromLatin1(domain), - TQString::tqfromLatin1(path), - TQString::tqfromLatin1(name), - TQString::tqfromLatin1(value), + KHttpCookie *cookie = new KHttpCookie(TQString::fromLatin1(host), + TQString::fromLatin1(domain), + TQString::fromLatin1(path), + TQString::fromLatin1(name), + TQString::fromLatin1(value), expDate, protVer, secure, httpOnly, explicitPath); addCookie(cookie); diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index 6d5d9f2e5..eb64485ea 100644 --- a/kioslave/http/kcookiejar/kcookiejar.h +++ b/kioslave/http/kcookiejar/kcookiejar.h @@ -89,7 +89,7 @@ public: time_t expireDate(void) { return mExpireDate; } int protocolVersion(void) { return mProtocolVersion; } bool isSecure(void) { return mSecure; } - bool isExpired(time_t tqcurrentDate); + bool isExpired(time_t currentDate); bool isCrossDomain(void) { return mCrossDomain; } bool isHttpOnly(void) { return mHttpOnly; } bool hasExplicitPath(void) { return mExplicitPath; } diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index 0ee01d9f0..e59533e23 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include #include #include diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 1ce1c4d8f..0ad238ab7 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -72,12 +72,12 @@ static void popArg(TQString &command, TQCString & line) int i = line.find(' '); if (i != -1) { - command = TQString::tqfromLatin1(line.left(i)); + command = TQString::fromLatin1(line.left(i)); line = line.mid(i+1); } else { - command = TQString::tqfromLatin1(line); + command = TQString::fromLatin1(line); line = 0; } } @@ -158,7 +158,7 @@ static void processCheck(TQCString &line) if (url.isEmpty()) FAIL(TQString("Missing URL")); - TQString expectedCookies = TQString::tqfromLatin1(line); + TQString expectedCookies = TQString::fromLatin1(line); TQString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace(); if (cookies != expectedCookies) @@ -246,8 +246,8 @@ int main(int argc, char *argv[]) TQCString arg2; TQString result; - lastYear = new TQCString(TQString("Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::tqcurrentDate().year()-1).utf8()); - nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::tqcurrentDate().year()+1).utf8()); + lastYear = new TQCString(TQString("Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()-1).utf8()); + nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()+1).utf8()); KAboutData about("kcookietest", "kcookietest", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian"); KCmdLineArgs::init( argc, argv, &about); -- cgit v1.2.1