From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/file/file.cc | 38 +++--- kioslave/ftp/ftp.cc | 20 +-- kioslave/http/http.cc | 144 +++++++++++----------- kioslave/http/http.h | 2 +- kioslave/http/http_cache_cleaner.cpp | 10 +- kioslave/http/kcookiejar/kcookiejar.cpp | 56 ++++----- kioslave/http/kcookiejar/kcookiejar.h | 2 +- kioslave/http/kcookiejar/kcookieserver.cpp | 14 +-- kioslave/http/kcookiejar/kcookiewin.cpp | 16 +-- kioslave/http/kcookiejar/kcookiewin.h | 2 +- kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 14 +-- kioslave/iso/iso.cpp | 16 +-- kioslave/iso/kiso.cpp | 2 +- kioslave/iso/kisofile.cpp | 2 +- 14 files changed, 169 insertions(+), 169 deletions(-) (limited to 'kioslave') diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index 441d03b98..88ba3b94d 100644 --- a/kioslave/file/file.cc +++ b/kioslave/file/file.cc @@ -379,7 +379,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum kdDebug(7101) << "put(): " << dest_orig << ", mode=" << _mode << endl; TQString dest_part( dest_orig ); - dest_part += TQString::fromLatin1(".part"); + dest_part += TQString::tqfromLatin1(".part"); TQCString _dest_part( TQFile::encodeName(dest_part)); KDE_struct_stat buff_orig; @@ -569,7 +569,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum // set modification time const TQString mtimeStr = metaData( "modified" ); if ( !mtimeStr.isEmpty() ) { - TQDateTime dt = TQDateTime::fromString( mtimeStr, Qt::ISODate ); + TQDateTime dt = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( mtimeStr, Qt::ISODate )); if ( dt.isValid() ) { KDE_struct_stat dest_statbuf; if (KDE_stat( _dest_orig.data(), &dest_statbuf ) == 0) { @@ -809,7 +809,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, ut.modtime = buff_src.st_mtime; if ( ::utime( _dest.data(), &ut ) != 0 ) { - kdWarning() << TQString::fromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() ) << endl; + kdWarning() << TQString(TQString::tqfromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() )) << endl; } processedSize( buff_src.st_size ); @@ -859,7 +859,7 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, error( KIO::ERR_ACCESS_DENIED, dest.path() ); } else if (errno == EXDEV) { - error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename")); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::tqfromLatin1("rename")); } else if (errno == EROFS) { // The file is on a read-only filesystem error( KIO::ERR_CANNOT_DELETE, src.path() ); @@ -960,12 +960,12 @@ void FileProtocol::del( const KURL& url, bool isfile) TQString FileProtocol::getUserName( uid_t uid ) { TQString *temp; - temp = usercache.find( uid ); + temp = usercache.tqfind( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); - return TQString::fromLatin1( user->pw_name ); + usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); + return TQString::tqfromLatin1( user->pw_name ); } else return TQString::number( uid ); @@ -977,12 +977,12 @@ TQString FileProtocol::getUserName( uid_t uid ) TQString FileProtocol::getGroupName( gid_t gid ) { TQString *temp; - temp = groupcache.find( gid ); + temp = groupcache.tqfind( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); - return TQString::fromLatin1( grp->gr_name ); + groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); + return TQString::tqfromLatin1( grp->gr_name ); } else return TQString::number( gid ); @@ -1116,7 +1116,7 @@ void FileProtocol::stat( const KURL & url ) */ TQCString _path( TQFile::encodeName(url.path(-1))); - TQString sDetails = metaData(TQString::fromLatin1("details")); + TQString sDetails = metaData(TQString::tqfromLatin1("details")); int details = sDetails.isEmpty() ? 2 : sDetails.toInt(); kdDebug(7101) << "FileProtocol::stat details=" << details << endl; @@ -1303,7 +1303,7 @@ void FileProtocol::special( const TQByteArray &data) case 1: { TQString fstype, dev, point; - Q_INT8 iRo; + TQ_INT8 iRo; stream >> iRo >> fstype >> dev >> point; @@ -1419,10 +1419,10 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c bool fstype_empty = !_fstype || !*_fstype; TQCString fstype = KProcess::quote(_fstype).latin1(); // good guess TQCString readonly = _ro ? "-r" : ""; - TQString epath = TQString::fromLatin1(getenv("PATH")); - TQString path = TQString::fromLatin1("/sbin:/bin"); + TQString epath = TQString::tqfromLatin1(getenv("PATH")); + TQString path = TQString::tqfromLatin1("/sbin:/bin"); if(!epath.isEmpty()) - path += TQString::fromLatin1(":") + epath; + path += TQString::tqfromLatin1(":") + epath; TQString mountProg = KGlobal::dirs()->findExe("mount", path); if (mountProg.isEmpty()){ error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); @@ -1604,7 +1604,7 @@ void FileProtocol::unmount( const TQString& _point ) } #else TQString epath = getenv("PATH"); - TQString path = TQString::fromLatin1("/sbin:/bin"); + TQString path = TQString::tqfromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString umountProg = KGlobal::dirs()->findExe("umount", path); @@ -1658,7 +1658,7 @@ void FileProtocol::unmount( const TQString& _point ) bool FileProtocol::pmount(const TQString &dev) { TQString epath = getenv("PATH"); - TQString path = TQString::fromLatin1("/sbin:/bin"); + TQString path = TQString::tqfromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString pmountProg = KGlobal::dirs()->findExe("pmount", path); @@ -1700,7 +1700,7 @@ bool FileProtocol::pumount(const TQString &point) if (dev.endsWith("/")) dev.truncate(dev.length()-1); TQString epath = getenv("PATH"); - TQString path = TQString::fromLatin1("/sbin:/bin"); + TQString path = TQString::tqfromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString pumountProg = KGlobal::dirs()->findExe("pumount", path); @@ -1774,7 +1774,7 @@ static bool isExtendedACL( acl_t acl ) static TQString aclAsString( acl_t acl ) { char *aclString = acl_to_text( acl, 0 ); - TQString ret = TQString::fromLatin1( aclString ); + TQString ret = TQString::tqfromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index 9e4fc21d9..68bcf2064 100644 --- a/kioslave/ftp/ftp.cc +++ b/kioslave/ftp/ftp.cc @@ -71,9 +71,9 @@ #endif // JPF: a remark on coding style (2004-03-06): -// Some calls to TQString::fromLatin1() were removed from the code. In most places +// Some calls to TQString::tqfromLatin1() were removed from the code. In most places // the KDE code relies on implicit creation of QStrings. Also Qt has a lot of -// const char* overloads, so that using TQString::fromLatin1() can be ineffectient! +// const char* overloads, so that using TQString::tqfromLatin1() can be ineffectient! #define FTP_LOGIN "anonymous" #define FTP_PASSWD "anonymous@" @@ -249,7 +249,7 @@ int FtpSocket::connectSocket(int iTimeOutSec, bool bControl) ? ERR_UNKNOWN_HOST : ERR_COULD_NOT_CONNECT; TQString strMsg = KExtendedSocket::strError(status(), systemError()); strMsg.prepend("connect failed (code %1): "); - return errorMessage(iErrorCode, strMsg.arg(iCon).latin1()); + return errorMessage(iErrorCode, TQString(strMsg.arg(iCon)).latin1()); } if( !setAddressReusable(true) ) return errorMessage(ERR_COULD_NOT_CREATE_SOCKET, "setAddressReusable failed"); @@ -693,8 +693,8 @@ bool Ftp::ftpLogin() } TQString sTmp = remoteEncoding()->decode( ftpResponse(3) ); - int iBeg = sTmp.find('"'); - int iEnd = sTmp.findRev('"'); + int iBeg = sTmp.tqfind('"'); + int iEnd = sTmp.tqfindRev('"'); if(iBeg > 0 && iBeg < iEnd) { m_initialPath = sTmp.mid(iBeg+1, iEnd-iBeg-1); @@ -749,7 +749,7 @@ bool Ftp::ftpSendCmd( const TQCString& cmd, int maxretries ) { assert(m_control != NULL); // must have control connection socket - if ( cmd.find( '\r' ) != -1 || cmd.find( '\n' ) != -1) + if ( cmd.tqfind( '\r' ) != -1 || cmd.tqfind( '\n' ) != -1) { kdWarning(7102) << "Invalid command received (contains CR or LF):" << cmd.data() << endl; @@ -968,7 +968,7 @@ int Ftp::ftpOpenEPRTDataConnection() if (sin == NULL) return ERR_INTERNAL; - // TQString command = TQString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) + // TQString command = TQString::tqfromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) // .arg(sin->nodeName()) // .arg(sin->port()); TQCString command; @@ -1285,7 +1285,7 @@ bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite return false; } - int pos = src.findRev("/"); + int pos = src.tqfindRev("/"); if( !ftpFolder(src.left(pos+1), false) ) return false; @@ -1838,7 +1838,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) TQCString tmp( p_name ); if ( p_access[0] == 'l' ) { - int i = tmp.findRev( " -> " ); + int i = tmp.tqfindRev( " -> " ); if ( i != -1 ) { de.link = remoteEncoding()->decode(p_name + i + 4); tmp.truncate( i ); @@ -1852,7 +1852,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) if ( tmp[0] == '/' ) // listing on ftp://ftp.gnupg.org/ starts with '/' tmp.remove( 0, 1 ); - if (tmp.find('/') != -1) + if (tmp.tqfind('/') != -1) continue; // Don't trick us! // Some sites put more than one space between the date and the name // e.g. ftp://ftp.uni-marburg.de/mirror/ diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index f59de0db0..f6ab75195 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -171,7 +171,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header) TQString header = (*it).lower(); // Do not allow Request line to be specified and ignore // the other HTTP headers. - if (header.find(':') == -1 || + if (header.tqfind(':') == -1 || header.startsWith("host") || header.startsWith("via")) continue; @@ -431,7 +431,7 @@ void HTTPProtocol::setHost( const TQString& host, int port, m_davHostOk = m_davHostUnsupported = false; // is it an IPv6 address? - if (host.find(':') == -1) + if (host.tqfind(':') == -1) { m_request.hostname = host; m_request.encoded_hostname = KIDNA::toAscii(host); @@ -439,7 +439,7 @@ void HTTPProtocol::setHost( const TQString& host, int port, else { m_request.hostname = host; - int pos = host.find('%'); + int pos = host.tqfind('%'); if (pos == -1) m_request.encoded_hostname = '[' + host + ']'; else @@ -607,7 +607,7 @@ void HTTPProtocol::stat(const KURL& url) if ( m_protocol != "webdav" && m_protocol != "webdavs" ) { - TQString statSide = metaData(TQString::fromLatin1("statSide")); + TQString statSide = metaData(TQString::tqfromLatin1("statSide")); if ( statSide != "source" ) { // When uploading we assume the file doesn't exit @@ -828,8 +828,8 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) int HTTPProtocol::codeFromResponse( const TQString& response ) { - int firstSpace = response.find( ' ' ); - int secondSpace = response.find( ' ', firstSpace + 1 ); + int firstSpace = response.tqfind( ' ' ); + int secondSpace = response.tqfind( ' ', firstSpace + 1 ); return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt(); } @@ -1805,7 +1805,7 @@ bool HTTPProtocol::isOffline(const KURL &url) TQDataStream stream(params, IO_WriteOnly); - if ( url.host() == TQString::fromLatin1("localhost") || url.host() == TQString::fromLatin1("127.0.0.1") || url.host() == TQString::fromLatin1("::") ) { + if ( url.host() == TQString::tqfromLatin1("localhost") || url.host() == TQString::tqfromLatin1("127.0.0.1") || url.host() == TQString::tqfromLatin1("::") ) { return false; } if ( dcopClient()->call( "kded", "networkstatus", "status()", @@ -1824,7 +1824,7 @@ bool HTTPProtocol::isOffline(const KURL &url) void HTTPProtocol::multiGet(const TQByteArray &data) { TQDataStream stream(data, IO_ReadOnly); - Q_UINT32 n; + TQ_UINT32 n; stream >> n; kdDebug(7113) << "(" << m_pid << ") HTTPProtcool::multiGet n = " << n << endl; @@ -2686,7 +2686,7 @@ try_again: return false; } - m_strMimeType = TQString::fromUtf8( buffer).stripWhiteSpace(); + m_strMimeType = TQString(TQString::fromUtf8( buffer)).stripWhiteSpace(); kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readHeader: cached " << "data mimetype: " << m_strMimeType << endl; @@ -2700,7 +2700,7 @@ try_again: return false; } - m_request.strCharset = TQString::fromUtf8( buffer).stripWhiteSpace().lower(); + m_request.strCharset = TQString(TQString::fromUtf8( buffer)).stripWhiteSpace().lower(); setMetaData("charset", m_request.strCharset); if (!m_request.lastModified.isEmpty()) setMetaData("modified", m_request.lastModified); @@ -2786,7 +2786,7 @@ try_again: // by assuming that they will be sending html. kdDebug(7113) << "(" << m_pid << ") HTTPPreadHeader: HEAD -> returned " << "mimetype: " << DEFAULT_MIME_TYPE << endl; - mimeType(TQString::fromLatin1(DEFAULT_MIME_TYPE)); + mimeType(TQString::tqfromLatin1(DEFAULT_MIME_TYPE)); return true; } @@ -2847,7 +2847,7 @@ try_again: // Store the the headers so they can be passed to the // calling application later - m_responseHeader << TQString::fromLatin1(buf); + m_responseHeader << TQString::tqfromLatin1(buf); if ((strncasecmp(buf, "HTTP/", 5) == 0) || (strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support @@ -3030,7 +3030,7 @@ try_again: // Keep Alive else if (strncasecmp(buf, "Keep-Alive:", 11) == 0) { TQStringList options = TQStringList::split(',', - TQString::fromLatin1(trimLead(buf+11))); + TQString::tqfromLatin1(trimLead(buf+11))); for(TQStringList::ConstIterator it = options.begin(); it != options.end(); it++) @@ -3046,7 +3046,7 @@ try_again: // Cache control else if (strncasecmp(buf, "Cache-Control:", 14) == 0) { TQStringList cacheControls = TQStringList::split(',', - TQString::fromLatin1(trimLead(buf+14))); + TQString::tqfromLatin1(trimLead(buf+14))); for(TQStringList::ConstIterator it = cacheControls.begin(); it != cacheControls.end(); it++) @@ -3081,7 +3081,7 @@ try_again: else if (strncasecmp(buf, "Content-location:", 17) == 0) { setMetaData ("content-location", - TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace()); + TQString::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace()); } // what type of data do we have? @@ -3093,7 +3093,7 @@ try_again: while ( *pos && *pos != ';' ) pos++; // Assign the mime-type. - m_strMimeType = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); + m_strMimeType = TQString::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); kdDebug(7113) << "(" << m_pid << ") Content-type: " << m_strMimeType << endl; // If we still have text, then it means we have a mime-type with a @@ -3108,8 +3108,8 @@ try_again: if (*pos) { - mediaAttribute = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); - mediaValue = TQString::fromLatin1(pos+1, end-pos-1).stripWhiteSpace(); + mediaAttribute = TQString::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); + mediaValue = TQString::tqfromLatin1(pos+1, end-pos-1).stripWhiteSpace(); pos = end; if (mediaValue.length() && (mediaValue[0] == '"') && @@ -3153,7 +3153,7 @@ try_again: // Cache management else if (strncasecmp(buf, "Last-Modified:", 14) == 0) { - m_request.lastModified = (TQString::fromLatin1(trimLead(buf+14))).stripWhiteSpace(); + m_request.lastModified = (TQString::tqfromLatin1(trimLead(buf+14))).stripWhiteSpace(); } // whoops.. we received a warning @@ -3177,7 +3177,7 @@ try_again: // The deprecated Refresh Response else if (strncasecmp(buf,"Refresh:", 8) == 0) { mayCache = false; // Do not cache page as it defeats purpose of Refresh tag! - setMetaData( "http-refresh", TQString::fromLatin1(trimLead(buf+8)).stripWhiteSpace() ); + setMetaData( "http-refresh", TQString::tqfromLatin1(trimLead(buf+8)).stripWhiteSpace() ); } // In fact we should do redirection only if we got redirection code @@ -3254,7 +3254,7 @@ try_again: dispositionBuf--; if ( dispositionBuf > bufStart ) - dispositionFilename = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ); + dispositionFilename = TQString::tqfromLatin1( bufStart, dispositionBuf-bufStart ); break; } @@ -3267,7 +3267,7 @@ try_again: dispositionBuf++; if ( dispositionBuf > bufStart ) - dispositionType = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); + dispositionType = TQString::tqfromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); while ( *dispositionBuf == ';' || *dispositionBuf == ' ' ) dispositionBuf++; @@ -3278,7 +3278,7 @@ try_again: // path, thus we extract the filename only. if ( !dispositionFilename.isEmpty() ) { - int pos = dispositionFilename.findRev( '/' ); + int pos = dispositionFilename.tqfindRev( '/' ); if( pos > -1 ) dispositionFilename = dispositionFilename.mid(pos+1); @@ -3288,7 +3288,7 @@ try_again: } } else if(strncasecmp(buf, "Content-Language:", 17) == 0) { - TQString language = TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace(); + TQString language = TQString::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace(); if (!language.isEmpty()) setMetaData("content-language", language); } @@ -3309,7 +3309,7 @@ try_again: if (rel.startsWith("rel=\"")) { rel = rel.mid(5, rel.length() - 6); if (rel.lower() == "pageservices") { - TQString url = link[0].replace(TQRegExp("[<>]"),"").stripWhiteSpace(); + TQString url = TQString(link[0].replace(TQRegExp("[<>]"),"")).stripWhiteSpace(); setMetaData("PageServices", url); } } @@ -3327,14 +3327,14 @@ try_again: if (policy.count() == 2) { if (policy[0].lower() == "policyref") { - policyrefs << policy[1].replace(TQRegExp("[\"\']"), "") + policyrefs << TQString(policy[1].replace(TQRegExp("[\"\']"), "")) .stripWhiteSpace(); } else if (policy[0].lower() == "cp") { // We convert to cp\ncp\ncp\n[...]\ncp to be consistent with // other metadata sent in strings. This could be a bit more // efficient but I'm going for correctness right now. TQStringList cps = TQStringList::split(" ", - policy[1].replace(TQRegExp("[\"\']"), "") + TQString(policy[1].replace(TQRegExp("[\"\']"), "")) .simplifyWhiteSpace()); for (TQStringList::Iterator j = cps.begin(); j != cps.end(); ++j) @@ -3381,17 +3381,17 @@ try_again: // md5 signature else if (strncasecmp(buf, "Content-MD5:", 12) == 0) { - m_sContentMD5 = TQString::fromLatin1(trimLead(buf + 12)); + m_sContentMD5 = TQString::tqfromLatin1(trimLead(buf + 12)); } // *** Responses to the HTTP OPTIONS method follow // WebDAV capabilities else if (strncasecmp(buf, "DAV:", 4) == 0) { if (m_davCapabilities.isEmpty()) { - m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::tqfromLatin1(trimLead(buf + 4)); } else { - m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::tqfromLatin1(trimLead(buf + 4)); } } // *** Responses to the HTTP OPTIONS method finished @@ -3667,14 +3667,14 @@ try_again: if (m_strMimeType == "application/x-tar") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::fromLatin1("application/x-tgz"); + m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); } else if (m_strMimeType == "application/postscript") { // LEONB: Adding another exception for psgz files. // Could we use the mimelnk files instead of hardcoding all this? m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); } else if ( m_request.allowCompressedPage && m_strMimeType != "application/x-tgz" && @@ -3683,7 +3683,7 @@ try_again: m_request.url.path().right(6) == ".ps.gz" ) { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); } else if ( (m_request.allowCompressedPage && m_strMimeType == "text/html") @@ -3700,7 +3700,7 @@ try_again: else { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::fromLatin1("application/x-gzip"); + m_strMimeType = TQString::tqfromLatin1("application/x-gzip"); } } @@ -3713,34 +3713,34 @@ try_again: if (m_qContentEncodings.last() == "bzip2") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::fromLatin1("application/x-bzip2"); + m_strMimeType = TQString::tqfromLatin1("application/x-bzip2"); } // Convert some common mimetypes to standard KDE mimetypes if (m_strMimeType == "application/x-targz") - m_strMimeType = TQString::fromLatin1("application/x-tgz"); + m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); else if (m_strMimeType == "application/zip") - m_strMimeType = TQString::fromLatin1("application/x-zip"); + m_strMimeType = TQString::tqfromLatin1("application/x-zip"); else if (m_strMimeType == "image/x-png") - m_strMimeType = TQString::fromLatin1("image/png"); + m_strMimeType = TQString::tqfromLatin1("image/png"); else if (m_strMimeType == "image/bmp") - m_strMimeType = TQString::fromLatin1("image/x-bmp"); + m_strMimeType = TQString::tqfromLatin1("image/x-bmp"); else if (m_strMimeType == "audio/mpeg" || m_strMimeType == "audio/x-mpeg" || m_strMimeType == "audio/mp3") - m_strMimeType = TQString::fromLatin1("audio/x-mp3"); + m_strMimeType = TQString::tqfromLatin1("audio/x-mp3"); else if (m_strMimeType == "audio/microsoft-wave") - m_strMimeType = TQString::fromLatin1("audio/x-wav"); + m_strMimeType = TQString::tqfromLatin1("audio/x-wav"); else if (m_strMimeType == "audio/midi") - m_strMimeType = TQString::fromLatin1("audio/x-midi"); + m_strMimeType = TQString::tqfromLatin1("audio/x-midi"); else if (m_strMimeType == "image/x-xpixmap") - m_strMimeType = TQString::fromLatin1("image/x-xpm"); + m_strMimeType = TQString::tqfromLatin1("image/x-xpm"); else if (m_strMimeType == "application/rtf") - m_strMimeType = TQString::fromLatin1("text/rtf"); + m_strMimeType = TQString::tqfromLatin1("text/rtf"); // Crypto ones.... else if (m_strMimeType == "application/pkix-cert" || m_strMimeType == "application/binary-certificate") { - m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); } // Prefer application/x-tgz or x-gzpostscript over application/x-gzip. @@ -3748,9 +3748,9 @@ try_again: { if ((m_request.url.path().right(7) == ".tar.gz") || (m_request.url.path().right(4) == ".tar")) - m_strMimeType = TQString::fromLatin1("application/x-tgz"); + m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); if ((m_request.url.path().right(6) == ".ps.gz")) - m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); } // Some webservers say "text/plain" when they mean "application/x-bzip2" @@ -3758,15 +3758,15 @@ try_again: { TQString ext = m_request.url.path().right(4).upper(); if (ext == ".BZ2") - m_strMimeType = TQString::fromLatin1("application/x-bzip2"); + m_strMimeType = TQString::tqfromLatin1("application/x-bzip2"); else if (ext == ".PEM") - m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); else if (ext == ".SWF") - m_strMimeType = TQString::fromLatin1("application/x-shockwave-flash"); + m_strMimeType = TQString::tqfromLatin1("application/x-shockwave-flash"); else if (ext == ".PLS") - m_strMimeType = TQString::fromLatin1("audio/x-scpls"); + m_strMimeType = TQString::tqfromLatin1("audio/x-scpls"); else if (ext == ".WMV") - m_strMimeType = TQString::fromLatin1("video/x-ms-wmv"); + m_strMimeType = TQString::tqfromLatin1("video/x-ms-wmv"); } #if 0 @@ -3871,11 +3871,11 @@ void HTTPProtocol::addEncoding(TQString encoding, TQStringList &encs) //if ( m_cmd != CMD_COPY ) m_iSize = NO_SIZE; } else if ((encoding == "x-gzip") || (encoding == "gzip")) { - encs.append(TQString::fromLatin1("gzip")); + encs.append(TQString::tqfromLatin1("gzip")); } else if ((encoding == "x-bzip2") || (encoding == "bzip2")) { - encs.append(TQString::fromLatin1("bzip2")); // Not yet supported! + encs.append(TQString::tqfromLatin1("bzip2")); // Not yet supported! } else if ((encoding == "x-deflate") || (encoding == "deflate")) { - encs.append(TQString::fromLatin1("deflate")); + encs.append(TQString::tqfromLatin1("deflate")); } else { kdDebug(7113) << "(" << m_pid << ") Unknown encoding encountered. " << "Please write code. Encoding = \"" << encoding @@ -4270,7 +4270,7 @@ void HTTPProtocol::slotData(const TQByteArray &_d) if ( m_strMimeType.isEmpty() ) { - m_strMimeType = TQString::fromLatin1( DEFAULT_MIME_TYPE ); + m_strMimeType = TQString::tqfromLatin1( DEFAULT_MIME_TYPE ); kdDebug(7113) << "(" << m_pid << ") Using default mimetype: " << m_strMimeType << endl; } @@ -4680,12 +4680,12 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) TQString CEF = m_request.path; - int p = CEF.find('/'); + int p = CEF.tqfind('/'); while(p != -1) { CEF[p] = separator; - p = CEF.find('/', p); + p = CEF.tqfind('/', p); } TQString host = m_request.hostname.lower(); @@ -4711,7 +4711,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) TQCString u = m_request.url.url().latin1(); for(int i = u.length(); i--;) { - hash = (hash * 12211 + u[i]) % 2147483563; + hash = (hash * 12211 + u.at(i)) % 2147483563; } TQString hashString; @@ -4739,7 +4739,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) ok = false; time_t date; - time_t currentDate = time(0); + time_t tqcurrentDate = time(0); // URL if (ok && (!fgets(buffer, 400, fs))) @@ -4762,10 +4762,10 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) { date = (time_t) strtoul(buffer, 0, 10); m_request.creationDate = date; - if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge)) + if (m_maxCacheAge && (difftime(tqcurrentDate, date) > m_maxCacheAge)) { m_request.bMustRevalidate = true; - m_request.expireDate = currentDate; + m_request.expireDate = tqcurrentDate; } } @@ -4779,14 +4779,14 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) { date = (time_t) strtoul(buffer, 0, 10); // After the expire date we need to revalidate. - if (!date || difftime(currentDate, date) >= 0) + if (!date || difftime(tqcurrentDate, date) >= 0) m_request.bMustRevalidate = true; m_request.expireDate = date; } else if (m_request.cache == CC_Refresh) { m_request.bMustRevalidate = true; - m_request.expireDate = currentDate; + m_request.expireDate = tqcurrentDate; } } @@ -4875,7 +4875,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate) void HTTPProtocol::createCacheEntry( const TQString &mimetype, time_t expireDate) { TQString dir = m_request.cef; - int p = dir.findRev('/'); + int p = dir.tqfindRev('/'); if (p == -1) return; // Error. dir.truncate(p); @@ -5135,12 +5135,12 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) if( isForProxy ) { ProxyAuthentication = f; - m_strProxyAuthorization = TQString::fromLatin1( strAuth ); + m_strProxyAuthorization = TQString::tqfromLatin1( strAuth ); } else { Authentication = f; - m_strAuthorization = TQString::fromLatin1( strAuth ); + m_strAuthorization = TQString::tqfromLatin1( strAuth ); } } @@ -5233,13 +5233,13 @@ bool HTTPProtocol::getAuthorization() { bool isStaleNonce = false; TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; - int pos = auth.find("stale", 0, false); + int pos = auth.tqfind("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.find("true", pos, false) != -1 ) + if ( pos < len && auth.tqfind("true", pos, false) != -1 ) { isStaleNonce = true; kdDebug(7113) << "(" << m_pid << ") Stale nonce value. " @@ -5358,13 +5358,13 @@ bool HTTPProtocol::getAuthorization() else auth = m_strProxyAuthorization; - int pos = auth.find("stale", 0, false); + int pos = auth.tqfind("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.find("true", pos, false) != -1 ) + if ( pos < len && auth.tqfind("true", pos, false) != -1 ) { info.digestInfo = (m_responseCode == 401) ? m_strAuthorization : m_strProxyAuthorization; kdDebug(7113) << "(" << m_pid << ") Just a stale nonce value! " @@ -5880,7 +5880,7 @@ TQString HTTPProtocol::createDigestAuth ( bool isForProxy ) TQCString uri = TQCString(p,i+1); do { - pos = uri.find( ' ', idx ); + pos = uri.tqfind( ' ', idx ); if ( pos != -1 ) { KURL u (m_request.url, uri.mid(idx, pos-idx)); diff --git a/kioslave/http/http.h b/kioslave/http/http.h index 2985eb938..c5de923d0 100644 --- a/kioslave/http/http.h +++ b/kioslave/http/http.h @@ -403,7 +403,7 @@ protected: /** * Resets any per connection settings. These are different from - * per-session settings in that they must be invalidates every time + * per-session settings in that they must be tqinvalidates every time * a request is made, e.g. a retry to re-send the header to the * server, as compared to only when a new request arrives. */ diff --git a/kioslave/http/http_cache_cleaner.cpp b/kioslave/http/http_cache_cleaner.cpp index 74b0b8102..8c10d0d16 100644 --- a/kioslave/http/http_cache_cleaner.cpp +++ b/kioslave/http/http_cache_cleaner.cpp @@ -44,7 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -time_t currentDate; +time_t tqcurrentDate; int m_maxCacheAge; int m_maxCacheSize; @@ -109,7 +109,7 @@ FileInfo *readEntry( const TQString &filename) if (ok) { creationDate = (time_t) strtoul(buffer, 0, 10); - age = (int) difftime(currentDate, creationDate); + age = (int) difftime(tqcurrentDate, creationDate); if ( m_maxCacheAge && ( age > m_maxCacheAge)) { ok = false; // Expired @@ -125,7 +125,7 @@ FileInfo *readEntry( const TQString &filename) #if 0 time_t expireDate; expireDate = (time_t) strtoul(buffer, 0, 10); - if (expireDate && (expireDate < currentDate)) + if (expireDate && (expireDate < tqcurrentDate)) ok = false; // Expired #endif } @@ -166,7 +166,7 @@ void scanDirectory(FileInfoList &fileEntries, const TQString &name, const TQStri TQDir dir(strDir); if (!dir.exists()) return; - QFileInfoList *newEntries = (QFileInfoList *) dir.entryInfoList(); + TQFileInfoList *newEntries = (TQFileInfoList *) dir.entryInfoList(); if (!newEntries) return; // Directory not accessible ?? @@ -213,7 +213,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) } } - currentDate = time(0); + tqcurrentDate = time(0); m_maxCacheAge = KProtocolManager::maxCacheAge(); m_maxCacheSize = KProtocolManager::maxCacheSize(); diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index 909f92dcb..83c2bd0e7 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; template class TQPtrDict; @@ -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); } // @@ -194,14 +194,14 @@ bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains, if (fqdn != mHost) return false; } - else if (!domains.contains(mDomain)) + else if (!domains.tqcontains(mDomain)) { if (mDomain[0] == '.') return false; // Maybe the domain needs an extra dot. TQString domain = '.' + mDomain; - if ( !domains.contains( domain ) ) + if ( !domains.tqcontains( domain ) ) if ( fqdn != mDomain ) return false; } @@ -261,7 +261,7 @@ KCookieJar::KCookieJar() for(TQStringList::ConstIterator it = countries.begin(); it != countries.end(); ++it) { - m_twoLevelTLD.replace(*it, (int *) 1); + m_twoLevelTLD.tqreplace(*it, (int *) 1); } } @@ -301,7 +301,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt it != cookie->windowIds().end(); ++it) { long windowId = *it; - if (windowId && (cookiePtr->windowIds().find(windowId) == cookiePtr->windowIds().end())) + if (windowId && (cookiePtr->windowIds().tqfind(windowId) == cookiePtr->windowIds().end())) { cookiePtr->windowIds().append(windowId); } @@ -337,8 +337,8 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w if (!parseURL(_url, fqdn, path)) return cookieStr; - bool secureRequest = (_url.find( L1("https://"), 0, false) == 0 || - _url.find( L1("webdavs://"), 0, false) == 0); + bool secureRequest = (_url.tqfind( L1("https://"), 0, false) == 0 || + _url.tqfind( L1("webdavs://"), 0, false) == 0); // kdDebug(7104) << "findCookies: URL= " << _url << ", secure = " << secureRequest << endl; @@ -399,7 +399,7 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w continue; } - if (windowId && (cookie->windowIds().find(windowId) == cookie->windowIds().end())) + if (windowId && (cookie->windowIds().tqfind(windowId) == cookie->windowIds().end())) { cookie->windowIds().append(windowId); } @@ -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(); } @@ -591,7 +591,7 @@ bool KCookieJar::parseURL(const TQString &_url, // Cookie spoofing protection. Since there is no way a path separator // or escape encoded character is allowed in the hostname according // to RFC 2396, reject attempts to include such things there! - if(_fqdn.find('/') > -1 || _fqdn.find('%') > -1) + if(_fqdn.tqfind('/') > -1 || _fqdn.tqfind('%') > -1) { return false; // deny everything!! } @@ -618,9 +618,9 @@ void KCookieJar::extractDomains(const TQString &_fqdn, return; } // Return numeric IPv4 addresses as is... - if ((_fqdn[0] >= '0') && (_fqdn[0] <= '9')) + if ((_fqdn.at(0) >= '0') && (_fqdn.at(0) <= '9')) { - if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) + if (_fqdn.tqfind(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) { _domains.append( _fqdn ); return; @@ -683,7 +683,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, */ static TQString fixupDateTime(const TQString& dt) { - const int index = dt.find(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); + const int index = dt.tqfind(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); if (index > -1) { @@ -729,7 +729,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url, return KHttpCookieList(); } TQString defaultPath; - int i = path.findRev('/'); + int i = path.tqfindRev('/'); if (i > 0) defaultPath = path.left(i); @@ -811,7 +811,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url, if(dom.length() > 2 && dom[dom.length()-1] == '.') dom = dom.left(dom.length()-1); - if(dom.contains('.') > 1 || dom == ".local") + if(dom.tqcontains('.') > 1 || dom == ".local") lastCookie->mDomain = dom; } else if (cName == "max-age") @@ -1020,7 +1020,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) // cross-site cookie injection. if (!cookiePtr->domain().isEmpty()) { - if (!domains.contains(cookiePtr->domain()) && + if (!domains.tqcontains(cookiePtr->domain()) && !cookiePtr->domain().endsWith("."+cookiePtr->host())) cookiePtr->fixDomain(TQString::null); } @@ -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); @@ -1546,7 +1546,7 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse ) { const TQString &value = *it++; - int sepPos = value.findRev(':'); + int sepPos = value.tqfindRev(':'); if (sepPos <= 0) continue; 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/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index e6469f127..afd5664d8 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -368,14 +368,14 @@ bool KCookieServer::cookieMatches( KHttpCookiePtr c, } // DCOP function -QString +TQString KCookieServer::findCookies(TQString url) { return findCookies(url, 0); } // DCOP function -QString +TQString KCookieServer::findCookies(TQString url, long windowId) { if (cookiesPending(url)) @@ -399,7 +399,7 @@ KCookieServer::findCookies(TQString url, long windowId) } // DCOP function -QStringList +TQStringList KCookieServer::findDomains() { TQStringList result; @@ -417,7 +417,7 @@ KCookieServer::findDomains() } // DCOP function -QStringList +TQStringList KCookieServer::findCookies(TQValueList fields, TQString domain, TQString fqdn, @@ -449,14 +449,14 @@ KCookieServer::findCookies(TQValueList fields, } // DCOP function -QString +TQString KCookieServer::findDOMCookies(TQString url) { return findDOMCookies(url, 0); } // DCOP function -QString +TQString KCookieServer::findDOMCookies(TQString url, long windowId) { // We don't wait for pending cookies because it locks up konqueror @@ -561,7 +561,7 @@ KCookieServer::setDomainAdvice(TQString url, TQString advice) } // DCOP function -QString +TQString KCookieServer::getDomainAdvice(TQString url) { KCookieAdvice advice = KCookieDunno; diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index 2c11c33cb..ca8560bf0 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -102,8 +102,8 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, hBox->setSpacing( KDialog::spacingHint() ); TQLabel* icon = new TQLabel( hBox ); icon->setPixmap( TQMessageBox::standardIcon(TQMessageBox::Warning) ); - icon->setAlignment( Qt::AlignCenter ); - icon->setFixedSize( 2*icon->sizeHint() ); + icon->tqsetAlignment( Qt::AlignCenter ); + icon->setFixedSize( 2*icon->tqsizeHint() ); int count = cookieList.count(); @@ -111,11 +111,11 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, TQString txt = i18n("You received a cookie from", "You received %n cookies from", count); TQLabel* lbl = new TQLabel( txt, vBox ); - lbl->setAlignment( Qt::AlignCenter ); + lbl->tqsetAlignment( Qt::AlignCenter ); KHttpCookiePtr cookie = cookieList.first(); TQString host (cookie->host()); - int pos = host.find(':'); + int pos = host.tqfind(':'); if ( pos > 0 ) { TQString portNum = host.left(pos); @@ -128,9 +128,9 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, if (cookie->isCrossDomain()) txt += i18n(" [Cross Domain!]"); lbl = new TQLabel( txt, vBox ); - lbl->setAlignment( Qt::AlignCenter ); + lbl->tqsetAlignment( Qt::AlignCenter ); lbl = new TQLabel( i18n("Do you want to accept or reject?"), vBox ); - lbl->setAlignment( Qt::AlignCenter ); + lbl->tqsetAlignment( Qt::AlignCenter ); vlayout->addWidget( hBox, 0, Qt::AlignLeft ); // Cookie Details dialog... @@ -203,7 +203,7 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, vlayout->addWidget( bbox ); - setFixedSize( sizeHint() ); + setFixedSize( tqsizeHint() ); } KCookieWin::~KCookieWin() @@ -313,7 +313,7 @@ KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount, if ( cookieCount > 1 ) { TQPushButton* btnNext = new TQPushButton( i18n("Next cookie","&Next >>"), this ); - btnNext->setFixedSize( btnNext->sizeHint() ); + btnNext->setFixedSize( btnNext->tqsizeHint() ); grid->addMultiCellWidget( btnNext, 8, 8, 0, 1 ); connect( btnNext, TQT_SIGNAL(clicked()), TQT_SLOT(slotNextCookie()) ); #ifndef QT_NO_TOOLTIP diff --git a/kioslave/http/kcookiejar/kcookiewin.h b/kioslave/http/kcookiejar/kcookiewin.h index 369ba69b1..d739732dc 100644 --- a/kioslave/http/kcookiejar/kcookiewin.h +++ b/kioslave/http/kcookiejar/kcookiewin.h @@ -37,7 +37,7 @@ class TQPushButton; class TQVButtonGroup; class KURLLabel; -class KCookieDetail : public QGroupBox +class KCookieDetail : public TQGroupBox { Q_OBJECT diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 0ad238ab7..aa51b2f91 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -53,7 +53,7 @@ static void FAIL(const TQString &msg) static void popArg(TQCString &command, TQCString & line) { - int i = line.find(' '); + int i = line.tqfind(' '); if (i != -1) { command = line.left(i); @@ -69,15 +69,15 @@ static void popArg(TQCString &command, TQCString & line) static void popArg(TQString &command, TQCString & line) { - int i = line.find(' '); + int i = line.tqfind(' '); 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); diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index 268805770..310e222c7 100644 --- a/kioslave/iso/iso.cpp +++ b/kioslave/iso/iso.cpp @@ -130,7 +130,7 @@ bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int star fullPath += '/'; kdDebug() << "the full path is " << fullPath << endl; - while ( (pos=fullPath.find( '/', pos+1 )) != -1 ) + while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 ) { TQString tryPath = fullPath.left( pos ); kdDebug() << fullPath << " trying " << tryPath << endl; @@ -150,7 +150,7 @@ bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int star path.truncate( len - 1 ); } else - path = TQString::fromLatin1("/"); + path = TQString::tqfromLatin1("/"); kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl; break; } @@ -259,10 +259,10 @@ void kio_isoProtocol::listDir( const KURL & url ) if ( path.isEmpty() ) { - KURL redir( TQString::fromLatin1( "iso:/") ); + KURL redir( TQString::tqfromLatin1( "iso:/") ); kdDebug() << "url.path()==" << url.path() << endl; if (url.hasRef()) redir.setRef(url.htmlRef()); - redir.setPath( url.path() + TQString::fromLatin1("/") ); + redir.setPath( url.path() + TQString::tqfromLatin1("/") ); kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl; redirection( redir ); finished(); @@ -274,7 +274,7 @@ void kio_isoProtocol::listDir( const KURL & url ) const KArchiveDirectory* dir; if (!path.isEmpty() && path != "/") { - kdDebug() << TQString("Looking for entry %1").arg(path) << endl; + kdDebug() << TQString(TQString("Looking for entry %1").arg(path)) << endl; const KArchiveEntry* e = root->entry( path ); if ( !e ) { @@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url ) const KArchiveEntry* isoEntry; if ( path.isEmpty() ) { - path = TQString::fromLatin1( "/" ); + path = TQString::tqfromLatin1( "/" ); isoEntry = root; } else { isoEntry = root->entry( path ); @@ -407,8 +407,8 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat ptrblock_bytes = (nblocks+1) * 4; pointer_block=isoFileEntry->data( hdr->header_size << 2, ptrblock_bytes ); if (pointer_block.size() == ptrblock_bytes && - inbuf.resize(block_size2) && - outbuf.resize(block_size)) { + inbuf.tqresize(block_size2) && + outbuf.tqresize(block_size)) { pptr = pointer_block.data(); } else { diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp index dff111bff..f487ad2f5 100644 --- a/kioslave/iso/kiso.cpp +++ b/kioslave/iso/kiso.cpp @@ -157,7 +157,7 @@ void KIso::prepareDevice( const TQString & filename, { /* 'hack' for Qt's false assumption that only S_ISREG is seekable */ if( "inode/blockdevice" == mimetype ) - setDevice( new QFileHack( filename ) ); + setDevice( TQT_TQIODEVICE(new QFileHack( filename )) ); else { if( "application/x-gzip" == mimetype diff --git a/kioslave/iso/kisofile.cpp b/kioslave/iso/kisofile.cpp index afac16b74..9be5dfad1 100644 --- a/kioslave/iso/kisofile.cpp +++ b/kioslave/iso/kisofile.cpp @@ -43,7 +43,7 @@ TQByteArray KIsoFile::data(long long pos, int count) const { int rlen; if ( archive()->device()->at(position()+pos) && - r.resize( ((pos+count) < size()) ? count : size()-pos) ) { + r.tqresize( ((pos+count) < size()) ? count : size()-pos) ) { rlen=archive()->device()->readBlock( r.data(), r.size() ); if (rlen ==- 1) r.resize(0); else if (rlen != (int)r.size()) r.resize(rlen); -- cgit v1.2.1