diff options
Diffstat (limited to 'kioslave')
-rw-r--r-- | kioslave/file/file.cc | 44 | ||||
-rw-r--r-- | kioslave/ftp/ftp.cc | 66 | ||||
-rw-r--r-- | kioslave/ftp/ftp.h | 14 | ||||
-rw-r--r-- | kioslave/gzip/kgzipfilter.cpp | 2 | ||||
-rw-r--r-- | kioslave/http/configure.in.in | 2 | ||||
-rw-r--r-- | kioslave/http/http.cc | 178 | ||||
-rw-r--r-- | kioslave/http/http.h | 4 | ||||
-rw-r--r-- | kioslave/http/http_cache_cleaner.cpp | 8 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/kcookiejar.cpp | 60 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/kcookiejar.h | 6 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/kcookieserver.cpp | 22 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/kcookieserver.h | 12 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/kcookiewin.cpp | 30 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/netscape_cookie_spec.html | 8 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/rfc2109 | 20 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/rfc2965 | 28 | ||||
-rw-r--r-- | kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 20 | ||||
-rw-r--r-- | kioslave/http/shoutcast-icecast.txt | 2 | ||||
-rw-r--r-- | kioslave/iso/Makefile.am | 6 | ||||
-rw-r--r-- | kioslave/iso/iso.cpp | 12 | ||||
-rw-r--r-- | kioslave/iso/kiso.cpp | 6 | ||||
-rw-r--r-- | kioslave/iso/libisofs/COPYING | 6 |
22 files changed, 278 insertions, 278 deletions
diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index 6d829ad7c..441d03b98 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::tqfromLatin1(".part"); + dest_part += TQString::fromLatin1(".part"); TQCString _dest_part( TQFile::encodeName(dest_part)); KDE_struct_stat buff_orig; @@ -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::tqfromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() ) << endl; + kdWarning() << TQString::fromLatin1("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::tqfromLatin1("rename")); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("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.tqfind( uid ); + temp = usercache.find( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); - return TQString::tqfromLatin1( user->pw_name ); + usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + return TQString::fromLatin1( 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.tqfind( gid ); + temp = groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); - return TQString::tqfromLatin1( grp->gr_name ); + groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + return TQString::fromLatin1( 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::tqfromLatin1("details")); + TQString sDetails = metaData(TQString::fromLatin1("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; - TQ_INT8 iRo; + Q_INT8 iRo; stream >> iRo >> fstype >> dev >> point; @@ -1419,13 +1419,13 @@ 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::tqfromLatin1(getenv("PATH")); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString epath = TQString::fromLatin1(getenv("PATH")); + TQString path = TQString::fromLatin1("/sbin:/bin"); if(!epath.isEmpty()) - path += TQString::tqfromLatin1(":") + epath; + path += TQString::fromLatin1(":") + epath; TQString mountProg = KGlobal::dirs()->findExe("mount", path); if (mountProg.isEmpty()){ - error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not tqfind program \"mount\"")); + error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); return; } @@ -1543,7 +1543,7 @@ void FileProtocol::unmount( const TQString& _point ) /* * since there's no way to derive the device name from * the mount point through the volmgt library (and - * media_tqfindname() won't work in this case), we have to + * media_findname() won't work in this case), we have to * look ourselves... */ devname = NULL; @@ -1604,13 +1604,13 @@ void FileProtocol::unmount( const TQString& _point ) } #else TQString epath = getenv("PATH"); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString umountProg = KGlobal::dirs()->findExe("umount", path); if (umountProg.isEmpty()) { - error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not tqfind program \"umount\"")); + error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\"")); return; } buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(KProcess::quote(_point)).data(), tmp ); @@ -1619,7 +1619,7 @@ void FileProtocol::unmount( const TQString& _point ) err = testLogFile( tmp ); - if (err.tqcontains("fstab") || err.tqcontains("root")) { + if (err.contains("fstab") || err.contains("root")) { TQString olderr; err = TQString::null; @@ -1658,7 +1658,7 @@ void FileProtocol::unmount( const TQString& _point ) bool FileProtocol::pmount(const TQString &dev) { TQString epath = getenv("PATH"); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/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::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/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::tqfromLatin1( aclString ); + TQString ret = TQString::fromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index f04a28894..9e4fc21d9 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::tqfromLatin1() were removed from the code. In most places +// Some calls to TQString::fromLatin1() 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::tqfromLatin1() can be ineffectient! +// const char* overloads, so that using TQString::fromLatin1() can be ineffectient! #define FTP_LOGIN "anonymous" #define FTP_PASSWD "anonymous@" @@ -81,7 +81,7 @@ //#undef kdDebug #define ENABLE_CAN_RESUME -// JPF: somebody should tqfind a better solution for this or move this to KIO +// JPF: somebody should find a better solution for this or move this to KIO // JPF: anyhow, in KDE 3.2.0 I found diffent MAX_IPC_SIZE definitions! namespace KIO { enum buffersizes @@ -96,7 +96,7 @@ namespace KIO { */ initialIpcSize = 2 * 1024, /** - * recommended size of a data block passed to tqfindBufferFileType() + * recommended size of a data block passed to findBufferFileType() */ mimimumMimeSize = 1024 }; @@ -279,7 +279,7 @@ void FtpSocket::closeSocket() ::close(m_server); m_server = -1; } - if(sockettqStatus() > nothing) + if(socketStatus() > nothing) reset(); textClear(); } @@ -693,8 +693,8 @@ bool Ftp::ftpLogin() } TQString sTmp = remoteEncoding()->decode( ftpResponse(3) ); - int iBeg = sTmp.tqfind('"'); - int iEnd = sTmp.tqfindRev('"'); + int iBeg = sTmp.find('"'); + int iEnd = sTmp.findRev('"'); if(iBeg > 0 && iBeg < iEnd) { m_initialPath = sTmp.mid(iBeg+1, iEnd-iBeg-1); @@ -749,9 +749,9 @@ bool Ftp::ftpSendCmd( const TQCString& cmd, int maxretries ) { assert(m_control != NULL); // must have control connection socket - if ( cmd.tqfind( '\r' ) != -1 || cmd.tqfind( '\n' ) != -1) + if ( cmd.find( '\r' ) != -1 || cmd.find( '\n' ) != -1) { - kdWarning(7102) << "Invalid command received (tqcontains CR or LF):" + kdWarning(7102) << "Invalid command received (contains CR or LF):" << cmd.data() << endl; error( ERR_UNSUPPORTED_ACTION, m_host ); return false; @@ -968,7 +968,7 @@ int Ftp::ftpOpenEPRTDataConnection() if (sin == NULL) return ERR_INTERNAL; - // TQString command = TQString::tqfromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) + // TQString command = TQString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) // .arg(sin->nodeName()) // .arg(sin->port()); TQCString command; @@ -991,7 +991,7 @@ int Ftp::ftpOpenEPRTDataConnection() /* * ftpOpenDataConnection - set up data connection * - * The routine calls several ftpOpenXxxxConnection() helpers to tqfind + * The routine calls several ftpOpenXxxxConnection() helpers to find * the best connection mode. If a helper cannot connect if returns * ERR_INTERNAL - so this is not really an error! All other error * codes are treated as fatal, e.g. they are passed back to the caller @@ -1111,10 +1111,10 @@ int Ftp::ftpAcceptConnect() struct sockaddr addr; for(;;) { - fd_set tqmask; - FD_ZERO(&tqmask); - FD_SET(sSock,&tqmask); - int r = KSocks::self()->select(sSock + 1, &tqmask, NULL, NULL, 0L); + fd_set mask; + FD_ZERO(&mask); + FD_SET(sSock,&mask); + int r = KSocks::self()->select(sSock + 1, &mask, NULL, NULL, 0L); if( r < 0 && errno != EINTR && errno != EAGAIN ) continue; if( r > 0 ) @@ -1285,7 +1285,7 @@ bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite return false; } - int pos = src.tqfindRev("/"); + int pos = src.findRev("/"); if( !ftpFolder(src.left(pos+1), false) ) return false; @@ -1627,7 +1627,7 @@ void Ftp::stat( const KURL &url) // Relative link (stat will take care of cleaning ../.. etc.) linkURL.setPath( listarg ); // this is what we were listing (the link) linkURL.setPath( linkURL.directory() ); // go up one dir - linkURL.addPath( ftpEnt.link ); // tqreplace link by its destination + linkURL.addPath( ftpEnt.link ); // replace link by its destination kdDebug(7102) << "linkURL now " << linkURL.prettyURL() << endl; } // Re-add the filename we're looking for @@ -1732,7 +1732,7 @@ void Ftp::listDir( const KURL &url ) void Ftp::slave_status() { kdDebug(7102) << "Got slave_status host = " << (m_host.ascii() ? m_host.ascii() : "[None]") << " [" << (m_bLoggedOn ? "Connected" : "Not connected") << "]" << endl; - slavetqStatus( m_host, m_bLoggedOn ); + slaveStatus( m_host, m_bLoggedOn ); } bool Ftp::ftpOpenDir( const TQString & path ) @@ -1807,7 +1807,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) // So we just ignore the number in front of the ",". Ok, its a hack :-) if ( strchr( p_size, ',' ) != 0L ) { - //kdDebug(7102) << "Size tqcontains a ',' -> reading size again (/dev hack)" << endl; + //kdDebug(7102) << "Size contains a ',' -> reading size again (/dev hack)" << endl; if ((p_size = strtok(NULL," ")) == 0) continue; } @@ -1838,7 +1838,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) TQCString tmp( p_name ); if ( p_access[0] == 'l' ) { - int i = tmp.tqfindRev( " -> " ); + int i = tmp.findRev( " -> " ); 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.tqfind('/') != -1) + if (tmp.find('/') != -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/ @@ -1953,7 +1953,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) if ( tmptr->tm_mon > currentMonth + 1 ) tmptr->tm_year--; - // and p_date_3 tqcontains probably a time + // and p_date_3 contains probably a time char * semicolon; if ( ( semicolon = (char*)strchr( p_date_3, ':' ) ) ) { @@ -1987,13 +1987,13 @@ void Ftp::get( const KURL & url ) ftpCloseCommand(); // must close command! } -Ftp::tqStatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t llOffset) +Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t llOffset) { // Calls error() by itself! if( !ftpOpenConnection(loginImplicit) ) return statusServerError; - // Try to tqfind the size of the file (and check that it exists at + // Try to find the size of the file (and check that it exists at // the same time). If we get back a 550, "File does not exist" // or "not a plain file", check if it is a directory. If it is a // directory, return an error; otherwise simply try to retrieve @@ -2082,16 +2082,16 @@ Ftp::tqStatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO:: { mimetypeEmitted = true; - // We need a KMimeType::tqfindByNameAndContent(data,filename) - // For now we do: tqfind by extension, and if not found (or extension not reliable) - // then tqfind by content. + // We need a KMimeType::findByNameAndContent(data,filename) + // For now we do: find by extension, and if not found (or extension not reliable) + // then find by content. bool accurate = false; KMimeType::Ptr mime = KMimeType::findByURL( url, 0, false, true, &accurate ); if ( !mime || mime->name() == KMimeType::defaultMimeType() || !accurate ) { array.setRawData(buffer, n); - KMimeMagicResult * result = KMimeMagic::self()->tqfindBufferFileType(array, url.fileName()); + KMimeMagicResult * result = KMimeMagic::self()->findBufferFileType(array, url.fileName()); array.resetRawData(buffer, n); if ( result->mimeType() != KMimeType::defaultMimeType() ) mime = KMimeType::mimeType( result->mimeType() ); @@ -2204,7 +2204,7 @@ void Ftp::put(const KURL& url, int permissions, bool overwrite, bool resume) ftpCloseCommand(); // must close command! } -Ftp::tqStatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, +Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, int permissions, bool overwrite, bool resume) { if( !ftpOpenConnection(loginImplicit) ) @@ -2489,7 +2489,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri { int iError = 0; int iCopyFile = -1; - tqStatusCode cs = statusSuccess; + StatusCode cs = statusSuccess; bool bSrcLocal = src.isLocalFile(); bool bDestLocal = dest.isLocalFile(); TQString sCopyFile; @@ -2522,7 +2522,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri } -Ftp::tqStatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, +Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite) { // check if source is ok ... @@ -2559,7 +2559,7 @@ Ftp::tqStatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFil } -Ftp::tqStatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCopyFile, +Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCopyFile, const KURL& url, int permissions, bool overwrite) { // check if destination is ok ... @@ -2645,7 +2645,7 @@ Ftp::tqStatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sC } // delegate the real work (iError gets status) ... - tqStatusCode iRes = ftpGet(iError, iCopyFile, url, hCopyOffset); + StatusCode iRes = ftpGet(iError, iCopyFile, url, hCopyOffset); if( ::close(iCopyFile) && iRes == statusSuccess ) { iError = ERR_COULD_NOT_WRITE; diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h index ac48c6c41..44f0bdc71 100644 --- a/kioslave/ftp/ftp.h +++ b/kioslave/ftp/ftp.h @@ -284,14 +284,14 @@ private: // ------------------------------------------------------------------------ /** - * tqStatus Code returned from ftpPut() and ftpGet(), used to select + * Status Code returned from ftpPut() and ftpGet(), used to select * source or destination url for error messages */ typedef enum { statusSuccess, statusClientError, statusServerError - } tqStatusCode; + } StatusCode; /** * Login Mode for ftpOpenConnection @@ -482,7 +482,7 @@ private: * @param hCopyOffset local file only: non-zero for resume * @return 0 for success, -1 for server error, -2 for client error */ - tqStatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t hCopyOffset); + StatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t hCopyOffset); /** * This is the internal implementation of put() - see copy(). @@ -494,7 +494,7 @@ private: * @param iCopyFile -1 -or- handle of a local source file * @return 0 for success, -1 for server error, -2 for client error */ - tqStatusCode ftpPut(int& iError, int iCopyFile, const KURL& url, int permissions, bool overwrite, bool resume); + StatusCode ftpPut(int& iError, int iCopyFile, const KURL& url, int permissions, bool overwrite, bool resume); /** * helper called from copy() to implement FILE -> FTP transfers @@ -504,7 +504,7 @@ private: * @param sCopyFile path of the local source file * @return 0 for success, -1 for server error, -2 for client error */ - tqStatusCode ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite); + StatusCode ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite); /** * helper called from copy() to implement FTP -> FILE transfers @@ -514,7 +514,7 @@ private: * @param sCopyFile path of the local destination file * @return 0 for success, -1 for server error, -2 for client error */ - tqStatusCode ftpCopyGet(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite); + StatusCode ftpCopyGet(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite); private: // data members @@ -544,7 +544,7 @@ private: // data members int m_iRespType; /** - * This flag is maintained by ftpDataMode() and tqcontains I or A after + * This flag is maintained by ftpDataMode() and contains I or A after * ftpDataMode() has successfully set the mode. */ char m_cDataMode; diff --git a/kioslave/gzip/kgzipfilter.cpp b/kioslave/gzip/kgzipfilter.cpp index a7ee6498f..375f9f9bc 100644 --- a/kioslave/gzip/kgzipfilter.cpp +++ b/kioslave/gzip/kgzipfilter.cpp @@ -133,7 +133,7 @@ bool KGzipFilter::readHeader() #endif // Assume not compressed until we successfully decode the header d->bCompressed = false; - // Assume the first block of data tqcontains the whole header. + // Assume the first block of data contains the whole header. // The right way is to build this as a big state machine which // is a pain in the ass. // With 8K-blocks, we don't risk much anyway. diff --git a/kioslave/http/configure.in.in b/kioslave/http/configure.in.in index fed7f4da7..a7d1ca7cf 100644 --- a/kioslave/http/configure.in.in +++ b/kioslave/http/configure.in.in @@ -12,7 +12,7 @@ AC_ARG_WITH(gssapi, if test "x$with_gssapi" = "xCHECK" ; then with_gssapi=NOTFOUND KDE_FIND_PATH(krb5-config, KRB5_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin /usr/lib/mit/bin], [ - AC_MSG_WARN([Could not tqfind krb5-config]) + AC_MSG_WARN([Could not find krb5-config]) ]) if test -n "$KRB5_CONFIG"; then diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index 803bad7f5..f59de0db0 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.tqfind(':') == -1 || + if (header.find(':') == -1 || header.startsWith("host") || header.startsWith("via")) continue; @@ -320,7 +320,7 @@ void HTTPProtocol::resetSessionSettings() TQString protocol = referrerURL.protocol(); if (protocol.startsWith("webdav")) { - protocol.tqreplace(0, 6, "http"); + protocol.replace(0, 6, "http"); referrerURL.setProtocol(protocol); } @@ -431,7 +431,7 @@ void HTTPProtocol::setHost( const TQString& host, int port, m_davHostOk = m_davHostUnsupported = false; // is it an IPv6 address? - if (host.tqfind(':') == -1) + if (host.find(':') == -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.tqfind('%'); + int pos = host.find('%'); 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::tqfromLatin1("statSide")); + TQString statSide = metaData(TQString::fromLatin1("statSide")); if ( statSide != "source" ) { // When uploading we assume the file doesn't exit @@ -686,7 +686,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) // We are only after certain features... TQCString request; request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" - "<D:proptqfind xmlns:D=\"DAV:\">"; + "<D:propfind xmlns:D=\"DAV:\">"; // insert additional XML request from the davRequestResponse metadata if ( hasMetaData( "davRequestResponse" ) ) @@ -708,7 +708,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) "<D:resourcetype/>" "</D:prop>"; } - request += "</D:proptqfind>"; + request += "</D:propfind>"; davSetRequest( request ); } @@ -828,8 +828,8 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) int HTTPProtocol::codeFromResponse( const TQString& response ) { - int firstSpace = response.tqfind( ' ' ); - int secondSpace = response.tqfind( ' ', firstSpace + 1 ); + int firstSpace = response.find( ' ' ); + int secondSpace = response.find( ' ', firstSpace + 1 ); return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt(); } @@ -1267,12 +1267,12 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool) TQCString request; request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" - "<D:proptqfind xmlns:D=\"DAV:\"><D:prop>" + "<D:propfind xmlns:D=\"DAV:\"><D:prop>" "<D:creationdate/>" "<D:getcontentlength/>" "<D:displayname/>" "<D:resourcetype/>" - "</D:prop></D:proptqfind>"; + "</D:prop></D:propfind>"; davSetRequest( request ); @@ -1797,15 +1797,15 @@ void HTTPProtocol::httpError() bool HTTPProtocol::isOffline(const KURL &url) { - const int NetWorktqStatusUnknown = 1; - const int NetWorktqStatusOnline = 8; + const int NetWorkStatusUnknown = 1; + const int NetWorkStatusOnline = 8; TQCString replyType; TQByteArray params; TQByteArray reply; TQDataStream stream(params, IO_WriteOnly); - if ( url.host() == TQString::tqfromLatin1("localhost") || url.host() == TQString::tqfromLatin1("127.0.0.1") || url.host() == TQString::tqfromLatin1("::") ) { + if ( url.host() == TQString::fromLatin1("localhost") || url.host() == TQString::fromLatin1("127.0.0.1") || url.host() == TQString::fromLatin1("::") ) { return false; } if ( dcopClient()->call( "kded", "networkstatus", "status()", @@ -1815,7 +1815,7 @@ bool HTTPProtocol::isOffline(const KURL &url) TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; kdDebug(7113) << "(" << m_pid << ") networkstatus status = " << result << endl; - return (result != NetWorktqStatusUnknown) && (result != NetWorktqStatusOnline); + return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); } kdDebug(7113) << "(" << m_pid << ") networkstatus <unreachable>" << endl; return false; // On error, assume we are online @@ -1824,7 +1824,7 @@ bool HTTPProtocol::isOffline(const KURL &url) void HTTPProtocol::multiGet(const TQByteArray &data) { TQDataStream stream(data, IO_ReadOnly); - TQ_UINT32 n; + Q_UINT32 n; stream >> n; kdDebug(7113) << "(" << m_pid << ") HTTPProtcool::multiGet n = " << n << endl; @@ -2485,7 +2485,7 @@ bool HTTPProtocol::httpOpen() { m_request.cookieMode = HTTPRequest::CookiesAuto; if (m_request.bUseCookiejar) - cookieStr = tqfindCookies( m_request.url.url()); + cookieStr = findCookies( m_request.url.url()); } if (!cookieStr.isEmpty()) @@ -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::tqfromLatin1(DEFAULT_MIME_TYPE)); + mimeType(TQString::fromLatin1(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::tqfromLatin1(buf); + m_responseHeader << TQString::fromLatin1(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::tqfromLatin1(trimLead(buf+11))); + TQString::fromLatin1(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::tqfromLatin1(trimLead(buf+14))); + TQString::fromLatin1(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::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace()); + TQString::fromLatin1(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::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); + m_strMimeType = TQString::fromLatin1(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::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); - mediaValue = TQString::tqfromLatin1(pos+1, end-pos-1).stripWhiteSpace(); + mediaAttribute = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); + mediaValue = TQString::fromLatin1(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::tqfromLatin1(trimLead(buf+14))).stripWhiteSpace(); + m_request.lastModified = (TQString::fromLatin1(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::tqfromLatin1(trimLead(buf+8)).stripWhiteSpace() ); + setMetaData( "http-refresh", TQString::fromLatin1(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::tqfromLatin1( bufStart, dispositionBuf-bufStart ); + dispositionFilename = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ); break; } @@ -3267,7 +3267,7 @@ try_again: dispositionBuf++; if ( dispositionBuf > bufStart ) - dispositionType = TQString::tqfromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); + dispositionType = TQString::fromLatin1( 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.tqfindRev( '/' ); + int pos = dispositionFilename.findRev( '/' ); 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::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace(); + TQString language = TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace(); if (!language.isEmpty()) setMetaData("content-language", language); } @@ -3302,14 +3302,14 @@ try_again: else if (strncasecmp(buf, "Link:", 5) == 0) { // We only support Link: <url>; rel="type" so far TQStringList link = TQStringList::split(";", TQString(buf) - .tqreplace(TQRegExp("^Link:[ ]*"), + .replace(TQRegExp("^Link:[ ]*"), "")); if (link.count() == 2) { TQString rel = link[1].stripWhiteSpace(); if (rel.startsWith("rel=\"")) { rel = rel.mid(5, rel.length() - 6); if (rel.lower() == "pageservices") { - TQString url = link[0].tqreplace(TQRegExp("[<>]"),"").stripWhiteSpace(); + TQString url = 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].tqreplace(TQRegExp("[\"\']"), "") + policyrefs << 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].tqreplace(TQRegExp("[\"\']"), "") + 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::tqfromLatin1(trimLead(buf + 12)); + m_sContentMD5 = TQString::fromLatin1(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::tqfromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); } else { - m_davCapabilities << TQString::tqfromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(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::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("application/x-gzip"); + m_strMimeType = TQString::fromLatin1("application/x-gzip"); } } @@ -3713,34 +3713,34 @@ try_again: if (m_qContentEncodings.last() == "bzip2") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-bzip2"); + m_strMimeType = TQString::fromLatin1("application/x-bzip2"); } // Convert some common mimetypes to standard KDE mimetypes if (m_strMimeType == "application/x-targz") - m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); else if (m_strMimeType == "application/zip") - m_strMimeType = TQString::tqfromLatin1("application/x-zip"); + m_strMimeType = TQString::fromLatin1("application/x-zip"); else if (m_strMimeType == "image/x-png") - m_strMimeType = TQString::tqfromLatin1("image/png"); + m_strMimeType = TQString::fromLatin1("image/png"); else if (m_strMimeType == "image/bmp") - m_strMimeType = TQString::tqfromLatin1("image/x-bmp"); + m_strMimeType = TQString::fromLatin1("image/x-bmp"); else if (m_strMimeType == "audio/mpeg" || m_strMimeType == "audio/x-mpeg" || m_strMimeType == "audio/mp3") - m_strMimeType = TQString::tqfromLatin1("audio/x-mp3"); + m_strMimeType = TQString::fromLatin1("audio/x-mp3"); else if (m_strMimeType == "audio/microsoft-wave") - m_strMimeType = TQString::tqfromLatin1("audio/x-wav"); + m_strMimeType = TQString::fromLatin1("audio/x-wav"); else if (m_strMimeType == "audio/midi") - m_strMimeType = TQString::tqfromLatin1("audio/x-midi"); + m_strMimeType = TQString::fromLatin1("audio/x-midi"); else if (m_strMimeType == "image/x-xpixmap") - m_strMimeType = TQString::tqfromLatin1("image/x-xpm"); + m_strMimeType = TQString::fromLatin1("image/x-xpm"); else if (m_strMimeType == "application/rtf") - m_strMimeType = TQString::tqfromLatin1("text/rtf"); + m_strMimeType = TQString::fromLatin1("text/rtf"); // Crypto ones.... else if (m_strMimeType == "application/pkix-cert" || m_strMimeType == "application/binary-certificate") { - m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); if ((m_request.url.path().right(6) == ".ps.gz")) - m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("application/x-bzip2"); + m_strMimeType = TQString::fromLatin1("application/x-bzip2"); else if (ext == ".PEM") - m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); else if (ext == ".SWF") - m_strMimeType = TQString::tqfromLatin1("application/x-shockwave-flash"); + m_strMimeType = TQString::fromLatin1("application/x-shockwave-flash"); else if (ext == ".PLS") - m_strMimeType = TQString::tqfromLatin1("audio/x-scpls"); + m_strMimeType = TQString::fromLatin1("audio/x-scpls"); else if (ext == ".WMV") - m_strMimeType = TQString::tqfromLatin1("video/x-ms-wmv"); + m_strMimeType = TQString::fromLatin1("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::tqfromLatin1("gzip")); + encs.append(TQString::fromLatin1("gzip")); } else if ((encoding == "x-bzip2") || (encoding == "bzip2")) { - encs.append(TQString::tqfromLatin1("bzip2")); // Not yet supported! + encs.append(TQString::fromLatin1("bzip2")); // Not yet supported! } else if ((encoding == "x-deflate") || (encoding == "deflate")) { - encs.append(TQString::tqfromLatin1("deflate")); + encs.append(TQString::fromLatin1("deflate")); } else { kdDebug(7113) << "(" << m_pid << ") Unknown encoding encountered. " << "Please write code. Encoding = \"" << encoding @@ -4018,7 +4018,7 @@ void HTTPProtocol::slave_status() if ( m_iSock != -1 && !isConnectionValid() ) httpCloseConnection(); - slavetqStatus( m_state.hostname, (m_iSock != -1) ); + slaveStatus( m_state.hostname, (m_iSock != -1) ); } void HTTPProtocol::mimetype( const KURL& url ) @@ -4259,7 +4259,7 @@ void HTTPProtocol::slotData(const TQByteArray &_d) << endl; KMimeMagicResult *result; - result = KMimeMagic::self()->tqfindBufferFileType( m_mimeTypeBuffer, + result = KMimeMagic::self()->findBufferFileType( m_mimeTypeBuffer, m_request.url.fileName() ); if( result ) { @@ -4270,7 +4270,7 @@ void HTTPProtocol::slotData(const TQByteArray &_d) if ( m_strMimeType.isEmpty() ) { - m_strMimeType = TQString::tqfromLatin1( DEFAULT_MIME_TYPE ); + m_strMimeType = TQString::fromLatin1( DEFAULT_MIME_TYPE ); kdDebug(7113) << "(" << m_pid << ") Using default mimetype: " << m_strMimeType << endl; } @@ -4344,7 +4344,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) // Update the application with total size except when // it is compressed, or when the data is to be handled // internally (webDAV). If compressed we have to wait - // until we uncompress to tqfind out the actual data size + // until we uncompress to find out the actual data size if ( !dataInternal ) { if ( (m_iSize > 0) && (m_iSize != NO_SIZE)) { totalSize(m_iSize); @@ -4609,7 +4609,7 @@ void HTTPProtocol::addCookies( const TQString &url, const TQCString &cookieHeade } } -TQString HTTPProtocol::tqfindCookies( const TQString &url) +TQString HTTPProtocol::findCookies( const TQString &url) { TQCString replyType; TQByteArray params; @@ -4621,7 +4621,7 @@ TQString HTTPProtocol::tqfindCookies( const TQString &url) TQDataStream stream(params, IO_WriteOnly); stream << url << windowId; - if ( !dcopClient()->call( "kded", "kcookiejar", "tqfindCookies(TQString,long int)", + if ( !dcopClient()->call( "kded", "kcookiejar", "findCookies(TQString,long int)", params, replyType, reply ) ) { kdWarning(7113) << "(" << m_pid << ") Can't communicate with kded_kcookiejar!" << endl; @@ -4634,7 +4634,7 @@ TQString HTTPProtocol::tqfindCookies( const TQString &url) } else { - kdError(7113) << "(" << m_pid << ") DCOP function tqfindCookies(...) returns " + kdError(7113) << "(" << m_pid << ") DCOP function findCookies(...) returns " << replyType << ", expected TQString" << endl; } return result; @@ -4680,12 +4680,12 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) TQString CEF = m_request.path; - int p = CEF.tqfind('/'); + int p = CEF.find('/'); while(p != -1) { CEF[p] = separator; - p = CEF.tqfind('/', p); + p = CEF.find('/', p); } TQString host = m_request.hostname.lower(); @@ -4739,7 +4739,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) ok = false; time_t date; - time_t tqcurrentDate = time(0); + time_t currentDate = 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(tqcurrentDate, date) > m_maxCacheAge)) + if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge)) { m_request.bMustRevalidate = true; - m_request.expireDate = tqcurrentDate; + m_request.expireDate = currentDate; } } @@ -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(tqcurrentDate, date) >= 0) + if (!date || difftime(currentDate, date) >= 0) m_request.bMustRevalidate = true; m_request.expireDate = date; } else if (m_request.cache == CC_Refresh) { m_request.bMustRevalidate = true; - m_request.expireDate = tqcurrentDate; + m_request.expireDate = currentDate; } } @@ -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.tqfindRev('/'); + int p = dir.findRev('/'); if (p == -1) return; // Error. dir.truncate(p); @@ -5114,7 +5114,7 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) { //for sites like lib.homelinux.org TQTextCodec* oldCodec=TQTextCodec::codecForCStrings(); - if (KGlobal::locale()->language().tqcontains("ru")) + if (KGlobal::locale()->language().contains("ru")) TQTextCodec::setCodecForCStrings(TQTextCodec::codecForName("CP1251")); p += 6; @@ -5135,12 +5135,12 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) if( isForProxy ) { ProxyAuthentication = f; - m_strProxyAuthorization = TQString::tqfromLatin1( strAuth ); + m_strProxyAuthorization = TQString::fromLatin1( strAuth ); } else { Authentication = f; - m_strAuthorization = TQString::tqfromLatin1( strAuth ); + m_strAuthorization = TQString::fromLatin1( strAuth ); } } @@ -5233,13 +5233,13 @@ bool HTTPProtocol::getAuthorization() { bool isStaleNonce = false; TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; - int pos = auth.tqfind("stale", 0, false); + int pos = auth.find("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.tqfind("true", pos, false) != -1 ) + if ( pos < len && auth.find("true", pos, false) != -1 ) { isStaleNonce = true; kdDebug(7113) << "(" << m_pid << ") Stale nonce value. " @@ -5311,7 +5311,7 @@ bool HTTPProtocol::getAuthorization() } else { - // At this point we know more details, so use it to tqfind + // At this point we know more details, so use it to find // out if we have a cached version and avoid a re-prompt! // We also do not use verify path unlike the pre-emptive // requests because we already know the realm value... @@ -5358,13 +5358,13 @@ bool HTTPProtocol::getAuthorization() else auth = m_strProxyAuthorization; - int pos = auth.tqfind("stale", 0, false); + int pos = auth.find("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.tqfind("true", pos, false) != -1 ) + if ( pos < len && auth.find("true", pos, false) != -1 ) { info.digestInfo = (m_responseCode == 401) ? m_strAuthorization : m_strProxyAuthorization; kdDebug(7113) << "(" << m_pid << ") Just a stale nonce value! " @@ -5612,7 +5612,7 @@ TQString HTTPProtocol::createNTLMAuth( bool isForProxy ) strauth = m_strAuthorization.latin1(); len = m_strAuthorization.length(); } - if ( user.tqcontains('\\') ) { + if ( user.contains('\\') ) { domain = user.section( '\\', 0, 0); user = user.section( '\\', 1 ); } @@ -5880,7 +5880,7 @@ TQString HTTPProtocol::createDigestAuth ( bool isForProxy ) TQCString uri = TQCString(p,i+1); do { - pos = uri.tqfind( ' ', idx ); + pos = uri.find( ' ', idx ); if ( pos != -1 ) { KURL u (m_request.url, uri.mid(idx, pos-idx)); @@ -6032,7 +6032,7 @@ TQString HTTPProtocol::proxyAuthenticationHeader() info.password = m_proxyURL.pass(); info.verifyPath = true; - // If the proxy URL already tqcontains username + // If the proxy URL already contains username // and password simply attempt to retrieve it // without prompting the user... if ( !info.username.isNull() && !info.password.isNull() ) diff --git a/kioslave/http/http.h b/kioslave/http/http.h index 2ce6de664..2985eb938 100644 --- a/kioslave/http/http.h +++ b/kioslave/http/http.h @@ -335,7 +335,7 @@ protected: /** * Look for cookies in the cookiejar */ - TQString tqfindCookies( const TQString &url); + TQString findCookies( const TQString &url); /** * Do a cache lookup for the current url. (m_state.url) @@ -403,7 +403,7 @@ protected: /** * Resets any per connection settings. These are different from - * per-session settings in that they must be tqinvalidates every time + * per-session settings in that they must be invalidates 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 80fc2c69a..74b0b8102 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 <kdebug.h> -time_t tqcurrentDate; +time_t currentDate; 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(tqcurrentDate, creationDate); + age = (int) difftime(currentDate, 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 < tqcurrentDate)) + if (expireDate && (expireDate < currentDate)) ok = false; // Expired #endif } @@ -213,7 +213,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) } } - tqcurrentDate = time(0); + currentDate = 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 555f8e897..909f92dcb 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<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 tqcurrentDate) +bool KHttpCookie::isExpired(time_t currentDate) { - return (mExpireDate != 0) && (mExpireDate < tqcurrentDate); + return (mExpireDate != 0) && (mExpireDate < currentDate); } // @@ -194,14 +194,14 @@ bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains, if (fqdn != mHost) return false; } - else if (!domains.tqcontains(mDomain)) + else if (!domains.contains(mDomain)) { if (mDomain[0] == '.') return false; // Maybe the domain needs an extra dot. TQString domain = '.' + mDomain; - if ( !domains.tqcontains( domain ) ) + if ( !domains.contains( domain ) ) if ( fqdn != mDomain ) return false; } @@ -261,7 +261,7 @@ KCookieJar::KCookieJar() for(TQStringList::ConstIterator it = countries.begin(); it != countries.end(); ++it) { - m_twoLevelTLD.tqreplace(*it, (int *) 1); + m_twoLevelTLD.replace(*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().tqfind(windowId) == cookiePtr->windowIds().end())) + if (windowId && (cookiePtr->windowIds().find(windowId) == cookiePtr->windowIds().end())) { cookiePtr->windowIds().append(windowId); } @@ -325,7 +325,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt // Returned is a string containing all appropriate cookies in a format // which can be added to a HTTP-header without any additional processing. // -TQString KCookieJar::tqfindCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies) +TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies) { TQString cookieStr; TQStringList domains; @@ -337,10 +337,10 @@ TQString KCookieJar::tqfindCookies(const TQString &_url, bool useDOMFormat, long if (!parseURL(_url, fqdn, path)) return cookieStr; - bool secureRequest = (_url.tqfind( L1("https://"), 0, false) == 0 || - _url.tqfind( L1("webdavs://"), 0, false) == 0); + bool secureRequest = (_url.find( L1("https://"), 0, false) == 0 || + _url.find( L1("webdavs://"), 0, false) == 0); - // kdDebug(7104) << "tqfindCookies: URL= " << _url << ", secure = " << secureRequest << endl; + // kdDebug(7104) << "findCookies: URL= " << _url << ", secure = " << secureRequest << endl; extractDomains(fqdn, domains); @@ -399,7 +399,7 @@ TQString KCookieJar::tqfindCookies(const TQString &_url, bool useDOMFormat, long continue; } - if (windowId && (cookie->windowIds().tqfind(windowId) == cookie->windowIds().end())) + if (windowId && (cookie->windowIds().find(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::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(); } @@ -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.tqfind('/') > -1 || _fqdn.tqfind('%') > -1) + if(_fqdn.find('/') > -1 || _fqdn.find('%') > -1) { return false; // deny everything!! } @@ -620,7 +620,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, // Return numeric IPv4 addresses as is... if ((_fqdn[0] >= '0') && (_fqdn[0] <= '9')) { - if (_fqdn.tqfind(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) + if (_fqdn.find(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.tqfind(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); + const int index = dt.find(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); if (index > -1) { @@ -694,7 +694,7 @@ static TQString fixupDateTime(const TQString& dt) dateStrList[0] = dateStrList[1]; dateStrList[1] = date; date = dt; - return date.tqreplace(index, date.length(), dateStrList.join(" ")); + return date.replace(index, date.length(), dateStrList.join(" ")); } } @@ -729,7 +729,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url, return KHttpCookieList(); } TQString defaultPath; - int i = path.tqfindRev('/'); + int i = path.findRev('/'); 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.tqcontains('.') > 1 || dom == ".local") + if(dom.contains('.') > 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.tqcontains(cookiePtr->domain()) && + if (!domains.contains(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::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); @@ -1546,7 +1546,7 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse ) { const TQString &value = *it++; - int sepPos = value.tqfindRev(':'); + int sepPos = value.findRev(':'); if (sepPos <= 0) continue; diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index 32bd5e8c1..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; } @@ -160,11 +160,11 @@ public: * * If @p useDOMFormat is true, the string is formatted in a format * in compliance with the DOM standard. - * @p pendingCookies tqcontains a list of cookies that have not been + * @p pendingCookies contains a list of cookies that have not been * approved yet by the user but that will be included in the result * none the less. */ - TQString tqfindCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies=0); + TQString findCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies=0); /** * This function parses cookie_headers and returns a linked list of diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index 884f08877..e6469f127 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -277,7 +277,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList) { TQCString replyType; TQByteArray replyData; - TQString res = mCookieJar->tqfindCookies( request->url, request->DOM, request->windowId ); + TQString res = mCookieJar->findCookies( request->url, request->DOM, request->windowId ); TQDataStream stream2(replyData, IO_WriteOnly); stream2 << res; @@ -369,14 +369,14 @@ bool KCookieServer::cookieMatches( KHttpCookiePtr c, // DCOP function QString -KCookieServer::tqfindCookies(TQString url) +KCookieServer::findCookies(TQString url) { - return tqfindCookies(url, 0); + return findCookies(url, 0); } // DCOP function QString -KCookieServer::tqfindCookies(TQString url, long windowId) +KCookieServer::findCookies(TQString url, long windowId) { if (cookiesPending(url)) { @@ -390,7 +390,7 @@ KCookieServer::tqfindCookies(TQString url, long windowId) return TQString::null; // Talk to you later :-) } - TQString cookies = mCookieJar->tqfindCookies(url, false, windowId); + TQString cookies = mCookieJar->findCookies(url, false, windowId); if (mCookieJar->changed()) saveCookieJar(); @@ -400,7 +400,7 @@ KCookieServer::tqfindCookies(TQString url, long windowId) // DCOP function QStringList -KCookieServer::tqfindDomains() +KCookieServer::findDomains() { TQStringList result; const TQStringList domains = mCookieJar->getDomainList(); @@ -418,7 +418,7 @@ KCookieServer::tqfindDomains() // DCOP function QStringList -KCookieServer::tqfindCookies(TQValueList<int> fields, +KCookieServer::findCookies(TQValueList<int> fields, TQString domain, TQString fqdn, TQString path, @@ -450,14 +450,14 @@ KCookieServer::tqfindCookies(TQValueList<int> fields, // DCOP function QString -KCookieServer::tqfindDOMCookies(TQString url) +KCookieServer::findDOMCookies(TQString url) { - return tqfindDOMCookies(url, 0); + return findDOMCookies(url, 0); } // DCOP function QString -KCookieServer::tqfindDOMCookies(TQString url, long windowId) +KCookieServer::findDOMCookies(TQString url, long windowId) { // We don't wait for pending cookies because it locks up konqueror // which can cause a deadlock if it happens to have a popup-menu up. @@ -465,7 +465,7 @@ KCookieServer::tqfindDOMCookies(TQString url, long windowId) KHttpCookieList pendingCookies; cookiesPending(url, &pendingCookies); - return mCookieJar->tqfindCookies(url, true, windowId, &pendingCookies); + return mCookieJar->findCookies(url, true, windowId, &pendingCookies); } // DCOP function diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h index 042d75521..0c36f10b1 100644 --- a/kioslave/http/kcookiejar/kcookieserver.h +++ b/kioslave/http/kcookiejar/kcookieserver.h @@ -45,12 +45,12 @@ public: ~KCookieServer(); k_dcop: - TQString tqfindCookies(TQString); - TQString tqfindCookies(TQString, long); - TQStringList tqfindDomains(); - TQStringList tqfindCookies(TQValueList<int>,TQString,TQString,TQString,TQString); - TQString tqfindDOMCookies(TQString); - TQString tqfindDOMCookies(TQString, long); + TQString findCookies(TQString); + TQString findCookies(TQString, long); + TQStringList findDomains(); + TQStringList findCookies(TQValueList<int>,TQString,TQString,TQString,TQString); + TQString findDOMCookies(TQString); + TQString findDOMCookies(TQString, long); void addCookies(TQString, TQCString, long); void deleteCookie(TQString, TQString, TQString, TQString); void deleteCookiesFromDomain(TQString); diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index f0d29b05a..2c11c33cb 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -93,17 +93,17 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, } # endif #endif - // Main widget's tqlayout manager... - TQVBoxLayout* vtqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - vtqlayout->setResizeMode( TQLayout::Fixed ); + // Main widget's layout manager... + TQVBoxLayout* vlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlayout->setResizeMode( TQLayout::Fixed ); // Cookie image and message to user TQHBox* hBox = new TQHBox( this ); hBox->setSpacing( KDialog::spacingHint() ); TQLabel* icon = new TQLabel( hBox ); icon->setPixmap( TQMessageBox::standardIcon(TQMessageBox::Warning) ); - icon->tqsetAlignment( Qt::AlignCenter ); - icon->setFixedSize( 2*icon->tqsizeHint() ); + icon->setAlignment( Qt::AlignCenter ); + icon->setFixedSize( 2*icon->sizeHint() ); 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->tqsetAlignment( Qt::AlignCenter ); + lbl->setAlignment( Qt::AlignCenter ); KHttpCookiePtr cookie = cookieList.first(); TQString host (cookie->host()); - int pos = host.tqfind(':'); + int pos = host.find(':'); if ( pos > 0 ) { TQString portNum = host.left(pos); @@ -128,14 +128,14 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, if (cookie->isCrossDomain()) txt += i18n(" <b>[Cross Domain!]</b>"); lbl = new TQLabel( txt, vBox ); - lbl->tqsetAlignment( Qt::AlignCenter ); + lbl->setAlignment( Qt::AlignCenter ); lbl = new TQLabel( i18n("Do you want to accept or reject?"), vBox ); - lbl->tqsetAlignment( Qt::AlignCenter ); - vtqlayout->addWidget( hBox, 0, Qt::AlignLeft ); + lbl->setAlignment( Qt::AlignCenter ); + vlayout->addWidget( hBox, 0, Qt::AlignLeft ); // Cookie Details dialog... m_detailView = new KCookieDetail( cookieList, count, this ); - vtqlayout->addWidget( m_detailView ); + vlayout->addWidget( m_detailView ); m_showDetails = showDetails; m_showDetails ? m_detailView->show():m_detailView->hide(); @@ -168,7 +168,7 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, "<em>(see WebBrowsing/Cookies in the Control Center)</em>.") ); #endif m_btnGrp->insert( rb ); - vtqlayout->addWidget( m_btnGrp ); + vlayout->addWidget( m_btnGrp ); if ( defaultButton > -1 && defaultButton < 3 ) m_btnGrp->setButton( defaultButton ); @@ -202,8 +202,8 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, #endif - vtqlayout->addWidget( bbox ); - setFixedSize( tqsizeHint() ); + vlayout->addWidget( bbox ); + setFixedSize( sizeHint() ); } 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->tqsizeHint() ); + btnNext->setFixedSize( btnNext->sizeHint() ); 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/netscape_cookie_spec.html b/kioslave/http/kcookiejar/netscape_cookie_spec.html index afd1f1565..eb190f2e3 100644 --- a/kioslave/http/kcookiejar/netscape_cookie_spec.html +++ b/kioslave/http/kcookiejar/netscape_cookie_spec.html @@ -151,7 +151,7 @@ the URL request. The path "/foo" would match "/foobar" and "/foo/bar.html". The path "/" is the most general path. <P> If the <B>path</B> is not specified, it as assumed to be the same path -as the document being described by the header which tqcontains the cookie. +as the document being described by the header which contains the cookie. <P> <DT> <B>secure</B> <DD> @@ -223,16 +223,16 @@ as long as it is less than 4 kilobytes. <LI>If a CGI script wishes to delete a cookie, it can do so by returning a cookie with the same name, and an <B>expires</B> time which is in the past. The path and name must match exactly -in order for the expiring cookie to tqreplace the valid cookie. +in order for the expiring cookie to replace the valid cookie. This requirement makes it difficult for anyone but the originator of a cookie to delete a cookie. <P><LI>When caching HTTP, as a proxy server might do, the <B>Set-cookie</B> response header should never be cached. <P><LI>If a proxy server receives a response which -tqcontains a <B>Set-cookie</B> header, it should propagate the <B>Set-cookie</B> +contains a <B>Set-cookie</B> header, it should propagate the <B>Set-cookie</B> header to the client, regardless of whether the response was 304 (Not Modified) or 200 (OK). -<P>Similarly, if a client request tqcontains a Cookie: header, it +<P>Similarly, if a client request contains a Cookie: header, it should be forwarded through a proxy, even if the conditional If-modified-since request is being made. </UL> diff --git a/kioslave/http/kcookiejar/rfc2109 b/kioslave/http/kcookiejar/rfc2109 index 86a4fc7e9..432fdcc6e 100644 --- a/kioslave/http/kcookiejar/rfc2109 +++ b/kioslave/http/kcookiejar/rfc2109 @@ -13,7 +13,7 @@ Category: Standards Track L. Montulli HTTP State Management Mechanism -tqStatus of this Memo +Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for @@ -374,7 +374,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 * The value for the Path attribute is not a prefix of the request- URI. - * The value for the Domain attribute tqcontains no embedded dots or + * The value for the Domain attribute contains no embedded dots or does not start with a dot. * The value for the request-host does not domain-match the Domain @@ -382,12 +382,12 @@ RFC 2109 HTTP State Management Mechanism February 1997 * The request-host is a FQDN (not IP address) and has the form HD, where D is the value of the Domain attribute, and H is a string - that tqcontains one or more dots. + that contains one or more dots. Examples: * A Set-Cookie from request-host y.x.foo.com for Domain=.foo.com - would be rejected, because H is y.x and tqcontains a dot. + would be rejected, because H is y.x and contains a dot. @@ -433,7 +433,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 checkbox (or, conversely, its immediate destruction). Privacy considerations dictate that the user have considerable - control over cookie management. The PRIVACY section tqcontains more + control over cookie management. The PRIVACY section contains more information. 4.3.4 Sending Cookies to the Origin Server @@ -666,7 +666,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme" - Shopping basket tqcontains an item. + Shopping basket contains an item. @@ -714,7 +714,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 each of which it receives a new cookie. All the cookies have the same Path attribute and (default) domain. Because the request URLs all have /acme as a prefix, and that matches the Path attribute, each - request tqcontains all the cookies received so far. + request contains all the cookies received so far. 5.2 Example 2 @@ -803,7 +803,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 inherently. For example, if a shopping-basket-style application always displays a user's current basket contents on each page, those pages cannot be cached, because each user's basket's contents would - be different. On the other hand, if each page tqcontains just a link + be different. On the other hand, if each page contains just a link that allows the user to "Look at My Shopping Basket", the page can be cached. @@ -862,7 +862,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 of a user through the server. Users may object to this behavior as an intrusive accumulation of information, even if their identity is not evident. (Identity might become evident if a user subsequently - fills out a form that tqcontains identifying information.) This state + fills out a form that contains identifying information.) This state management specification therefore requires that a user agent give the user control over such a possible intrusion, although the interface through which the user is given this control is left @@ -1053,7 +1053,7 @@ RFC 2109 HTTP State Management Mechanism February 1997 Wdy, DD-Mon-YY HH:MM:SS GMT - Note that the Expires date format tqcontains embedded spaces, and that + Note that the Expires date format contains embedded spaces, and that "old" cookies did not have quotes around values. Clients that implement to this specification should be aware of "old" cookies and Expires. diff --git a/kioslave/http/kcookiejar/rfc2965 b/kioslave/http/kcookiejar/rfc2965 index 1de450b13..8a4d02b17 100644 --- a/kioslave/http/kcookiejar/rfc2965 +++ b/kioslave/http/kcookiejar/rfc2965 @@ -13,7 +13,7 @@ Category: Standards Track Epinions.com, Inc. HTTP State Management Mechanism -tqStatus of this Memo +Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for @@ -71,7 +71,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 request line. Note that request-host is a HN. The term effective host name is related to host name. If a host name - tqcontains no dots, the effective host name is that name with the + contains no dots, the effective host name is that name with the string .local appended to it. Otherwise the effective host name is the same as the host name. Note that all effective host names contain at least one dot. @@ -472,7 +472,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 * The value for the Path attribute is not a prefix of the request-URI. - * The value for the Domain attribute tqcontains no embedded dots, + * The value for the Domain attribute contains no embedded dots, and the value is not .local. * The effective host name that derives from the request-host does @@ -480,7 +480,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 * The request-host is a HDN (not IP address) and has the form HD, where D is the value of the Domain attribute, and H is a string - that tqcontains one or more dots. + that contains one or more dots. * The Port attribute has a "port-list", and the request-port was not in the list. @@ -488,7 +488,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 Examples: * A Set-Cookie2 from request-host y.x.foo.com for Domain=.foo.com - would be rejected, because H is y.x and tqcontains a dot. + would be rejected, because H is y.x and contains a dot. * A Set-Cookie2 from request-host x.foo.com for Domain=.foo.com would be accepted. @@ -548,7 +548,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 response header, whether or not to accept the cookie. A potentially confusing situation could arise if the following sequence occurs: - * the user agent receives a cookie that tqcontains a CommentURL + * the user agent receives a cookie that contains a CommentURL attribute; * the user agent's cookie inspection interface is configured so @@ -585,7 +585,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 immediate destruction). Privacy considerations dictate that the user have considerable - control over cookie management. The PRIVACY section tqcontains more + control over cookie management. The PRIVACY section contains more information. 3.3.4 Sending Cookies to the Origin Server When it sends a request @@ -693,7 +693,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 request header facilitates interoperation between clients and servers that understand different versions of the cookie specification. When the client sends one or more cookies to an origin server, if at least - one of those cookies tqcontains a $Version attribute whose value is + one of those cookies contains a $Version attribute whose value is different from the version that the client understands, then the client MUST also send a Cookie2 request header, the syntax for which is @@ -865,7 +865,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 Set-Cookie2: Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme" - Shopping basket tqcontains an item. + Shopping basket contains an item. 5. User Agent -> Server @@ -912,7 +912,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 each of which it receives a new cookie. All the cookies have the same Path attribute and (default) domain. Because the request-URIs all path-match /acme, the Path attribute of each cookie, each request - tqcontains all the cookies received so far. + contains all the cookies received so far. 4.2 Example 2 @@ -996,7 +996,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 inherently. For example, if a shopping-basket-style application always displays a user's current basket contents on each page, those pages cannot be cached, because each user's basket's contents would - be different. On the other hand, if each page tqcontains just a link + be different. On the other hand, if each page contains just a link that allows the user to "Look at My Shopping Basket", the page can be cached. @@ -1052,7 +1052,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 6. PRIVACY Informed consent should guide the design of systems that use cookies. - A user should be able to tqfind out how a web site plans to use + A user should be able to find out how a web site plans to use information in a cookie and should be able to choose whether or not those policies are acceptable. Both the user agent and the origin server must assist informed consent. @@ -1074,7 +1074,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 of a user through the server. Users may object to this behavior as an intrusive accumulation of information, even if their identity is not evident. (Identity might become evident, for example, if a user - subsequently fills out a form that tqcontains identifying information.) + subsequently fills out a form that contains identifying information.) This state management specification therefore requires that a user agent give the user control over such a possible intrusion, although the interface through which the user is given this control is left @@ -1267,7 +1267,7 @@ RFC 2965 HTTP State Management Mechanism October 2000 understand Cookie request headers that also follow this specification. - New cookies MUST tqreplace both equivalent old- and new-style cookies. + New cookies MUST replace both equivalent old- and new-style cookies. That is, if a user agent that follows both this specification and Netscape's original specification receives a Set-Cookie2 response header, and the NAME and the Domain and Path attributes match (per diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 53a039310..0ad238ab7 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.tqfind(' '); + int i = line.find(' '); 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.tqfind(' '); + 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; } } @@ -128,8 +128,8 @@ static void processCookie(TQCString &line) if (url.isEmpty()) FAIL(TQString("Missing URL")); - line.tqreplace("%LASTYEAR%", *lastYear); - line.tqreplace("%NEXTYEAR%", *nextYear); + line.replace("%LASTYEAR%", *lastYear); + line.replace("%NEXTYEAR%", *nextYear); KHttpCookieList list = jar->makeCookies(urlStr, line, 0); @@ -158,9 +158,9 @@ 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->tqfindCookies(urlStr, false, 0, 0).stripWhiteSpace(); + TQString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace(); if (cookies != expectedCookies) FAIL(urlStr+TQString("\nGot '%1' expected '%2'") .arg(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); diff --git a/kioslave/http/shoutcast-icecast.txt b/kioslave/http/shoutcast-icecast.txt index b1eb5b40e..f7bdcf1e7 100644 --- a/kioslave/http/shoutcast-icecast.txt +++ b/kioslave/http/shoutcast-icecast.txt @@ -84,7 +84,7 @@ Contents: Although the current HTML 4.01 [HTML4] says to use the object element many browsers out on the market today still look for the embed element. - Below tqfind a little snipbit that will work work in many browsers. + Below find a little snipbit that will work work in many browsers. <object type="audio/x-midi" data="../media/sound.mid" width="200" height="26"> <param name="src" value="../media/sound.mid"> diff --git a/kioslave/iso/Makefile.am b/kioslave/iso/Makefile.am index 0a928a6e8..8151bec5c 100644 --- a/kioslave/iso/Makefile.am +++ b/kioslave/iso/Makefile.am @@ -39,9 +39,9 @@ uninstall-local: # kde_appsdir Where your application's menu entry (.desktop) should go to. # kde_icondir Where your icon should go to - better use KDE_ICON. # kde_sounddir Where your sounds should go to. -# kde_htmldir Where your docs should go to. (tqcontains lang subdirs) +# kde_htmldir Where your docs should go to. (contains lang subdirs) # kde_datadir Where you install application data. (Use a subdir) -# kde_locale Where translation files should go to. (tqcontains lang subdirs) +# kde_locale Where translation files should go to. (contains lang subdirs) # kde_cgidir Where cgi-bin executables should go to. # kde_confdir Where config files should go to (system-wide ones with default values). # kde_mimedir Where mimetypes .desktop files should go to. @@ -60,7 +60,7 @@ uninstall-local: # make messages.po. Move this one to ../po/ and "make merge" in po # the -x is for skipping messages already translated in kdelibs messages: - LIST=`tqfind . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \ + LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \ if test -n "$$LIST"; then \ $(XGETTEXT) -C -ki18n -x $(kde_includes)/kde.pot $$LIST -o ../po/iso.pot; \ fi diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index 542654f74..268805770 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.tqfind( '/', pos+1 )) != -1 ) + while ( (pos=fullPath.find( '/', 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::tqfromLatin1("/"); + path = TQString::fromLatin1("/"); 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::tqfromLatin1( "iso:/") ); + KURL redir( TQString::fromLatin1( "iso:/") ); kdDebug() << "url.path()==" << url.path() << endl; if (url.hasRef()) redir.setRef(url.htmlRef()); - redir.setPath( url.path() + TQString::tqfromLatin1("/") ); + redir.setPath( url.path() + TQString::fromLatin1("/") ); kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl; redirection( redir ); finished(); @@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url ) const KArchiveEntry* isoEntry; if ( path.isEmpty() ) { - path = TQString::tqfromLatin1( "/" ); + path = TQString::fromLatin1( "/" ); isoEntry = root; } else { isoEntry = root->entry( path ); @@ -463,7 +463,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat if (fileData.size()==0) break; } if (!mime) { - KMimeMagicResult * result = KMimeMagic::self()->tqfindBufferFileType( fileData, path ); + KMimeMagicResult * result = KMimeMagic::self()->findBufferFileType( fileData, path ); kdDebug() << "Emitting mimetype " << result->mimeType() << endl; mimeType( result->mimeType() ); mime=true; diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp index 67481d75b..dff111bff 100644 --- a/kioslave/iso/kiso.cpp +++ b/kioslave/iso/kiso.cpp @@ -55,7 +55,7 @@ //////////////////////////////////////////////////////////////////////// /** - * puts the track tqlayout of the device 'fname' into 'tracks' + * puts the track layout of the device 'fname' into 'tracks' * tracks structure: start sector, track number, ... * tracks should be 100*2 entry long (this is the maximum in the CD-ROM standard) * currently it's linux only, porters are welcome @@ -115,7 +115,7 @@ KIso::KIso( const TQString& filename, const TQString & _mimetype ) bool forced = true; if ( mimetype.isEmpty() ) { - mimetype = KMimeType::tqfindByFileContent( filename )->name(); + mimetype = KMimeType::findByFileContent( filename )->name(); kdDebug() << "KIso::KIso mimetype=" << mimetype << endl; // Don't move to prepareDevice - the other constructor theoretically allows ANY filter @@ -359,7 +359,7 @@ bool KIso::openArchive( int mode ) memset(&buf,0,sizeof(struct stat)); buf.st_mode=0777; } else { - /* If it's a block device, try to query the track tqlayout (for multisession) */ + /* If it's a block device, try to query the track layout (for multisession) */ if (m_startsec == -1 && S_ISBLK(buf.st_mode)) trackno=getTracks(m_filename.latin1(),(int*) &tracks); } diff --git a/kioslave/iso/libisofs/COPYING b/kioslave/iso/libisofs/COPYING index e6ed46e1b..c7aea1896 100644 --- a/kioslave/iso/libisofs/COPYING +++ b/kioslave/iso/libisofs/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -96,7 +96,7 @@ above, provided that you also meet all of these conditions: stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in - whole or in part tqcontains or is derived from the Program or any + whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include |