summaryrefslogtreecommitdiffstats
path: root/kioslave/http/kcookiejar
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:13 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:13 -0600
commit56160bf4dfe503631ef6373367b281f081bab2b4 (patch)
tree7fcea2ffd9c3420af999c3dcad0ed032eef93956 /kioslave/http/kcookiejar
parent13281e2856a2ef43bbab78c5528470309c23aa77 (diff)
downloadtdelibs-56160bf4dfe503631ef6373367b281f081bab2b4.tar.gz
tdelibs-56160bf4dfe503631ef6373367b281f081bab2b4.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 13281e2856a2ef43bbab78c5528470309c23aa77.
Diffstat (limited to 'kioslave/http/kcookiejar')
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.cpp28
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.h2
-rw-r--r--kioslave/http/kcookiejar/kcookiewin.cpp2
-rw-r--r--kioslave/http/kcookiejar/tests/kcookiejartest.cpp10
4 files changed, 21 insertions, 21 deletions
diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp
index ec0a423a6..136fba0b1 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::fromLatin1( )
+// Note with respect to TQString::tqfromLatin1( )
// 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::fromLatin1(x)
+#define L1(x) TQString::tqfromLatin1(x)
template class TQPtrList<KHttpCookie>;
template class TQPtrDict<KHttpCookieList>;
@@ -154,9 +154,9 @@ KHttpCookie::KHttpCookie(const TQString &_host,
//
// Checks if a cookie has been expired
//
-bool KHttpCookie::isExpired(time_t currentDate)
+bool KHttpCookie::isExpired(time_t tqcurrentDate)
{
- return (mExpireDate != 0) && (mExpireDate < currentDate);
+ return (mExpireDate != 0) && (mExpireDate < tqcurrentDate);
}
//
@@ -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::fromLatin1(header);
+ Value = TQString::tqfromLatin1(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::fromLatin1(header);
+ Value = TQString::tqfromLatin1(header);
Value.truncate(s - header);
return (s);
}
}
- Value = TQString::fromLatin1(header);
+ Value = TQString::tqfromLatin1(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::fromLatin1(header);
+ Value = TQString::tqfromLatin1(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.at(0) >= TQChar('0')) && (_fqdn.at(0) <= TQChar('9')))
+ if ((_fqdn.tqat(0) >= TQChar('0')) && (_fqdn.tqat(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::fromLatin1(host),
- TQString::fromLatin1(domain),
- TQString::fromLatin1(path),
- TQString::fromLatin1(name),
- TQString::fromLatin1(value),
+ KHttpCookie *cookie = new KHttpCookie(TQString::tqfromLatin1(host),
+ TQString::tqfromLatin1(domain),
+ TQString::tqfromLatin1(path),
+ TQString::tqfromLatin1(name),
+ TQString::tqfromLatin1(value),
expDate, protVer,
secure, httpOnly, explicitPath);
addCookie(cookie);
diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h
index eb64485ea..6d5d9f2e5 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 currentDate);
+ bool isExpired(time_t tqcurrentDate);
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 e59533e23..0ee01d9f0 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 <tqaccel.h>
#include <tqlabel.h>
#include <tqwidget.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqgroupbox.h>
#include <tqdatetime.h>
#include <tqmessagebox.h>
diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
index 0ad238ab7..1ce1c4d8f 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::fromLatin1(line.left(i));
+ command = TQString::tqfromLatin1(line.left(i));
line = line.mid(i+1);
}
else
{
- command = TQString::fromLatin1(line);
+ command = TQString::tqfromLatin1(line);
line = 0;
}
}
@@ -158,7 +158,7 @@ static void processCheck(TQCString &line)
if (url.isEmpty())
FAIL(TQString("Missing URL"));
- TQString expectedCookies = TQString::fromLatin1(line);
+ TQString expectedCookies = TQString::tqfromLatin1(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::currentDate().year()-1).utf8());
- nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()+1).utf8());
+ 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());
KAboutData about("kcookietest", "kcookietest", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
KCmdLineArgs::init( argc, argv, &about);