diff options
Diffstat (limited to 'kioslave')
31 files changed, 1234 insertions, 1234 deletions
diff --git a/kioslave/bzip2/kbzip2filter.cpp b/kioslave/bzip2/kbzip2filter.cpp index 5ef6aaf5b..ae72990d8 100644 --- a/kioslave/bzip2/kbzip2filter.cpp +++ b/kioslave/bzip2/kbzip2filter.cpp @@ -49,7 +49,7 @@ class KBzip2FilterFactory : public KLibFactory public: KBzip2FilterFactory() : KLibFactory() {} virtual ~KBzip2FilterFactory(){} - QObject *createObject( QObject *, const char *, const char*, const QStringList & ) + TQObject *createObject( TQObject *, const char *, const char*, const TQStringList & ) { return new KBzip2Filter; } diff --git a/kioslave/bzip2/kbzip2filter.h b/kioslave/bzip2/kbzip2filter.h index 47ccef915..2a7b13cf3 100644 --- a/kioslave/bzip2/kbzip2filter.h +++ b/kioslave/bzip2/kbzip2filter.h @@ -36,7 +36,7 @@ public: virtual void terminate(); virtual void reset(); virtual bool readHeader() { return true; } // bzip2 handles it by itself ! Cool ! - virtual bool writeHeader( const QCString & ) { return true; } + virtual bool writeHeader( const TQCString & ) { return true; } virtual void setOutBuffer( char * data, uint maxlen ); virtual void setInBuffer( const char * data, uint size ); virtual int inBufferAvailable() const; diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index c24413cc7..1fde27a81 100644 --- a/kioslave/file/file.cc +++ b/kioslave/file/file.cc @@ -24,7 +24,7 @@ #include <config.h> -#include <qglobal.h> //for Q_OS_XXX +#include <tqglobal.h> //for Q_OS_XXX #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> @@ -66,8 +66,8 @@ #include <string.h> #endif -#include <qvaluelist.h> -#include <qregexp.h> +#include <tqvaluelist.h> +#include <tqregexp.h> #include <kshred.h> #include <kdebug.h> @@ -76,8 +76,8 @@ #include <ksimpleconfig.h> #include <ktempfile.h> #include <klocale.h> -#include <qfile.h> -#include <qstrlist.h> +#include <tqfile.h> +#include <tqstrlist.h> #include "file.h" #include <limits.h> #include <kprocess.h> @@ -99,11 +99,11 @@ using namespace KIO; #define MAX_IPC_SIZE (1024*32) -static QString testLogFile( const char *_filename ); +static TQString testLogFile( const char *_filename ); #ifdef USE_POSIX_ACL -static QString aclAsString( acl_t p_acl ); +static TQString aclAsString( acl_t p_acl ); static bool isExtendedACL( acl_t p_acl ); -static void appendACLAtoms( const QCString & path, UDSEntry& entry, +static void appendACLAtoms( const TQCString & path, UDSEntry& entry, mode_t type, bool withACL ); #endif @@ -131,7 +131,7 @@ int kdemain( int argc, char **argv ) } -FileProtocol::FileProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "file", pool, app ) +FileProtocol::FileProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "file", pool, app ) { usercache.setAutoDelete( true ); groupcache.setAutoDelete( true ); @@ -143,8 +143,8 @@ int FileProtocol::setACL( const char *path, mode_t perm, bool directoryDefault ) int ret = 0; #ifdef USE_POSIX_ACL - const QString ACLString = metaData( "ACL_STRING" ); - const QString defaultACLString = metaData( "DEFAULT_ACL_STRING" ); + const TQString ACLString = metaData( "ACL_STRING" ); + const TQString defaultACLString = metaData( "DEFAULT_ACL_STRING" ); // Empty strings mean leave as is if ( !ACLString.isEmpty() ) { acl_t acl = 0; @@ -181,7 +181,7 @@ int FileProtocol::setACL( const char *path, mode_t perm, bool directoryDefault ) void FileProtocol::chmod( const KURL& url, int permissions ) { - QCString _path( QFile::encodeName(url.path()) ); + TQCString _path( TQFile::encodeName(url.path()) ); /* FIXME: Should be atomic */ if ( ::chmod( _path.data(), permissions ) == -1 || ( setACL( _path.data(), permissions, false ) == -1 ) || @@ -208,7 +208,7 @@ void FileProtocol::chmod( const KURL& url, int permissions ) void FileProtocol::mkdir( const KURL& url, int permissions ) { - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); kdDebug(7101) << "mkdir(): " << _path << ", permission = " << permissions << endl; @@ -253,7 +253,7 @@ void FileProtocol::get( const KURL& url ) return; } - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { if ( errno == EACCES ) @@ -289,7 +289,7 @@ void FileProtocol::get( const KURL& url ) KIO::filesize_t processed_size = 0; - QString resumeOffset = metaData("resume"); + TQString resumeOffset = metaData("resume"); if ( !resumeOffset.isEmpty() ) { bool ok; @@ -308,7 +308,7 @@ void FileProtocol::get( const KURL& url ) totalSize( buff.st_size ); char buffer[ MAX_IPC_SIZE ]; - QByteArray array; + TQByteArray array; while( 1 ) { @@ -334,7 +334,7 @@ void FileProtocol::get( const KURL& url ) //kdDebug( 7101 ) << "Processed: " << KIO::number (processed_size) << endl; } - data( QByteArray() ); + data( TQByteArray() ); close( fd ); @@ -372,14 +372,14 @@ same_inode(const KDE_struct_stat &src, const KDE_struct_stat &dest) void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resume ) { - QString dest_orig = url.path(); - QCString _dest_orig( QFile::encodeName(dest_orig)); + TQString dest_orig = url.path(); + TQCString _dest_orig( TQFile::encodeName(dest_orig)); kdDebug(7101) << "put(): " << dest_orig << ", mode=" << _mode << endl; - QString dest_part( dest_orig ); - dest_part += QString::fromLatin1(".part"); - QCString _dest_part( QFile::encodeName(dest_part)); + TQString dest_part( dest_orig ); + dest_part += TQString::fromLatin1(".part"); + TQCString _dest_part( TQFile::encodeName(dest_part)); KDE_struct_stat buff_orig; bool bOrigExists = (KDE_lstat( _dest_orig.data(), &buff_orig ) != -1); @@ -415,15 +415,15 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum } int result; - QString dest; - QCString _dest; + TQString dest; + TQCString _dest; int fd = -1; // Loop until we got 0 (end of data) do { - QByteArray buffer; + TQByteArray buffer; dataReq(); // Request for data result = readData( buffer ); @@ -453,7 +453,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum } } - _dest = QFile::encodeName(dest); + _dest = TQFile::encodeName(dest); if ( _resume ) { @@ -566,9 +566,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum } // set modification time - const QString mtimeStr = metaData( "modified" ); + const TQString mtimeStr = metaData( "modified" ); if ( !mtimeStr.isEmpty() ) { - QDateTime dt = QDateTime::fromString( mtimeStr, Qt::ISODate ); + TQDateTime dt = TQDateTime::fromString( mtimeStr, Qt::ISODate ); if ( dt.isValid() ) { KDE_struct_stat dest_statbuf; if (KDE_stat( _dest_orig.data(), &dest_statbuf ) == 0) { @@ -592,8 +592,8 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, { kdDebug(7101) << "copy(): " << src << " -> " << dest << ", mode=" << _mode << endl; - QCString _src( QFile::encodeName(src.path())); - QCString _dest( QFile::encodeName(dest.path())); + TQCString _src( TQFile::encodeName(src.path())); + TQCString _dest( TQFile::encodeName(dest.path())); KDE_struct_stat buff_src; #ifdef USE_POSIX_ACL acl_t acl; @@ -808,7 +808,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, ut.modtime = buff_src.st_mtime; if ( ::utime( _dest.data(), &ut ) != 0 ) { - kdWarning() << QString::fromLatin1("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 ); @@ -818,8 +818,8 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, void FileProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite ) { - QCString _src( QFile::encodeName(src.path())); - QCString _dest( QFile::encodeName(dest.path())); + TQCString _src( TQFile::encodeName(src.path())); + TQCString _dest( TQFile::encodeName(dest.path())); KDE_struct_stat buff_src; if ( KDE_lstat( _src.data(), &buff_src ) == -1 ) { if ( errno == EACCES ) @@ -858,7 +858,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, QString::fromLatin1("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() ); @@ -872,10 +872,10 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, finished(); } -void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwrite ) +void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overwrite ) { // Assume dest is local too (wouldn't be here otherwise) - if ( ::symlink( QFile::encodeName( target ), QFile::encodeName( dest.path() ) ) == -1 ) + if ( ::symlink( TQFile::encodeName( target ), TQFile::encodeName( dest.path() ) ) == -1 ) { // Does the destination already exist ? if ( errno == EEXIST ) @@ -883,7 +883,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr if ( overwrite ) { // Try to delete the destination - if ( unlink( QFile::encodeName( dest.path() ) ) != 0 ) + if ( unlink( TQFile::encodeName( dest.path() ) ) != 0 ) { error( KIO::ERR_CANNOT_DELETE, dest.path() ); return; @@ -894,7 +894,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr else { KDE_struct_stat buff_dest; - KDE_lstat( QFile::encodeName( dest.path() ), &buff_dest ); + KDE_lstat( TQFile::encodeName( dest.path() ), &buff_dest ); if (S_ISDIR(buff_dest.st_mode)) error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() ); else @@ -914,7 +914,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr void FileProtocol::del( const KURL& url, bool isfile) { - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); /***** * Delete files *****/ @@ -956,35 +956,35 @@ void FileProtocol::del( const KURL& url, bool isfile) } -QString FileProtocol::getUserName( uid_t uid ) +TQString FileProtocol::getUserName( uid_t uid ) { - QString *temp; + TQString *temp; temp = usercache.find( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - usercache.insert( uid, new QString(QString::fromLatin1(user->pw_name)) ); - return QString::fromLatin1( user->pw_name ); + usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + return TQString::fromLatin1( user->pw_name ); } else - return QString::number( uid ); + return TQString::number( uid ); } else return *temp; } -QString FileProtocol::getGroupName( gid_t gid ) +TQString FileProtocol::getGroupName( gid_t gid ) { - QString *temp; + TQString *temp; temp = groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - groupcache.insert( gid, new QString(QString::fromLatin1(grp->gr_name)) ); - return QString::fromLatin1( grp->gr_name ); + groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + return TQString::fromLatin1( grp->gr_name ); } else - return QString::number( gid ); + return TQString::number( gid ); } else return *temp; @@ -992,7 +992,7 @@ QString FileProtocol::getGroupName( gid_t gid ) -bool FileProtocol::createUDSEntry( const QString & filename, const QCString & path, UDSEntry & entry, +bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & path, UDSEntry & entry, short int details, bool withACL ) { assert(entry.count() == 0); // by contract :-) @@ -1019,7 +1019,7 @@ bool FileProtocol::createUDSEntry( const QString & filename, const QCString & pa } atom.m_uds = KIO::UDS_LINK_DEST; - atom.m_str = QFile::decodeName( buffer2 ); + atom.m_str = TQFile::decodeName( buffer2 ); entry.append( atom ); // A symlink -> follow it only if details>1 @@ -1113,9 +1113,9 @@ void FileProtocol::stat( const KURL & url ) * stat("/is/unaccessible/") -> EPERM H.Z. * This is the reason for the -1 */ - QCString _path( QFile::encodeName(url.path(-1))); + TQCString _path( TQFile::encodeName(url.path(-1))); - QString sDetails = metaData(QString::fromLatin1("details")); + TQString sDetails = metaData(TQString::fromLatin1("details")); int details = sDetails.isEmpty() ? 2 : sDetails.toInt(); kdDebug(7101) << "FileProtocol::stat details=" << details << endl; @@ -1183,7 +1183,7 @@ void FileProtocol::listDir( const KURL& url) return; } - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { @@ -1216,10 +1216,10 @@ void FileProtocol::listDir( const KURL& url) return; } - // Don't make this a QStringList. The locale file name we get here + // Don't make this a TQStringList. The locale file name we get here // should be passed intact to createUDSEntry to avoid problems with - // files where QFile::encodeName(QFile::decodeName(a)) != a. - QStrList entryNames; + // files where TQFile::encodeName(TQFile::decodeName(a)) != a. + TQStrList entryNames; while ( ( ep = KDE_readdir( dp ) ) != 0L ) entryNames.append( ep->d_name ); @@ -1250,10 +1250,10 @@ void FileProtocol::listDir( const KURL& url) } UDSEntry entry; - QStrListIterator it(entryNames); + TQStrListIterator it(entryNames); for (; it.current(); ++it) { entry.clear(); - if ( createUDSEntry( QFile::decodeName(*it), + if ( createUDSEntry( TQFile::decodeName(*it), *it /* we can use the filename as relative path*/, entry, 2, true ) ) listEntry( entry, false); @@ -1274,9 +1274,9 @@ void FileProtocol::listDir( const KURL& url) } /* -void FileProtocol::testDir( const QString& path ) +void FileProtocol::testDir( const TQString& path ) { - QCString _path( QFile::encodeName(path)); + TQCString _path( TQFile::encodeName(path)); KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { error( KIO::ERR_DOES_NOT_EXIST, path ); @@ -1292,16 +1292,16 @@ void FileProtocol::testDir( const QString& path ) } */ -void FileProtocol::special( const QByteArray &data) +void FileProtocol::special( const TQByteArray &data) { int tmp; - QDataStream stream(data, IO_ReadOnly); + TQDataStream stream(data, IO_ReadOnly); stream >> tmp; switch (tmp) { case 1: { - QString fstype, dev, point; + TQString fstype, dev, point; Q_INT8 iRo; stream >> iRo >> fstype >> dev >> point; @@ -1319,7 +1319,7 @@ void FileProtocol::special( const QByteArray &data) break; case 2: { - QString point; + TQString point; stream >> point; bool ok = pumount( point ); if (ok) @@ -1331,13 +1331,13 @@ void FileProtocol::special( const QByteArray &data) case 3: { - QString filename; + TQString filename; stream >> filename; KShred shred( filename ); - connect( &shred, SIGNAL( processedSize( KIO::filesize_t ) ), - this, SLOT( slotProcessedSize( KIO::filesize_t ) ) ); - connect( &shred, SIGNAL( infoMessage( const QString & ) ), - this, SLOT( slotInfoMessage( const QString & ) ) ); + connect( &shred, TQT_SIGNAL( processedSize( KIO::filesize_t ) ), + this, TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) ); + connect( &shred, TQT_SIGNAL( infoMessage( const TQString & ) ), + this, TQT_SLOT( slotInfoMessage( const TQString & ) ) ); if (!shred.shred()) error( KIO::ERR_CANNOT_DELETE, filename ); else @@ -1357,23 +1357,23 @@ void FileProtocol::slotProcessedSize( KIO::filesize_t bytes ) } // Connected to KShred -void FileProtocol::slotInfoMessage( const QString & msg ) +void FileProtocol::slotInfoMessage( const TQString & msg ) { kdDebug(7101) << "FileProtocol::slotInfoMessage (" << msg << ")" << endl; infoMessage( msg ); } -void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, const QString& _point ) +void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, const TQString& _point ) { kdDebug(7101) << "FileProtocol::mount _fstype=" << _fstype << endl; - QCString buffer; + TQCString buffer; #ifdef HAVE_VOLMGT /* * support for Solaris volume management */ - QString err; - QCString devname = QFile::encodeName( _dev ); + TQString err; + TQCString devname = TQFile::encodeName( _dev ); if( volmgt_running() ) { // kdDebug(7101) << "VOLMGT: vold ok." << endl; @@ -1399,30 +1399,30 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co KTempFile tmpFile; - QCString tmpFileC = QFile::encodeName(tmpFile.name()); + TQCString tmpFileC = TQFile::encodeName(tmpFile.name()); const char *tmp = tmpFileC.data(); - QCString dev; + TQCString dev; if ( _dev.startsWith( "LABEL=" ) ) { // turn LABEL=foo into -L foo (#71430) - QString labelName = _dev.mid( 6 ); + TQString labelName = _dev.mid( 6 ); dev = "-L "; - dev += QFile::encodeName( KProcess::quote( labelName ) ); // is it correct to assume same encoding as filesystem? + dev += TQFile::encodeName( KProcess::quote( labelName ) ); // is it correct to assume same encoding as filesystem? } else if ( _dev.startsWith( "UUID=" ) ) { // and UUID=bar into -U bar - QString uuidName = _dev.mid( 5 ); + TQString uuidName = _dev.mid( 5 ); dev = "-U "; - dev += QFile::encodeName( KProcess::quote( uuidName ) ); + dev += TQFile::encodeName( KProcess::quote( uuidName ) ); } else - dev = QFile::encodeName( KProcess::quote(_dev) ); // get those ready to be given to a shell + dev = TQFile::encodeName( KProcess::quote(_dev) ); // get those ready to be given to a shell - QCString point = QFile::encodeName( KProcess::quote(_point) ); + TQCString point = TQFile::encodeName( KProcess::quote(_point) ); bool fstype_empty = !_fstype || !*_fstype; - QCString fstype = KProcess::quote(_fstype).latin1(); // good guess - QCString readonly = _ro ? "-r" : ""; - QString epath = QString::fromLatin1(getenv("PATH")); - QString path = QString::fromLatin1("/sbin:/bin"); + TQCString fstype = KProcess::quote(_fstype).latin1(); // good guess + TQCString readonly = _ro ? "-r" : ""; + TQString epath = TQString::fromLatin1(getenv("PATH")); + TQString path = TQString::fromLatin1("/sbin:/bin"); if(!epath.isEmpty()) - path += QString::fromLatin1(":") + epath; - QString mountProg = KGlobal::dirs()->findExe("mount", path); + path += TQString::fromLatin1(":") + epath; + TQString mountProg = KGlobal::dirs()->findExe("mount", path); if (mountProg.isEmpty()){ error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); return; @@ -1462,7 +1462,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co int mount_ret = system( buffer.data() ); - QString err = testLogFile( tmp ); + TQString err = testLogFile( tmp ); if ( err.isEmpty() && mount_ret == 0) { finished(); @@ -1471,7 +1471,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co else { // Didn't work - or maybe we just got a warning - QString mp = KIO::findDeviceMountPoint( _dev ); + TQString mp = KIO::findDeviceMountPoint( _dev ); // Is the device mounted ? if ( !mp.isEmpty() && mount_ret == 0) { @@ -1510,13 +1510,13 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co } -void FileProtocol::unmount( const QString& _point ) +void FileProtocol::unmount( const TQString& _point ) { - QCString buffer; + TQCString buffer; KTempFile tmpFile; - QCString tmpFileC = QFile::encodeName(tmpFile.name()); - QString err; + TQCString tmpFileC = TQFile::encodeName(tmpFile.name()); + TQString err; const char *tmp = tmpFileC.data(); #ifdef HAVE_VOLMGT @@ -1558,7 +1558,7 @@ void FileProtocol::unmount( const QString& _point ) if( devname == NULL ) { err = "not in mnttab"; kdDebug(7101) << "VOLMGT: " - << QFile::encodeName(_point).data() + << TQFile::encodeName(_point).data() << ": " << err << endl; error( KIO::ERR_COULD_NOT_UNMOUNT, err ); return; @@ -1571,7 +1571,7 @@ void FileProtocol::unmount( const QString& _point ) */ ptr = strrchr( devname, '/' ); *ptr = '\0'; - QCString qdevname(QFile::encodeName(KProcess::quote(QFile::decodeName(QCString(devname)))).data()); + TQCString qdevname(TQFile::encodeName(KProcess::quote(TQFile::decodeName(TQCString(devname)))).data()); buffer.sprintf( "/usr/bin/eject %s 2>%s", qdevname.data(), tmp ); kdDebug(7101) << "VOLMGT: eject " << qdevname << endl; @@ -1580,7 +1580,7 @@ void FileProtocol::unmount( const QString& _point ) * exit status == 4 => media was ejected */ // if( WEXITSTATUS( system( buffer.local8Bit() )) == 4 ) { - if( WEXITSTATUS( system( buffer.data() )) == 4 ) { // Fix for QString -> QCString? + if( WEXITSTATUS( system( buffer.data() )) == 4 ) { // Fix for TQString -> QCString? /* * this is not an error, so skip "testLogFile()" * to avoid wrong/confusing error popup @@ -1602,17 +1602,17 @@ void FileProtocol::unmount( const QString& _point ) return; } #else - QString epath = getenv("PATH"); - QString path = QString::fromLatin1("/sbin:/bin"); + TQString epath = getenv("PATH"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; - QString umountProg = KGlobal::dirs()->findExe("umount", path); + TQString umountProg = KGlobal::dirs()->findExe("umount", path); if (umountProg.isEmpty()) { error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\"")); return; } - buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), QFile::encodeName(KProcess::quote(_point)).data(), tmp ); + buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(KProcess::quote(_point)).data(), tmp ); system( buffer.data() ); #endif /* HAVE_VOLMGT */ @@ -1629,41 +1629,41 @@ void FileProtocol::unmount( const QString& _point ) * *************************************/ -bool FileProtocol::pmount(const QString &dev) +bool FileProtocol::pmount(const TQString &dev) { - QString epath = getenv("PATH"); - QString path = QString::fromLatin1("/sbin:/bin"); + TQString epath = getenv("PATH"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; - QString pmountProg = KGlobal::dirs()->findExe("pmount", path); + TQString pmountProg = KGlobal::dirs()->findExe("pmount", path); if (pmountProg.isEmpty()) return false; - QCString buffer; - buffer.sprintf( "%s %s", QFile::encodeName(pmountProg).data(), - QFile::encodeName(KProcess::quote(dev)).data() ); + TQCString buffer; + buffer.sprintf( "%s %s", TQFile::encodeName(pmountProg).data(), + TQFile::encodeName(KProcess::quote(dev)).data() ); int res = system( buffer.data() ); return res==0; } -bool FileProtocol::pumount(const QString &point) +bool FileProtocol::pumount(const TQString &point) { - QString real_point = KStandardDirs::realPath(point); + TQString real_point = KStandardDirs::realPath(point); KMountPoint::List mtab = KMountPoint::currentMountPoints(); KMountPoint::List::const_iterator it = mtab.begin(); KMountPoint::List::const_iterator end = mtab.end(); - QString dev; + TQString dev; for (; it!=end; ++it) { - QString tmp = (*it)->mountedFrom(); - QString mp = (*it)->mountPoint(); + TQString tmp = (*it)->mountedFrom(); + TQString mp = (*it)->mountPoint(); mp = KStandardDirs::realPath(mp); if (mp==real_point) @@ -1673,18 +1673,18 @@ bool FileProtocol::pumount(const QString &point) if (dev.isEmpty()) return false; if (dev.endsWith("/")) dev.truncate(dev.length()-1); - QString epath = getenv("PATH"); - QString path = QString::fromLatin1("/sbin:/bin"); + TQString epath = getenv("PATH"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; - QString pumountProg = KGlobal::dirs()->findExe("pumount", path); + TQString pumountProg = KGlobal::dirs()->findExe("pumount", path); if (pumountProg.isEmpty()) return false; - QCString buffer; - buffer.sprintf( "%s %s", QFile::encodeName(pumountProg).data(), - QFile::encodeName(KProcess::quote(dev)).data() ); + TQCString buffer; + buffer.sprintf( "%s %s", TQFile::encodeName(pumountProg).data(), + TQFile::encodeName(KProcess::quote(dev)).data() ); int res = system( buffer.data() ); @@ -1697,12 +1697,12 @@ bool FileProtocol::pumount(const QString &point) * *************************************/ -static QString testLogFile( const char *_filename ) +static TQString testLogFile( const char *_filename ) { char buffer[ 1024 ]; KDE_struct_stat buff; - QString result; + TQString result; KDE_stat( _filename, &buff ); int size = buff.st_size; @@ -1714,7 +1714,7 @@ static QString testLogFile( const char *_filename ) FILE * f = KDE_fopen( _filename, "rb" ); if ( f == 0L ) { unlink( _filename ); - result = i18n("Could not read %1").arg(QFile::decodeName(_filename)); + result = i18n("Could not read %1").arg(TQFile::decodeName(_filename)); return result; } @@ -1723,7 +1723,7 @@ static QString testLogFile( const char *_filename ) while ( p != 0L ) { p = fgets( buffer, sizeof(buffer)-1, f ); if ( p != 0L ) - result += QString::fromLocal8Bit(buffer); + result += TQString::fromLocal8Bit(buffer); } fclose( f ); @@ -1745,15 +1745,15 @@ static bool isExtendedACL( acl_t acl ) return ( acl_equiv_mode( acl, 0 ) != 0 ); } -static QString aclAsString( acl_t acl ) +static TQString aclAsString( acl_t acl ) { char *aclString = acl_to_text( acl, 0 ); - QString ret = QString::fromLatin1( aclString ); + TQString ret = TQString::fromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } -static void appendACLAtoms( const QCString & path, UDSEntry& entry, mode_t type, bool withACL ) +static void appendACLAtoms( const TQCString & path, UDSEntry& entry, mode_t type, bool withACL ) { // first check for a noop #ifdef HAVE_NON_POSIX_ACL_EXTENSIONS diff --git a/kioslave/file/file.h b/kioslave/file/file.h index eef71798b..350703da5 100644 --- a/kioslave/file/file.h +++ b/kioslave/file/file.h @@ -29,10 +29,10 @@ #include <stdio.h> #include <unistd.h> -#include <qobject.h> -#include <qintdict.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqintdict.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kio/global.h> #include <kio/slavebase.h> @@ -40,11 +40,11 @@ // Note that this header file is installed, so think twice // before breaking binary compatibility (read: it is forbidden :) -class FileProtocol : public QObject, public KIO::SlaveBase +class FileProtocol : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - FileProtocol( const QCString &pool, const QCString &app); + FileProtocol( const TQCString &pool, const TQCString &app); virtual ~FileProtocol() { } virtual void get( const KURL& url ); @@ -54,7 +54,7 @@ public: int permissions, bool overwrite ); virtual void rename( const KURL &src, const KURL &dest, bool overwrite ); - virtual void symlink( const QString &target, const KURL &dest, + virtual void symlink( const TQString &target, const KURL &dest, bool overwrite ); virtual void stat( const KURL& url ); @@ -69,27 +69,27 @@ public: * 2 - unmount * 3 - shred */ - virtual void special( const QByteArray &data); - void unmount( const QString& point ); - void mount( bool _ro, const char *_fstype, const QString& dev, const QString& point ); - bool pumount( const QString &point ); - bool pmount( const QString &dev ); + virtual void special( const TQByteArray &data); + void unmount( const TQString& point ); + void mount( bool _ro, const char *_fstype, const TQString& dev, const TQString& point ); + bool pumount( const TQString &point ); + bool pmount( const TQString &dev ); protected slots: void slotProcessedSize( KIO::filesize_t _bytes ); - void slotInfoMessage( const QString & msg ); + void slotInfoMessage( const TQString & msg ); protected: - bool createUDSEntry( const QString & filename, const QCString & path, KIO::UDSEntry & entry, + bool createUDSEntry( const TQString & filename, const TQCString & path, KIO::UDSEntry & entry, short int details, bool withACL ); int setACL( const char *path, mode_t perm, bool _directoryDefault ); - QString getUserName( uid_t uid ); - QString getGroupName( gid_t gid ); + TQString getUserName( uid_t uid ); + TQString getGroupName( gid_t gid ); - QIntDict<QString> usercache; // maps long ==> QString * - QIntDict<QString> groupcache; + TQIntDict<TQString> usercache; // maps long ==> TQString * + TQIntDict<TQString> groupcache; class FileProtocolPrivate; FileProtocolPrivate *d; diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index 4da1912d7..ffc324c39 100644 --- a/kioslave/ftp/ftp.cc +++ b/kioslave/ftp/ftp.cc @@ -50,7 +50,7 @@ #include <time.h> #endif -#include <qdir.h> +#include <tqdir.h> #include <kdebug.h> #include <klocale.h> @@ -71,9 +71,9 @@ #endif // JPF: a remark on coding style (2004-03-06): -// Some calls to QString::fromLatin1() 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 QString::fromLatin1() can be ineffectient! +// const char* overloads, so that using TQString::fromLatin1() can be ineffectient! #define FTP_LOGIN "anonymous" #define FTP_PASSWD "anonymous@" @@ -247,7 +247,7 @@ int FtpSocket::connectSocket(int iTimeOutSec, bool bControl) if(iCon < 0) { int iErrorCode = (status() == IO_LookupError) ? ERR_UNKNOWN_HOST : ERR_COULD_NOT_CONNECT; - QString strMsg = KExtendedSocket::strError(status(), systemError()); + TQString strMsg = KExtendedSocket::strError(status(), systemError()); strMsg.prepend("connect failed (code %1): "); return errorMessage(iErrorCode, strMsg.arg(iCon).latin1()); } @@ -293,7 +293,7 @@ bool FtpSocket::setSocketOption(int opt, char*arg, socklen_t len) const // Ftp //=============================================================================== -Ftp::Ftp( const QCString &pool, const QCString &app ) +Ftp::Ftp( const TQCString &pool, const TQCString &app ) : SlaveBase( "ftp", pool, app ) { // init the socket data @@ -413,8 +413,8 @@ void Ftp::closeConnection() ftpCloseControlConnection(); } -void Ftp::setHost( const QString& _host, int _port, const QString& _user, - const QString& _pass ) +void Ftp::setHost( const TQString& _host, int _port, const TQString& _user, + const TQString& _pass ) { kdDebug(7102) << "Ftp::setHost (" << getpid() << "): " << _host << endl; @@ -452,16 +452,16 @@ bool Ftp::ftpOpenConnection (LoginMode loginMode) if ( m_host.isEmpty() ) { - error( ERR_UNKNOWN_HOST, QString::null ); + error( ERR_UNKNOWN_HOST, TQString::null ); return false; } assert( !m_bLoggedOn ); - m_initialPath = QString::null; - m_currentPath = QString::null; + m_initialPath = TQString::null; + m_currentPath = TQString::null; - QString host = m_bUseProxy ? m_proxyURL.host() : m_host; + TQString host = m_bUseProxy ? m_proxyURL.host() : m_host; unsigned short int port = m_bUseProxy ? m_proxyURL.port() : m_port; if (!ftpOpenControlConnection(host, port) ) @@ -486,7 +486,7 @@ bool Ftp::ftpOpenConnection (LoginMode loginMode) * * @return true on success. */ -bool Ftp::ftpOpenControlConnection( const QString &host, unsigned short int port ) +bool Ftp::ftpOpenControlConnection( const TQString &host, unsigned short int port ) { if ( port == 0 ) { struct servent *pse; @@ -499,7 +499,7 @@ bool Ftp::ftpOpenControlConnection( const QString &host, unsigned short int port // implicitly close, then try to open a new connection ... closeConnection(); int iErrorCode = ERR_OUT_OF_MEMORY; - QString sErrorMsg; + TQString sErrorMsg; m_control = new FtpSocket("CNTL"); if(m_control != NULL) { @@ -542,12 +542,12 @@ bool Ftp::ftpLogin() assert( !m_bLoggedOn ); - QString user = m_user; - QString pass = m_pass; + TQString user = m_user; + TQString pass = m_pass; if ( config()->readBoolEntry("EnableAutoLogin") ) { - QString au = config()->readEntry("autoLoginUser"); + TQString au = config()->readEntry("autoLoginUser"); if ( !au.isEmpty() ) { user = au; @@ -569,7 +569,7 @@ bool Ftp::ftpLogin() info.url.setPort( m_port ); info.url.setUser( user ); - QCString tempbuf; + TQCString tempbuf; int failedAuth = 0; do @@ -579,7 +579,7 @@ bool Ftp::ftpLogin() // but no password. if ( failedAuth > 0 || (!user.isEmpty() && pass.isEmpty()) ) { - QString errorMsg; + TQString errorMsg; kdDebug(7102) << "Prompting user for login info..." << endl; // Ask user if we should retry after when login fails! @@ -622,7 +622,7 @@ bool Ftp::ftpLogin() if ( m_port > 0 && m_port != DEFAULT_FTP_PORT ) { tempbuf += ':'; - tempbuf += QString::number(m_port).latin1(); + tempbuf += TQString::number(m_port).latin1(); } } @@ -692,7 +692,7 @@ bool Ftp::ftpLogin() return false; } - QString sTmp = remoteEncoding()->decode( ftpResponse(3) ); + TQString sTmp = remoteEncoding()->decode( ftpResponse(3) ); int iBeg = sTmp.find('"'); int iEnd = sTmp.findRev('"'); if(iBeg > 0 && iBeg < iEnd) @@ -707,18 +707,18 @@ bool Ftp::ftpLogin() void Ftp::ftpAutoLoginMacro () { - QString macro = metaData( "autoLoginMacro" ); + TQString macro = metaData( "autoLoginMacro" ); if ( macro.isEmpty() ) return; - QStringList list = QStringList::split('\n', macro); + TQStringList list = TQStringList::split('\n', macro); - for(QStringList::Iterator it = list.begin() ; it != list.end() ; ++it ) + for(TQStringList::Iterator it = list.begin() ; it != list.end() ; ++it ) { if ( (*it).startsWith("init") ) { - list = QStringList::split( '\\', macro); + list = TQStringList::split( '\\', macro); it = list.begin(); ++it; // ignore the macro name @@ -745,7 +745,7 @@ void Ftp::ftpAutoLoginMacro () * * return true if any response received, false on error */ -bool Ftp::ftpSendCmd( const QCString& cmd, int maxretries ) +bool Ftp::ftpSendCmd( const TQCString& cmd, int maxretries ) { assert(m_control != NULL); // must have control connection socket @@ -765,7 +765,7 @@ bool Ftp::ftpSendCmd( const QCString& cmd, int maxretries ) kdDebug(7102) << "send> pass [protected]" << endl; // Send the message... - QCString buf = cmd; + TQCString buf = cmd; buf += "\r\n"; // Yes, must use CR/LF - see http://cr.yp.to/ftp/request.html int num = m_control->write(buf.data(), buf.length()); @@ -968,10 +968,10 @@ int Ftp::ftpOpenEPRTDataConnection() if (sin == NULL) return ERR_INTERNAL; - // QString command = QString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) + // TQString command = TQString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) // .arg(sin->nodeName()) // .arg(sin->port()); - QCString command; + TQCString command; command.sprintf("eprt |%d|%s|%d|", sin->ianaFamily(), sin->nodeName().latin1(), sin->port()); @@ -1083,7 +1083,7 @@ int Ftp::ftpOpenPortDataConnection() pAddr = static_cast<const KInetSocketAddress*>(m_data->localAddress()); struct sockaddr* psa = (struct sockaddr*)pAddr->addressV4(); unsigned char* pData = (unsigned char*)(psa->sa_data); - QCString portCmd; + TQCString portCmd; portCmd.sprintf("port %d,%d,%d,%d,%d,%d", pData[2], pData[3], pData[4], pData[5], pData[0], pData[1]); if( ftpSendCmd(portCmd) && (m_iRespType == 2) ) @@ -1126,7 +1126,7 @@ int Ftp::ftpAcceptConnect() return (m_data->server() != -1); } -bool Ftp::ftpOpenCommand( const char *_command, const QString & _path, char _mode, +bool Ftp::ftpOpenCommand( const char *_command, const TQString & _path, char _mode, int errorcode, KIO::fileoffset_t _offset ) { int errCode = 0; @@ -1154,8 +1154,8 @@ bool Ftp::ftpOpenCommand( const char *_command, const QString & _path, char _mod } } - QCString tmp = _command; - QString errormessage; + TQCString tmp = _command; + TQString errormessage; if ( !_path.isEmpty() ) { tmp += " "; @@ -1216,13 +1216,13 @@ void Ftp::mkdir( const KURL & url, int permissions ) if( !ftpOpenConnection(loginImplicit) ) return; - QString path = remoteEncoding()->encode(url); - QCString buf = "mkd "; + TQString path = remoteEncoding()->encode(url); + TQCString buf = "mkd "; buf += remoteEncoding()->encode(path); if( !ftpSendCmd( buf ) || (m_iRespType != 2) ) { - QString currentPath( m_currentPath ); + TQString currentPath( m_currentPath ); // Check whether or not mkdir failed because // the directory already exists... @@ -1259,7 +1259,7 @@ void Ftp::rename( const KURL& src, const KURL& dst, bool overwrite ) error( ERR_CANNOT_RENAME, src.path() ); } -bool Ftp::ftpRename( const QString & src, const QString & dst, bool overwrite ) +bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite ) { assert( m_bLoggedOn ); @@ -1279,12 +1279,12 @@ bool Ftp::ftpRename( const QString & src, const QString & dst, bool overwrite ) if( !ftpFolder(src.left(pos+1), false) ) return false; - QCString from_cmd = "RNFR "; + TQCString from_cmd = "RNFR "; from_cmd += remoteEncoding()->encode(src.mid(pos+1)); if( !ftpSendCmd( from_cmd ) || (m_iRespType != 3) ) return false; - QCString to_cmd = "RNTO "; + TQCString to_cmd = "RNTO "; to_cmd += remoteEncoding()->encode(dst); if( !ftpSendCmd( to_cmd ) || (m_iRespType != 2) ) return false; @@ -1302,7 +1302,7 @@ void Ftp::del( const KURL& url, bool isfile ) if ( !isfile ) ftpFolder(remoteEncoding()->directory(url), false); // ignore errors - QCString cmd = isfile ? "DELE " : "RMD "; + TQCString cmd = isfile ? "DELE " : "RMD "; cmd += remoteEncoding()->encode(url); if( !ftpSendCmd( cmd ) || (m_iRespType != 2) ) @@ -1311,7 +1311,7 @@ void Ftp::del( const KURL& url, bool isfile ) finished(); } -bool Ftp::ftpChmod( const QString & path, int permissions ) +bool Ftp::ftpChmod( const TQString & path, int permissions ) { assert( m_bLoggedOn ); @@ -1320,7 +1320,7 @@ bool Ftp::ftpChmod( const QString & path, int permissions ) // we need to do bit AND 777 to get permissions, in case // we were sent a full mode (unlikely) - QCString cmd; + TQCString cmd; cmd.sprintf("SITE CHMOD %o ", permissions & 511 ); cmd += remoteEncoding()->encode(path); @@ -1347,7 +1347,7 @@ void Ftp::chmod( const KURL & url, int permissions ) finished(); } -void Ftp::ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, UDSEntry& entry, bool isDir ) +void Ftp::ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, UDSEntry& entry, bool isDir ) { assert(entry.count() == 0); // by contract :-) UDSAtom atom; @@ -1413,7 +1413,7 @@ void Ftp::ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, UDSEntr } -void Ftp::ftpShortStatAnswer( const QString& filename, bool isDir ) +void Ftp::ftpShortStatAnswer( const TQString& filename, bool isDir ) { UDSEntry entry; UDSAtom atom; @@ -1436,12 +1436,12 @@ void Ftp::ftpShortStatAnswer( const QString& filename, bool isDir ) finished(); } -void Ftp::ftpStatAnswerNotFound( const QString & path, const QString & filename ) +void Ftp::ftpStatAnswerNotFound( const TQString & path, const TQString & filename ) { // Only do the 'hack' below if we want to download an existing file (i.e. when looking at the "source") // When e.g. uploading a file, we still need stat() to return "not found" // when the file doesn't exist. - QString statSide = metaData("statSide"); + TQString statSide = metaData("statSide"); kdDebug(7102) << "Ftp::stat statSide=" << statSide << endl; if ( statSide == "source" ) { @@ -1465,7 +1465,7 @@ void Ftp::stat( const KURL &url) if( !ftpOpenConnection(loginImplicit) ) return; - QString path = QDir::cleanDirPath( url.path() ); + TQString path = TQDir::cleanDirPath( url.path() ); kdDebug(7102) << "Ftp::stat : cleaned path='" << path << "'" << endl; // We can't stat root, but we know it's a dir. @@ -1475,7 +1475,7 @@ void Ftp::stat( const KURL &url) UDSAtom atom; atom.m_uds = KIO::UDS_NAME; - atom.m_str = QString::null; + atom.m_str = TQString::null; entry.append( atom ); atom.m_uds = KIO::UDS_FILE_TYPE; @@ -1501,18 +1501,18 @@ void Ftp::stat( const KURL &url) KURL tempurl( url ); tempurl.setPath( path ); // take the clean one - QString listarg; // = tempurl.directory(false /*keep trailing slash*/); - QString parentDir; - QString filename = tempurl.fileName(); + TQString listarg; // = tempurl.directory(false /*keep trailing slash*/); + TQString parentDir; + TQString filename = tempurl.fileName(); Q_ASSERT(!filename.isEmpty()); - QString search = filename; + TQString search = filename; // Try cwd into it, if it works it's a dir (and then we'll list the parent directory to get more info) // if it doesn't work, it's a file (and then we'll use dir filename) bool isDir = ftpFolder(path, false); // if we're only interested in "file or directory", we should stop here - QString sDetails = metaData("details"); + TQString sDetails = metaData("details"); int details = sDetails.isEmpty() ? 2 : sDetails.toInt(); kdDebug(7102) << "Ftp::stat details=" << details << endl; if ( details == 0 ) @@ -1661,7 +1661,7 @@ void Ftp::listDir( const KURL &url ) return; // No path specified ? - QString path = url.path(); + TQString path = url.path(); if ( path.isEmpty() ) { KURL realURL; @@ -1725,13 +1725,13 @@ void Ftp::slave_status() slaveStatus( m_host, m_bLoggedOn ); } -bool Ftp::ftpOpenDir( const QString & path ) +bool Ftp::ftpOpenDir( const TQString & path ) { - //QString path( _url.path(-1) ); + //TQString path( _url.path(-1) ); // We try to change to this directory first to see whether it really is a directory. // (And also to follow symlinks) - QString tmp = path.isEmpty() ? QString("/") : path; + TQString tmp = path.isEmpty() ? TQString("/") : path; // We get '550', whether it's a file or doesn't exist... if( !ftpFolder(tmp, false) ) @@ -1743,9 +1743,9 @@ bool Ftp::ftpOpenDir( const QString & path ) // The only way to really know would be to have a metadata flag for this... // Since some windows ftp server seems not to support the -a argument, we use a fallback here. // In fact we have to use -la otherwise -a removes the default -l (e.g. ftp.trolltech.com) - if( !ftpOpenCommand( "list -la", QString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) ) + if( !ftpOpenCommand( "list -la", TQString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) ) { - if ( !ftpOpenCommand( "list", QString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) ) + if ( !ftpOpenCommand( "list", TQString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) ) { kdWarning(7102) << "Can't open for listing" << endl; return false; @@ -1825,7 +1825,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) (p_name = strtok(NULL,"\r\n")) != 0 ) { { - QCString tmp( p_name ); + TQCString tmp( p_name ); if ( p_access[0] == 'l' ) { int i = tmp.findRev( " -> " ); @@ -1834,10 +1834,10 @@ bool Ftp::ftpReadDir(FtpEntry& de) tmp.truncate( i ); } else - de.link = QString::null; + de.link = TQString::null; } else - de.link = QString::null; + de.link = TQString::null; if ( tmp[0] == '/' ) // listing on ftp://ftp.gnupg.org/ starts with '/' tmp.remove( 0, 1 ); @@ -1997,7 +1997,7 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi return statusServerError; } - QString resumeOffset = metaData("resume"); + TQString resumeOffset = metaData("resume"); if ( !resumeOffset.isEmpty() ) { llOffset = resumeOffset.toLongLong(); @@ -2025,7 +2025,7 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi kdDebug(7102) << "ftpGet: starting with offset=" << llOffset << endl; KIO::fileoffset_t processed_size = llOffset; - QByteArray array; + TQByteArray array; bool mimetypeEmitted = false; char buffer[maximumIpcSize]; // start whith small data chunks in case of a slow data source (modem) @@ -2126,7 +2126,7 @@ void Ftp::mimetype( const KURL& url ) return; } char buffer[ 2048 ]; - QByteArray array; + TQByteArray array; // Get one chunk of data only and send it, KIO::Job will determine the // mimetype from it using KMimeMagic int n = m_data->read( buffer, 2048 ); @@ -2161,9 +2161,9 @@ void Ftp::ftpAbortTransfer() // Send ABOR kdDebug(7102) << "send ABOR" << endl; - QCString buf = "ABOR\r\n"; + TQCString buf = "ABOR\r\n"; if ( KSocks::self()->write( sControl, buf.data(), buf.length() ) <= 0 ) { - error( ERR_COULD_NOT_WRITE, QString::null ); + error( ERR_COULD_NOT_WRITE, TQString::null ); return; } @@ -2171,7 +2171,7 @@ void Ftp::ftpAbortTransfer() kdDebug(7102) << "read resp" << endl; if ( readresp() != '2' ) { - error( ERR_COULD_NOT_READ, QString::null ); + error( ERR_COULD_NOT_READ, TQString::null ); return; } @@ -2208,15 +2208,15 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, else bMarkPartial = config()->readBoolEntry("MarkPartial", true); - QString dest_orig = dest_url.path(); - QString dest_part( dest_orig ); + TQString dest_orig = dest_url.path(); + TQString dest_part( dest_orig ); dest_part += ".part"; if ( ftpSize( dest_orig, 'I' ) ) { if ( m_size == 0 ) { // delete files with zero size - QCString cmd = "DELE "; + TQCString cmd = "DELE "; cmd += remoteEncoding()->encode(dest_orig); if( !ftpSendCmd( cmd ) || (m_iRespType != 2) ) { @@ -2244,7 +2244,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, { // file with extension .part exists if ( m_size == 0 ) { // delete files with zero size - QCString cmd = "DELE "; + TQCString cmd = "DELE "; cmd += remoteEncoding()->encode(dest_part); if ( !ftpSendCmd( cmd ) || (m_iRespType != 2) ) { @@ -2265,7 +2265,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, else m_size = 0; - QString dest; + TQString dest; // if we are using marking of partial downloads -> add .part extension if ( bMarkPartial ) { @@ -2296,7 +2296,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, kdDebug(7102) << "ftpPut: starting with offset=" << offset << endl; KIO::fileoffset_t processed_size = offset; - QByteArray buffer; + TQByteArray buffer; int result; int iBlockSize = initialIpcSize; // Loop until we got 'dataEnd' @@ -2338,7 +2338,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, if ( ftpSize( dest, 'I' ) && ( processed_size < (unsigned long) config()->readNumEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE) ) ) { - QCString cmd = "DELE "; + TQCString cmd = "DELE "; cmd += remoteEncoding()->encode(dest); (void) ftpSendCmd( cmd ); } @@ -2385,13 +2385,13 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, /** Use the SIZE command to get the file size. Warning : the size depends on the transfer mode, hence the second arg. */ -bool Ftp::ftpSize( const QString & path, char mode ) +bool Ftp::ftpSize( const TQString & path, char mode ) { m_size = UnknownSize; if( !ftpDataMode(mode) ) return false; - QCString buf; + TQCString buf; buf = "SIZE "; buf += remoteEncoding()->encode(path); if( !ftpSendCmd( buf ) || (m_iRespType != 2) ) @@ -2423,7 +2423,7 @@ bool Ftp::ftpDataMode(char cMode) if(m_cDataMode == cMode) return true; - QCString buf; + TQCString buf; buf.sprintf("TYPE %c", cMode); if( !ftpSendCmd(buf) || (m_iRespType != 2) ) return false; @@ -2432,9 +2432,9 @@ bool Ftp::ftpDataMode(char cMode) } -bool Ftp::ftpFolder(const QString& path, bool bReportError) +bool Ftp::ftpFolder(const TQString& path, bool bReportError) { - QString newPath = path; + TQString newPath = path; int iLen = newPath.length(); if(iLen > 1 && newPath[iLen-1] == '/') newPath.truncate(iLen-1); @@ -2442,7 +2442,7 @@ bool Ftp::ftpFolder(const QString& path, bool bReportError) if(m_currentPath == newPath) return true; - QCString tmp = "cwd "; + TQCString tmp = "cwd "; tmp += remoteEncoding()->encode(newPath); if( !ftpSendCmd(tmp) ) return false; // connection failure @@ -2469,7 +2469,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri StatusCode cs = statusSuccess; bool bSrcLocal = src.isLocalFile(); bool bDestLocal = dest.isLocalFile(); - QString sCopyFile; + TQString sCopyFile; if(bSrcLocal && !bDestLocal) // File -> Ftp { @@ -2486,7 +2486,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri if( cs == statusServerError ) sCopyFile = src.url(); } else { - error( ERR_UNSUPPORTED_ACTION, QString::null ); + error( ERR_UNSUPPORTED_ACTION, TQString::null ); return; } @@ -2499,12 +2499,12 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri } -Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, QString sCopyFile, +Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite) { // check if source is ok ... KDE_struct_stat buff; - QCString sSrc( QFile::encodeName(sCopyFile) ); + TQCString sSrc( TQFile::encodeName(sCopyFile) ); bool bSrcExists = (KDE_stat( sSrc.data(), &buff ) != -1); if(bSrcExists) { if(S_ISDIR(buff.st_mode)) @@ -2536,12 +2536,12 @@ Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, QString sCopyFile, } -Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const QString sCopyFile, +Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCopyFile, const KURL& url, int permissions, bool overwrite) { // check if destination is ok ... KDE_struct_stat buff; - QCString sDest( QFile::encodeName(sCopyFile) ); + TQCString sDest( TQFile::encodeName(sCopyFile) ); bool bDestExists = (KDE_stat( sDest.data(), &buff ) != -1); if(bDestExists) { if(S_ISDIR(buff.st_mode)) @@ -2557,14 +2557,14 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const QString sCopy } // do we have a ".part" file? - QCString sPart = QFile::encodeName(sCopyFile + ".part"); + TQCString sPart = TQFile::encodeName(sCopyFile + ".part"); bool bResume = false; bool bPartExists = (KDE_stat( sPart.data(), &buff ) != -1); const bool bMarkPartial = config()->readBoolEntry("MarkPartial", true); if(!bMarkPartial) { - sPart = QFile::encodeName(sCopyFile); + sPart = TQFile::encodeName(sCopyFile); } else if(bPartExists && buff.st_size > 0) { // must not be a folder! please fix a similar bug in kio_file!! diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h index e754152d2..b2ce56492 100644 --- a/kioslave/ftp/ftp.h +++ b/kioslave/ftp/ftp.h @@ -28,8 +28,8 @@ #include <sys/types.h> #include <sys/socket.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> #include <kurl.h> #include <kio/slavebase.h> @@ -38,10 +38,10 @@ struct FtpEntry { - QString name; - QString owner; - QString group; - QString link; + TQString name; + TQString owner; + TQString group; + TQString link; KIO::filesize_t size; mode_t type; @@ -238,10 +238,10 @@ class Ftp : public KIO::SlaveBase // Ftp() {} public: - Ftp( const QCString &pool, const QCString &app ); + Ftp( const TQCString &pool, const TQCString &app ); virtual ~Ftp(); - virtual void setHost( const QString& host, int port, const QString& user, const QString& pass ); + virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass ); /** * Connects to a ftp server and logs us in @@ -337,7 +337,7 @@ private: * * return true if any response received, false on error */ - bool ftpSendCmd( const QCString& cmd, int maxretries = 1 ); + bool ftpSendCmd( const TQCString& cmd, int maxretries = 1 ); /** * Use the SIZE command to get the file size. @@ -345,12 +345,12 @@ private: * @return true on success * Gets the size into m_size. */ - bool ftpSize( const QString & path, char mode ); + bool ftpSize( const TQString & path, char mode ); /** * Set the current working directory, but only if not yet current */ - bool ftpFolder(const QString& path, bool bReportError); + bool ftpFolder(const TQString& path, bool bReportError); /** * Runs a command on the ftp server like "list" or "retr". In contrast to @@ -363,7 +363,7 @@ private: * * @return true if the command was accepted by the server. */ - bool ftpOpenCommand( const char *command, const QString & path, char mode, + bool ftpOpenCommand( const char *command, const TQString & path, char mode, int errorcode, KIO::fileoffset_t offset = 0 ); /** @@ -419,10 +419,10 @@ private: */ int ftpAcceptConnect(); - bool ftpChmod( const QString & path, int permissions ); + bool ftpChmod( const TQString & path, int permissions ); // used by listDir - bool ftpOpenDir( const QString & path ); + bool ftpOpenDir( const TQString & path ); /** * Called to parse directory listings, call this until it returns false */ @@ -431,25 +431,25 @@ private: /** * Helper to fill an UDSEntry */ - void ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir ); + void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir ); - void ftpShortStatAnswer( const QString& filename, bool isDir ); + void ftpShortStatAnswer( const TQString& filename, bool isDir ); - void ftpStatAnswerNotFound( const QString & path, const QString & filename ); + void ftpStatAnswerNotFound( const TQString & path, const TQString & filename ); /** * This is the internal implementation of rename() - set put(). * * @return true on success. */ - bool ftpRename( const QString & src, const QString & dst, bool overwrite ); + bool ftpRename( const TQString & src, const TQString & dst, bool overwrite ); /** * Called by openConnection. It opens the control connection to the ftp server. * * @return true on success. */ - bool ftpOpenControlConnection( const QString & host, unsigned short int port ); + bool ftpOpenControlConnection( const TQString & host, unsigned short int port ); /** * closes the socket holding the control connection (see ftpOpenControlConnection) @@ -499,7 +499,7 @@ private: * @param sCopyFile path of the local source file * @return 0 for success, -1 for server error, -2 for client error */ - StatusCode ftpCopyPut(int& iError, int& iCopyFile, QString 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 @@ -509,24 +509,24 @@ private: * @param sCopyFile path of the local destination file * @return 0 for success, -1 for server error, -2 for client error */ - StatusCode ftpCopyGet(int& iError, int& iCopyFile, QString 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 - QString m_host; + TQString m_host; unsigned short int m_port; - QString m_user; - QString m_pass; + TQString m_user; + TQString m_pass; /** * Where we end up after connecting */ - QString m_initialPath; + TQString m_initialPath; KURL m_proxyURL; /** * the current working directory - see ftpFolder */ - QString m_currentPath; + TQString m_currentPath; /** * the status returned by the FTP protocol, set in ftpResponse() diff --git a/kioslave/gzip/kgzipfilter.cpp b/kioslave/gzip/kgzipfilter.cpp index 21380c6c1..375f9f9bc 100644 --- a/kioslave/gzip/kgzipfilter.cpp +++ b/kioslave/gzip/kgzipfilter.cpp @@ -38,7 +38,7 @@ class KGzipFilterFactory : public KLibFactory public: KGzipFilterFactory() : KLibFactory() {} ~KGzipFilterFactory(){} - QObject *createObject( QObject *parent, const char *name, const char*className, const QStringList & args ) + TQObject *createObject( TQObject *parent, const char *name, const char*className, const TQStringList & args ) { Q_UNUSED(parent); Q_UNUSED(name); @@ -141,11 +141,11 @@ bool KGzipFilter::readHeader() int i = d->zStream.avail_in; if ((i -= 10) < 0) return false; // Need at least 10 bytes #ifdef DEBUG_GZIP - kdDebug(7005) << "KGzipFilter::readHeader first byte is " << QString::number(*p,16) << endl; + kdDebug(7005) << "KGzipFilter::readHeader first byte is " << TQString::number(*p,16) << endl; #endif if (*p++ != 0x1f) return false; // GZip magic #ifdef DEBUG_GZIP - kdDebug(7005) << "KGzipFilter::readHeader second byte is " << QString::number(*p,16) << endl; + kdDebug(7005) << "KGzipFilter::readHeader second byte is " << TQString::number(*p,16) << endl; #endif if (*p++ != 0x8b) return false; int method = *p++; @@ -206,7 +206,7 @@ bool KGzipFilter::readHeader() put_short((n) & 0xffff); \ put_short(((ulong)(n)) >> 16); -bool KGzipFilter::writeHeader( const QCString & fileName ) +bool KGzipFilter::writeHeader( const TQCString & fileName ) { Bytef *p = d->zStream.next_out; int i = d->zStream.avail_out; @@ -238,7 +238,7 @@ void KGzipFilter::writeFooter() if (!m_headerWritten) kdDebug() << kdBacktrace(); Bytef *p = d->zStream.next_out; int i = d->zStream.avail_out; - //kdDebug(7005) << "KGzipFilter::writeFooter writing CRC= " << QString::number( m_crc, 16 ) << endl; + //kdDebug(7005) << "KGzipFilter::writeFooter writing CRC= " << TQString::number( m_crc, 16 ) << endl; put_long( m_crc ); //kdDebug(7005) << "KGzipFilter::writing writing totalin= " << d->zStream.total_in << endl; put_long( d->zStream.total_in ); diff --git a/kioslave/gzip/kgzipfilter.h b/kioslave/gzip/kgzipfilter.h index c103d774d..73b5173f3 100644 --- a/kioslave/gzip/kgzipfilter.h +++ b/kioslave/gzip/kgzipfilter.h @@ -32,7 +32,7 @@ public: virtual void terminate(); virtual void reset(); virtual bool readHeader(); - virtual bool writeHeader( const QCString & fileName ); + virtual bool writeHeader( const TQCString & fileName ); void writeFooter(); virtual void setOutBuffer( char * data, uint maxlen ); virtual void setInBuffer( const char * data, uint size ); diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index 5d9fa2eb7..e28e482bf 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -40,11 +40,11 @@ #include <sys/wait.h> */ -#include <qdom.h> -#include <qfile.h> -#include <qregexp.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqdatetime.h> +#include <tqstringlist.h> #include <kurl.h> #include <kidna.h> @@ -121,7 +121,7 @@ static char * trimLead (char *orig_string) return orig_string; } -static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL ) +static bool isCrossDomainRequest( const TQString& fqdn, const TQString& originURL ) { if (originURL == "true") // Backwards compatibility return true; @@ -129,16 +129,16 @@ static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL KURL url ( originURL ); // Document Origin domain - QString a = url.host(); + TQString a = url.host(); // Current request domain - QString b = fqdn; + TQString b = fqdn; if (a == b) return false; - QStringList l1 = QStringList::split('.', a); - QStringList l2 = QStringList::split('.', b); + TQStringList l1 = TQStringList::split('.', a); + TQStringList l2 = TQStringList::split('.', b); while(l1.count() > l2.count()) l1.pop_front(); @@ -161,14 +161,14 @@ static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL /* Eliminates any custom header that could potentically alter the request */ -static QString sanitizeCustomHTTPHeader(const QString& _header) +static TQString sanitizeCustomHTTPHeader(const TQString& _header) { - QString sanitizedHeaders; - QStringList headers = QStringList::split(QRegExp("[\r\n]"), _header); + TQString sanitizedHeaders; + TQStringList headers = TQStringList::split(TQRegExp("[\r\n]"), _header); - for(QStringList::Iterator it = headers.begin(); it != headers.end(); ++it) + for(TQStringList::Iterator it = headers.begin(); it != headers.end(); ++it) { - QString header = (*it).lower(); + TQString header = (*it).lower(); // Do not allow Request line to be specified and ignore // the other HTTP headers. if (header.find(':') == -1 || @@ -195,8 +195,8 @@ static QString sanitizeCustomHTTPHeader(const QString& _header) /************************************** HTTPProtocol **********************************************/ -HTTPProtocol::HTTPProtocol( const QCString &protocol, const QCString &pool, - const QCString &app ) +HTTPProtocol::HTTPProtocol( const TQCString &protocol, const TQCString &pool, + const TQCString &app ) :TCPSlaveBase( 0, protocol , pool, app, (protocol == "https" || protocol == "webdavs") ) { @@ -232,8 +232,8 @@ void HTTPProtocol::reparseConfiguration() { kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::reparseConfiguration" << endl; - m_strProxyRealm = QString::null; - m_strProxyAuthorization = QString::null; + m_strProxyRealm = TQString::null; + m_strProxyAuthorization = TQString::null; ProxyAuthentication = AUTH_None; m_bUseProxy = false; @@ -266,8 +266,8 @@ void HTTPProtocol::resetResponseSettings() m_responseHeader.clear(); m_qContentEncodings.clear(); m_qTransferEncodings.clear(); - m_sContentMD5 = QString::null; - m_strMimeType = QString::null; + m_sContentMD5 = TQString::null; + m_strMimeType = TQString::null; setMetaData("request-id", m_request.id); } @@ -308,7 +308,7 @@ void HTTPProtocol::resetSessionSettings() kdDebug(7113) << "(" << m_pid << ") ssl_was_in_use = " << metaData ("ssl_was_in_use") << endl; - m_request.referrer = QString::null; + m_request.referrer = TQString::null; if ( config()->readBoolEntry("SendReferrer", true) && (m_protocol == "https" || m_protocol == "webdavs" || metaData ("ssl_was_in_use") != "TRUE" ) ) @@ -317,7 +317,7 @@ void HTTPProtocol::resetSessionSettings() if (referrerURL.isValid()) { // Sanitize - QString protocol = referrerURL.protocol(); + TQString protocol = referrerURL.protocol(); if (protocol.startsWith("webdav")) { protocol.replace(0, 6, "http"); @@ -326,9 +326,9 @@ void HTTPProtocol::resetSessionSettings() if (protocol.startsWith("http")) { - referrerURL.setRef(QString::null); - referrerURL.setUser(QString::null); - referrerURL.setPass(QString::null); + referrerURL.setRef(TQString::null); + referrerURL.setUser(TQString::null); + referrerURL.setPass(TQString::null); m_request.referrer = referrerURL.url(); } } @@ -345,12 +345,12 @@ void HTTPProtocol::resetSessionSettings() } else { - m_request.charsets = QString::null; - m_request.languages = QString::null; + m_request.charsets = TQString::null; + m_request.languages = TQString::null; } // Adjust the offset value based on the "resume" meta-data. - QString resumeOffset = metaData("resume"); + TQString resumeOffset = metaData("resume"); if ( !resumeOffset.isEmpty() ) m_request.offset = resumeOffset.toInt(); // TODO: Convert to 64 bit else @@ -364,7 +364,7 @@ void HTTPProtocol::resetSessionSettings() if ( config()->readBoolEntry("SendUserAgent", true) ) m_request.userAgent = metaData("UserAgent"); else - m_request.userAgent = QString::null; + m_request.userAgent = TQString::null; // Deal with cache cleaning. // TODO: Find a smarter way to deal with cleaning the @@ -384,14 +384,14 @@ void HTTPProtocol::resetSessionSettings() else { m_bNeedTunnel = false; - setRealHost( QString::null); + setRealHost( TQString::null); } m_responseCode = 0; m_prevResponseCode = 0; - m_strRealm = QString::null; - m_strAuthorization = QString::null; + m_strRealm = TQString::null; + m_strAuthorization = TQString::null; Authentication = AUTH_None; // Obtain the proxy and remote server timeout values @@ -423,8 +423,8 @@ void HTTPProtocol::resetSessionSettings() m_bFirstRequest = false; } -void HTTPProtocol::setHost( const QString& host, int port, - const QString& user, const QString& pass ) +void HTTPProtocol::setHost( const TQString& host, int port, + const TQString& user, const TQString& pass ) { // Reset the webdav-capable flags for this host if ( m_request.hostname != host ) @@ -607,7 +607,7 @@ void HTTPProtocol::stat(const KURL& url) if ( m_protocol != "webdav" && m_protocol != "webdavs" ) { - QString statSide = metaData(QString::fromLatin1("statSide")); + TQString statSide = metaData(TQString::fromLatin1("statSide")); if ( statSide != "source" ) { // When uploading we assume the file doesn't exit @@ -654,7 +654,7 @@ void HTTPProtocol::listDir( const KURL& url ) davStatList( url, false ); } -void HTTPProtocol::davSetRequest( const QCString& requestXML ) +void HTTPProtocol::davSetRequest( const TQCString& requestXML ) { // insert the document into the POST buffer, kill trailing zero byte m_bufPOST = requestXML; @@ -673,10 +673,10 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) return; // Maybe it's a disguised SEARCH... - QString query = metaData("davSearchQuery"); + TQString query = metaData("davSearchQuery"); if ( !query.isEmpty() ) { - QCString request = "<?xml version=\"1.0\"?>\r\n"; + TQCString request = "<?xml version=\"1.0\"?>\r\n"; request.append( "<D:searchrequest xmlns:D=\"DAV:\">\r\n" ); request.append( query.utf8() ); request.append( "</D:searchrequest>\r\n" ); @@ -684,7 +684,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) davSetRequest( request ); } else { // We are only after certain features... - QCString request; + TQCString request; request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" "<D:propfind xmlns:D=\"DAV:\">"; @@ -715,7 +715,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) // WebDAV Stat or List... m_request.method = query.isEmpty() ? DAV_PROPFIND : DAV_SEARCH; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; m_request.davData.depth = stat ? 0 : 1; @@ -730,26 +730,26 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) return; } - QDomDocument multiResponse; + TQDomDocument multiResponse; multiResponse.setContent( m_bufWebDavData, true ); bool hasResponse = false; - for ( QDomNode n = multiResponse.documentElement().firstChild(); + for ( TQDomNode n = multiResponse.documentElement().firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement thisResponse = n.toElement(); + TQDomElement thisResponse = n.toElement(); if (thisResponse.isNull()) continue; hasResponse = true; - QDomElement href = thisResponse.namedItem( "href" ).toElement(); + TQDomElement href = thisResponse.namedItem( "href" ).toElement(); if ( !href.isNull() ) { entry.clear(); - QString urlStr = href.text(); + TQString urlStr = href.text(); int encoding = remoteEncoding()->encodingMib(); if ((encoding == 106) && (!KStringHandler::isUtf8(KURL::decode_string(urlStr, 4).latin1()))) encoding = 4; // Use latin1 if the file is not actually utf-8 @@ -771,7 +771,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) entry.append( atom ); - QDomNodeList propstats = thisResponse.elementsByTagName( "propstat" ); + TQDomNodeList propstats = thisResponse.elementsByTagName( "propstat" ); davParsePropstats( propstats, entry ); @@ -819,23 +819,23 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) // WebDAV method m_request.method = method; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; retrieveContent( false ); } -int HTTPProtocol::codeFromResponse( const QString& response ) +int HTTPProtocol::codeFromResponse( const TQString& response ) { int firstSpace = response.find( ' ' ); int secondSpace = response.find( ' ', firstSpace + 1 ); return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt(); } -void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& entry ) +void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& entry ) { - QString mimeType; + TQString mimeType; UDSAtom atom; bool foundExecutable = false; bool isDirectory = false; @@ -844,9 +844,9 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e for ( uint i = 0; i < propstats.count(); i++) { - QDomElement propstat = propstats.item(i).toElement(); + TQDomElement propstat = propstats.item(i).toElement(); - QDomElement status = propstat.namedItem( "status" ).toElement(); + TQDomElement status = propstat.namedItem( "status" ).toElement(); if ( status.isNull() ) { // error, no status code in this propstat @@ -862,7 +862,7 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e continue; } - QDomElement prop = propstat.namedItem( "prop" ).toElement(); + TQDomElement prop = propstat.namedItem( "prop" ).toElement(); if ( prop.isNull() ) { kdDebug(7113) << "Error: no prop segment in this propstat." << endl; @@ -872,15 +872,15 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e if ( hasMetaData( "davRequestResponse" ) ) { atom.m_uds = KIO::UDS_XML_PROPERTIES; - QDomDocument doc; + TQDomDocument doc; doc.appendChild(prop); atom.m_str = doc.toString(); entry.append( atom ); } - for ( QDomNode n = prop.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = prop.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement property = n.toElement(); + TQDomElement property = n.toElement(); if (property.isNull()) continue; @@ -912,7 +912,7 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e else if ( property.tagName() == "source" ) { // Source template location - QDomElement source = property.namedItem( "link" ).toElement() + TQDomElement source = property.namedItem( "link" ).toElement() .namedItem( "dst" ).toElement(); if ( !source.isNull() ) setMetaData( "davSource", source.text() ); @@ -959,22 +959,22 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e else if ( property.tagName() == "supportedlock" ) { // Supported locking specifications - for ( QDomNode n2 = property.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) + for ( TQDomNode n2 = property.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) { - QDomElement lockEntry = n2.toElement(); + TQDomElement lockEntry = n2.toElement(); if ( lockEntry.tagName() == "lockentry" ) { - QDomElement lockScope = lockEntry.namedItem( "lockscope" ).toElement(); - QDomElement lockType = lockEntry.namedItem( "locktype" ).toElement(); + TQDomElement lockScope = lockEntry.namedItem( "lockscope" ).toElement(); + TQDomElement lockType = lockEntry.namedItem( "locktype" ).toElement(); if ( !lockScope.isNull() && !lockType.isNull() ) { // Lock type was properly specified supportedLockCount++; - QString scope = lockScope.firstChild().toElement().tagName(); - QString type = lockType.firstChild().toElement().tagName(); + TQString scope = lockScope.firstChild().toElement().tagName(); + TQString type = lockType.firstChild().toElement().tagName(); - setMetaData( QString("davSupportedLockScope%1").arg(supportedLockCount), scope ); - setMetaData( QString("davSupportedLockType%1").arg(supportedLockCount), type ); + setMetaData( TQString("davSupportedLockScope%1").arg(supportedLockCount), scope ); + setMetaData( TQString("davSupportedLockType%1").arg(supportedLockCount), type ); } } } @@ -1000,8 +1000,8 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e } } - setMetaData( "davLockCount", QString("%1").arg(lockCount) ); - setMetaData( "davSupportedLockCount", QString("%1").arg(supportedLockCount) ); + setMetaData( "davLockCount", TQString("%1").arg(lockCount) ); + setMetaData( "davSupportedLockCount", TQString("%1").arg(supportedLockCount) ); atom.m_uds = KIO::UDS_FILE_TYPE; atom.m_long = isDirectory ? S_IFDIR : S_IFREG; @@ -1029,52 +1029,52 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e } } -void HTTPProtocol::davParseActiveLocks( const QDomNodeList& activeLocks, +void HTTPProtocol::davParseActiveLocks( const TQDomNodeList& activeLocks, uint& lockCount ) { for ( uint i = 0; i < activeLocks.count(); i++ ) { - QDomElement activeLock = activeLocks.item(i).toElement(); + TQDomElement activeLock = activeLocks.item(i).toElement(); lockCount++; // required - QDomElement lockScope = activeLock.namedItem( "lockscope" ).toElement(); - QDomElement lockType = activeLock.namedItem( "locktype" ).toElement(); - QDomElement lockDepth = activeLock.namedItem( "depth" ).toElement(); + TQDomElement lockScope = activeLock.namedItem( "lockscope" ).toElement(); + TQDomElement lockType = activeLock.namedItem( "locktype" ).toElement(); + TQDomElement lockDepth = activeLock.namedItem( "depth" ).toElement(); // optional - QDomElement lockOwner = activeLock.namedItem( "owner" ).toElement(); - QDomElement lockTimeout = activeLock.namedItem( "timeout" ).toElement(); - QDomElement lockToken = activeLock.namedItem( "locktoken" ).toElement(); + TQDomElement lockOwner = activeLock.namedItem( "owner" ).toElement(); + TQDomElement lockTimeout = activeLock.namedItem( "timeout" ).toElement(); + TQDomElement lockToken = activeLock.namedItem( "locktoken" ).toElement(); if ( !lockScope.isNull() && !lockType.isNull() && !lockDepth.isNull() ) { // lock was properly specified lockCount++; - QString scope = lockScope.firstChild().toElement().tagName(); - QString type = lockType.firstChild().toElement().tagName(); - QString depth = lockDepth.text(); + TQString scope = lockScope.firstChild().toElement().tagName(); + TQString type = lockType.firstChild().toElement().tagName(); + TQString depth = lockDepth.text(); - setMetaData( QString("davLockScope%1").arg( lockCount ), scope ); - setMetaData( QString("davLockType%1").arg( lockCount ), type ); - setMetaData( QString("davLockDepth%1").arg( lockCount ), depth ); + setMetaData( TQString("davLockScope%1").arg( lockCount ), scope ); + setMetaData( TQString("davLockType%1").arg( lockCount ), type ); + setMetaData( TQString("davLockDepth%1").arg( lockCount ), depth ); if ( !lockOwner.isNull() ) - setMetaData( QString("davLockOwner%1").arg( lockCount ), lockOwner.text() ); + setMetaData( TQString("davLockOwner%1").arg( lockCount ), lockOwner.text() ); if ( !lockTimeout.isNull() ) - setMetaData( QString("davLockTimeout%1").arg( lockCount ), lockTimeout.text() ); + setMetaData( TQString("davLockTimeout%1").arg( lockCount ), lockTimeout.text() ); if ( !lockToken.isNull() ) { - QDomElement tokenVal = lockScope.namedItem( "href" ).toElement(); + TQDomElement tokenVal = lockScope.namedItem( "href" ).toElement(); if ( !tokenVal.isNull() ) - setMetaData( QString("davLockToken%1").arg( lockCount ), tokenVal.text() ); + setMetaData( TQString("davLockToken%1").arg( lockCount ), tokenVal.text() ); } } } } -long HTTPProtocol::parseDateTime( const QString& input, const QString& type ) +long HTTPProtocol::parseDateTime( const TQString& input, const TQString& type ) { if ( type == "dateTime.tz" ) { @@ -1093,26 +1093,26 @@ long HTTPProtocol::parseDateTime( const QString& input, const QString& type ) return KRFCDate::parseDateISO8601( input ); } -QString HTTPProtocol::davProcessLocks() +TQString HTTPProtocol::davProcessLocks() { if ( hasMetaData( "davLockCount" ) ) { - QString response("If:"); + TQString response("If:"); int numLocks; numLocks = metaData( "davLockCount" ).toInt(); bool bracketsOpen = false; for ( int i = 0; i < numLocks; i++ ) { - if ( hasMetaData( QString("davLockToken%1").arg(i) ) ) + if ( hasMetaData( TQString("davLockToken%1").arg(i) ) ) { - if ( hasMetaData( QString("davLockURL%1").arg(i) ) ) + if ( hasMetaData( TQString("davLockURL%1").arg(i) ) ) { if ( bracketsOpen ) { response += ")"; bracketsOpen = false; } - response += " <" + metaData( QString("davLockURL%1").arg(i) ) + ">"; + response += " <" + metaData( TQString("davLockURL%1").arg(i) ) + ">"; } if ( !bracketsOpen ) @@ -1125,10 +1125,10 @@ QString HTTPProtocol::davProcessLocks() response += " "; } - if ( hasMetaData( QString("davLockNot%1").arg(i) ) ) + if ( hasMetaData( TQString("davLockNot%1").arg(i) ) ) response += "Not "; - response += "<" + metaData( QString("davLockToken%1").arg(i) ) + ">"; + response += "<" + metaData( TQString("davLockToken%1").arg(i) ) + ">"; } } @@ -1139,7 +1139,7 @@ QString HTTPProtocol::davProcessLocks() return response; } - return QString::null; + return TQString::null; } bool HTTPProtocol::davHostOk() @@ -1164,7 +1164,7 @@ bool HTTPProtocol::davHostOk() // query the server's capabilities generally, not for a specific URL m_request.path = "*"; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1214,7 +1214,7 @@ void HTTPProtocol::mkdir( const KURL& url, int ) m_request.method = DAV_MKCOL; m_request.path = url.path(); - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1238,7 +1238,7 @@ void HTTPProtocol::get( const KURL& url ) m_request.path = url.path(); m_request.query = url.query(); - QString tmp = metaData("cache"); + TQString tmp = metaData("cache"); if (!tmp.isEmpty()) m_request.cache = parseCacheControl(tmp); else @@ -1265,7 +1265,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool) if ( !davHostOk() ) return; - QCString request; + TQCString request; request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" "<D:propfind xmlns:D=\"DAV:\"><D:prop>" "<D:creationdate/>" @@ -1278,7 +1278,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool) // WebDAV Stat or List... m_request.method = DAV_PROPFIND; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; m_request.davData.depth = 0; @@ -1286,7 +1286,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool) retrieveContent(true); if (m_responseCode == 207) { - error(ERR_FILE_ALREADY_EXIST, QString::null); + error(ERR_FILE_ALREADY_EXIST, TQString::null); return; } @@ -1295,7 +1295,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool) m_request.method = HTTP_PUT; m_request.path = url.path(); - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1334,7 +1334,7 @@ void HTTPProtocol::copy( const KURL& src, const KURL& dest, int, bool overwrite m_request.path = src.path(); m_request.davData.desturl = newDest.url(); m_request.davData.overwrite = overwrite; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1366,7 +1366,7 @@ void HTTPProtocol::rename( const KURL& src, const KURL& dest, bool overwrite ) m_request.path = src.path(); m_request.davData.desturl = newDest.url(); m_request.davData.overwrite = overwrite; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1390,7 +1390,7 @@ void HTTPProtocol::rename( const KURL& src, const KURL& dest, bool overwrite ) m_request.path = m_redirectLocation.path(); m_request.davData.desturl = newDest.url(); m_request.davData.overwrite = overwrite; - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1413,7 +1413,7 @@ void HTTPProtocol::del( const KURL& url, bool ) m_request.method = HTTP_DELETE; m_request.path = url.path(); - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1444,8 +1444,8 @@ void HTTPProtocol::post( const KURL& url ) retrieveContent(); } -void HTTPProtocol::davLock( const KURL& url, const QString& scope, - const QString& type, const QString& owner ) +void HTTPProtocol::davLock( const KURL& url, const TQString& scope, + const TQString& type, const TQString& owner ) { kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davLock " << url.prettyURL() << endl; @@ -1455,31 +1455,31 @@ void HTTPProtocol::davLock( const KURL& url, const QString& scope, m_request.method = DAV_LOCK; m_request.path = url.path(); - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; /* Create appropriate lock XML request. */ - QDomDocument lockReq; + TQDomDocument lockReq; - QDomElement lockInfo = lockReq.createElementNS( "DAV:", "lockinfo" ); + TQDomElement lockInfo = lockReq.createElementNS( "DAV:", "lockinfo" ); lockReq.appendChild( lockInfo ); - QDomElement lockScope = lockReq.createElement( "lockscope" ); + TQDomElement lockScope = lockReq.createElement( "lockscope" ); lockInfo.appendChild( lockScope ); lockScope.appendChild( lockReq.createElement( scope ) ); - QDomElement lockType = lockReq.createElement( "locktype" ); + TQDomElement lockType = lockReq.createElement( "locktype" ); lockInfo.appendChild( lockType ); lockType.appendChild( lockReq.createElement( type ) ); if ( !owner.isNull() ) { - QDomElement ownerElement = lockReq.createElement( "owner" ); + TQDomElement ownerElement = lockReq.createElement( "owner" ); lockReq.appendChild( ownerElement ); - QDomElement ownerHref = lockReq.createElement( "href" ); + TQDomElement ownerHref = lockReq.createElement( "href" ); ownerElement.appendChild( ownerHref ); ownerHref.appendChild( lockReq.createTextNode( owner ) ); @@ -1492,17 +1492,17 @@ void HTTPProtocol::davLock( const KURL& url, const QString& scope, if ( m_responseCode == 200 ) { // success - QDomDocument multiResponse; + TQDomDocument multiResponse; multiResponse.setContent( m_bufWebDavData, true ); - QDomElement prop = multiResponse.documentElement().namedItem( "prop" ).toElement(); + TQDomElement prop = multiResponse.documentElement().namedItem( "prop" ).toElement(); - QDomElement lockdiscovery = prop.namedItem( "lockdiscovery" ).toElement(); + TQDomElement lockdiscovery = prop.namedItem( "lockdiscovery" ).toElement(); uint lockCount = 0; davParseActiveLocks( lockdiscovery.elementsByTagName( "activelock" ), lockCount ); - setMetaData( "davLockCount", QString("%1").arg( lockCount ) ); + setMetaData( "davLockCount", TQString("%1").arg( lockCount ) ); finished(); @@ -1520,7 +1520,7 @@ void HTTPProtocol::davUnlock( const KURL& url ) m_request.method = DAV_UNLOCK; m_request.path = url.path(); - m_request.query = QString::null; + m_request.query = TQString::null; m_request.cache = CC_Reload; m_request.doProxy = m_bUseProxy; @@ -1532,7 +1532,7 @@ void HTTPProtocol::davUnlock( const KURL& url ) davError(); } -QString HTTPProtocol::davError( int code /* = -1 */, QString url ) +TQString HTTPProtocol::davError( int code /* = -1 */, TQString url ) { bool callError = false; if ( code == -1 ) { @@ -1546,11 +1546,11 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url ) if ( !url.isNull() ) url = m_request.url.url(); - QString action, errorString; + TQString action, errorString; KIO::Error kError; // for 412 Precondition Failed - QString ow = i18n( "Otherwise, the request would have succeeded." ); + TQString ow = i18n( "Otherwise, the request would have succeeded." ); switch ( m_request.method ) { case DAV_PROPFIND: @@ -1615,29 +1615,29 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url ) // there was an error retrieving the XML document. // ironic, eh? if ( !readBody( true ) && m_bError ) - return QString::null; + return TQString::null; - QStringList errors; - QDomDocument multiResponse; + TQStringList errors; + TQDomDocument multiResponse; multiResponse.setContent( m_bufWebDavData, true ); - QDomElement multistatus = multiResponse.documentElement().namedItem( "multistatus" ).toElement(); + TQDomElement multistatus = multiResponse.documentElement().namedItem( "multistatus" ).toElement(); - QDomNodeList responses = multistatus.elementsByTagName( "response" ); + TQDomNodeList responses = multistatus.elementsByTagName( "response" ); for (uint i = 0; i < responses.count(); i++) { int errCode; - QString errUrl; + TQString errUrl; - QDomElement response = responses.item(i).toElement(); - QDomElement code = response.namedItem( "status" ).toElement(); + TQDomElement response = responses.item(i).toElement(); + TQDomElement code = response.namedItem( "status" ).toElement(); if ( !code.isNull() ) { errCode = codeFromResponse( code.text() ); - QDomElement href = response.namedItem( "href" ).toElement(); + TQDomElement href = response.namedItem( "href" ).toElement(); if ( !href.isNull() ) errUrl = href.text(); errors << davError( errCode, errUrl ); @@ -1648,7 +1648,7 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url ) errorString = i18n("An error occurred while attempting to %1, %2. A " "summary of the reasons is below.<ul>").arg( action ).arg( url ); - for ( QStringList::Iterator it = errors.begin(); it != errors.end(); ++it ) + for ( TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it ) errorString += "<li>" + *it + "</li>"; errorString += "</ul>"; @@ -1735,7 +1735,7 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url ) void HTTPProtocol::httpError() { - QString action, errorString; + TQString action, errorString; KIO::Error kError; switch ( m_request.method ) { @@ -1799,18 +1799,18 @@ bool HTTPProtocol::isOffline(const KURL &url) { const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << url.url(); - if ( dcopClient()->call( "kded", "networkstatus", "status(QString)", + if ( dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; kdDebug(7113) << "(" << m_pid << ") networkstatus status = " << result << endl; return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); @@ -1819,9 +1819,9 @@ bool HTTPProtocol::isOffline(const KURL &url) return false; // On error, assume we are online } -void HTTPProtocol::multiGet(const QByteArray &data) +void HTTPProtocol::multiGet(const TQByteArray &data) { - QDataStream stream(data, IO_ReadOnly); + TQDataStream stream(data, IO_ReadOnly); Q_UINT32 n; stream >> n; @@ -1845,7 +1845,7 @@ void HTTPProtocol::multiGet(const QByteArray &data) m_request.method = HTTP_GET; m_request.path = url.path(); m_request.query = url.query(); - QString tmp = metaData("cache"); + TQString tmp = metaData("cache"); if (!tmp.isEmpty()) m_request.cache = parseCacheControl(tmp); else @@ -2043,7 +2043,7 @@ void HTTPProtocol::httpCheckConnection() bool HTTPProtocol::httpOpenConnection() { int errCode; - QString errMsg; + TQString errMsg; kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::httpOpenConnection" << endl; @@ -2053,7 +2053,7 @@ bool HTTPProtocol::httpOpenConnection() if ( m_state.doProxy ) { - QString proxy_host = m_proxyURL.host(); + TQString proxy_host = m_proxyURL.host(); int proxy_port = m_proxyURL.port(); kdDebug(7113) << "(" << m_pid << ") Connecting to proxy server: " @@ -2222,8 +2222,8 @@ bool HTTPProtocol::httpOpen() } } - QString header; - QString davHeader; + TQString header; + TQString davHeader; bool moreData = false; bool davData = false; @@ -2239,7 +2239,7 @@ bool HTTPProtocol::httpOpen() setEnableSSLTunnel( true ); // We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't // need any HTTP 1.1 capabilities for CONNECT - Waba - header = QString("CONNECT %1:%2 HTTP/1.0" + header = TQString("CONNECT %1:%2 HTTP/1.0" "\r\n").arg( m_request.encoded_hostname).arg(m_request.port); // Identify who you are to the proxy server! @@ -2250,7 +2250,7 @@ bool HTTPProtocol::httpOpen() header += "Host: " + m_state.encoded_hostname; if (m_state.port != m_iDefaultPort) - header += QString(":%1").arg(m_state.port); + header += TQString(":%1").arg(m_state.port); header += "\r\n"; header += proxyAuthenticationHeader(); @@ -2298,7 +2298,7 @@ bool HTTPProtocol::httpOpen() if ( m_request.davData.depth == 2 ) davHeader += "infinity"; else - davHeader += QString("%1").arg( m_request.davData.depth ); + davHeader += TQString("%1").arg( m_request.davData.depth ); } davHeader += "\r\n"; m_request.bCachedWrite = false; // Do not put any result in the cache @@ -2333,7 +2333,7 @@ bool HTTPProtocol::httpOpen() if ( timeout == 0 ) davHeader += "Infinite"; else - davHeader += QString("Seconds-%1").arg(timeout); + davHeader += TQString("Seconds-%1").arg(timeout); } davHeader += "\r\n"; m_request.bCachedWrite = false; // Do not put any result in the cache @@ -2362,7 +2362,7 @@ bool HTTPProtocol::httpOpen() m_request.bCachedWrite = false; break; default: - error (ERR_UNSUPPORTED_ACTION, QString::null); + error (ERR_UNSUPPORTED_ACTION, TQString::null); return false; } // DAV_POLL; DAV_NOTIFY @@ -2416,7 +2416,7 @@ bool HTTPProtocol::httpOpen() if ( m_request.offset > 0 ) { - header += QString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset)); + header += TQString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset)); kdDebug(7103) << "kio_http : Range = " << KIO::number(m_request.offset) << endl; } @@ -2437,7 +2437,7 @@ bool HTTPProtocol::httpOpen() } header += "Accept: "; - QString acceptHeader = metaData("accept"); + TQString acceptHeader = metaData("accept"); if (!acceptHeader.isEmpty()) header += acceptHeader; else @@ -2460,11 +2460,11 @@ bool HTTPProtocol::httpOpen() header += "Host: " + m_state.encoded_hostname; if (m_state.port != m_iDefaultPort) - header += QString(":%1").arg(m_state.port); + header += TQString(":%1").arg(m_state.port); header += "\r\n"; - QString cookieStr; - QString cookieMode = metaData("cookies").lower(); + TQString cookieStr; + TQString cookieMode = metaData("cookies").lower(); if (cookieMode == "none") { m_request.cookieMode = HTTPRequest::CookiesNone; @@ -2484,7 +2484,7 @@ bool HTTPProtocol::httpOpen() if (!cookieStr.isEmpty()) header += cookieStr + "\r\n"; - QString customHeader = metaData( "customHTTPHeader" ); + TQString customHeader = metaData( "customHTTPHeader" ); if (!customHeader.isEmpty()) { header += sanitizeCustomHTTPHeader(customHeader); @@ -2574,7 +2574,7 @@ bool HTTPProtocol::httpOpen() header += davProcessLocks(); // add extra webdav headers, if supplied - QString davExtraHeader = metaData("davHeader"); + TQString davExtraHeader = metaData("davHeader"); if ( !davExtraHeader.isEmpty() ) davHeader += davExtraHeader; @@ -2590,8 +2590,8 @@ bool HTTPProtocol::httpOpen() kdDebug(7103) << "(" << m_pid << ") ============ Sending Header:" << endl; - QStringList headerOutput = QStringList::split("\r\n", header); - QStringList::Iterator it = headerOutput.begin(); + TQStringList headerOutput = TQStringList::split("\r\n", header); + TQStringList::Iterator it = headerOutput.begin(); for (; it != headerOutput.end(); it++) kdDebug(7103) << "(" << m_pid << ") " << (*it) << endl; @@ -2679,7 +2679,7 @@ try_again: return false; } - m_strMimeType = QString::fromUtf8( buffer).stripWhiteSpace(); + m_strMimeType = TQString::fromUtf8( buffer).stripWhiteSpace(); kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readHeader: cached " << "data mimetype: " << m_strMimeType << endl; @@ -2693,11 +2693,11 @@ try_again: return false; } - m_request.strCharset = QString::fromUtf8( buffer).stripWhiteSpace().lower(); + m_request.strCharset = TQString::fromUtf8( buffer).stripWhiteSpace().lower(); setMetaData("charset", m_request.strCharset); if (!m_request.lastModified.isEmpty()) setMetaData("modified", m_request.lastModified); - QString tmp; + TQString tmp; tmp.setNum(m_request.expireDate); setMetaData("expire-date", tmp); tmp.setNum(m_request.creationDate); @@ -2707,16 +2707,16 @@ try_again: return true; } - QCString locationStr; // In case we get a redirect. - QCString cookieStr; // In case we get a cookie. + TQCString locationStr; // In case we get a redirect. + TQCString cookieStr; // In case we get a cookie. - QString dispositionType; // In case we get a Content-Disposition type - QString dispositionFilename; // In case we get a Content-Disposition filename + TQString dispositionType; // In case we get a Content-Disposition type + TQString dispositionFilename; // In case we get a Content-Disposition filename - QString mediaValue; - QString mediaAttribute; + TQString mediaValue; + TQString mediaAttribute; - QStringList upgradeOffers; + TQStringList upgradeOffers; bool upgradeRequired = false; // Server demands that we upgrade to something // This is also true if we ask to upgrade and @@ -2725,9 +2725,9 @@ try_again: bool canUpgrade = false; // The server offered an upgrade - m_request.etag = QString::null; - m_request.lastModified = QString::null; - m_request.strCharset = QString::null; + m_request.etag = TQString::null; + m_request.lastModified = TQString::null; + m_request.strCharset = TQString::null; time_t dateHeader = 0; time_t expireDate = 0; // 0 = no info, 1 = already expired, > 1 = actual date @@ -2779,7 +2779,7 @@ try_again: // by assuming that they will be sending html. kdDebug(7113) << "(" << m_pid << ") HTTPPreadHeader: HEAD -> returned " << "mimetype: " << DEFAULT_MIME_TYPE << endl; - mimeType(QString::fromLatin1(DEFAULT_MIME_TYPE)); + mimeType(TQString::fromLatin1(DEFAULT_MIME_TYPE)); return true; } @@ -2840,7 +2840,7 @@ try_again: // Store the the headers so they can be passed to the // calling application later - m_responseHeader << QString::fromLatin1(buf); + m_responseHeader << TQString::fromLatin1(buf); if ((strncasecmp(buf, "HTTP", 4) == 0) || (strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support @@ -3022,13 +3022,13 @@ try_again: } // Keep Alive else if (strncasecmp(buf, "Keep-Alive:", 11) == 0) { - QStringList options = QStringList::split(',', - QString::fromLatin1(trimLead(buf+11))); - for(QStringList::ConstIterator it = options.begin(); + TQStringList options = TQStringList::split(',', + TQString::fromLatin1(trimLead(buf+11))); + for(TQStringList::ConstIterator it = options.begin(); it != options.end(); it++) { - QString option = (*it).stripWhiteSpace().lower(); + TQString option = (*it).stripWhiteSpace().lower(); if (option.startsWith("timeout=")) { m_keepAliveTimeout = option.mid(8).toInt(); @@ -3038,13 +3038,13 @@ try_again: // Cache control else if (strncasecmp(buf, "Cache-Control:", 14) == 0) { - QStringList cacheControls = QStringList::split(',', - QString::fromLatin1(trimLead(buf+14))); - for(QStringList::ConstIterator it = cacheControls.begin(); + TQStringList cacheControls = TQStringList::split(',', + TQString::fromLatin1(trimLead(buf+14))); + for(TQStringList::ConstIterator it = cacheControls.begin(); it != cacheControls.end(); it++) { - QString cacheControl = (*it).stripWhiteSpace(); + TQString cacheControl = (*it).stripWhiteSpace(); if (strncasecmp(cacheControl.latin1(), "no-cache", 8) == 0) { m_request.bCachedWrite = false; // Don't put in cache @@ -3057,7 +3057,7 @@ try_again: } else if (strncasecmp(cacheControl.latin1(), "max-age=", 8) == 0) { - QString age = cacheControl.mid(8).stripWhiteSpace(); + TQString age = cacheControl.mid(8).stripWhiteSpace(); if (!age.isNull()) maxAge = STRTOLL(age.latin1(), 0, 10); } @@ -3074,7 +3074,7 @@ try_again: else if (strncasecmp(buf, "Content-location:", 17) == 0) { setMetaData ("content-location", - QString::fromLatin1(trimLead(buf+17)).stripWhiteSpace()); + TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace()); } // what type of data do we have? @@ -3086,7 +3086,7 @@ try_again: while ( *pos && *pos != ';' ) pos++; // Assign the mime-type. - m_strMimeType = QString::fromLatin1(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 @@ -3101,8 +3101,8 @@ try_again: if (*pos) { - mediaAttribute = QString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); - mediaValue = QString::fromLatin1(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] == '"') && @@ -3146,7 +3146,7 @@ try_again: // Cache management else if (strncasecmp(buf, "Last-Modified:", 14) == 0) { - m_request.lastModified = (QString::fromLatin1(trimLead(buf+14))).stripWhiteSpace(); + m_request.lastModified = (TQString::fromLatin1(trimLead(buf+14))).stripWhiteSpace(); } // whoops.. we received a warning @@ -3158,7 +3158,7 @@ try_again: // Cache management (HTTP 1.0) else if (strncasecmp(buf, "Pragma:", 7) == 0) { - QCString pragma = QCString(trimLead(buf+7)).stripWhiteSpace().lower(); + TQCString pragma = TQCString(trimLead(buf+7)).stripWhiteSpace().lower(); if (pragma == "no-cache") { m_request.bCachedWrite = false; // Don't put in cache @@ -3170,14 +3170,14 @@ 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", QString::fromLatin1(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 else if (strncasecmp(buf, "Location:", 9) == 0) { // Redirect only for 3xx status code, will ya! Thanks, pal! if ( m_responseCode > 299 && m_responseCode < 400 ) - locationStr = QCString(trimLead(buf+9)).stripWhiteSpace(); + locationStr = TQCString(trimLead(buf+9)).stripWhiteSpace(); } // Check for cookies @@ -3198,8 +3198,8 @@ try_again: else if (strncasecmp(buf, "Upgrade:", 8) == 0) { // Now we have to check to see what is offered for the upgrade - QString offered = &(buf[8]); - upgradeOffers = QStringList::split(QRegExp("[ \n,\r\t]"), offered); + TQString offered = &(buf[8]); + upgradeOffers = TQStringList::split(TQRegExp("[ \n,\r\t]"), offered); } // content? @@ -3247,7 +3247,7 @@ try_again: dispositionBuf--; if ( dispositionBuf > bufStart ) - dispositionFilename = QString::fromLatin1( bufStart, dispositionBuf-bufStart ); + dispositionFilename = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ); break; } @@ -3260,7 +3260,7 @@ try_again: dispositionBuf++; if ( dispositionBuf > bufStart ) - dispositionType = QString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); + dispositionType = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); while ( *dispositionBuf == ';' || *dispositionBuf == ' ' ) dispositionBuf++; @@ -3281,7 +3281,7 @@ try_again: } } else if(strncasecmp(buf, "Content-Language:", 17) == 0) { - QString language = QString::fromLatin1(trimLead(buf+17)).stripWhiteSpace(); + TQString language = TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace(); if (!language.isEmpty()) setMetaData("content-language", language); } @@ -3294,43 +3294,43 @@ try_again: } else if (strncasecmp(buf, "Link:", 5) == 0) { // We only support Link: <url>; rel="type" so far - QStringList link = QStringList::split(";", QString(buf) - .replace(QRegExp("^Link:[ ]*"), + TQStringList link = TQStringList::split(";", TQString(buf) + .replace(TQRegExp("^Link:[ ]*"), "")); if (link.count() == 2) { - QString rel = link[1].stripWhiteSpace(); + TQString rel = link[1].stripWhiteSpace(); if (rel.startsWith("rel=\"")) { rel = rel.mid(5, rel.length() - 6); if (rel.lower() == "pageservices") { - QString url = link[0].replace(QRegExp("[<>]"),"").stripWhiteSpace(); + TQString url = link[0].replace(TQRegExp("[<>]"),"").stripWhiteSpace(); setMetaData("PageServices", url); } } } } else if (strncasecmp(buf, "P3P:", 4) == 0) { - QString p3pstr = buf; + TQString p3pstr = buf; p3pstr = p3pstr.mid(4).simplifyWhiteSpace(); - QStringList policyrefs, compact; - QStringList policyfields = QStringList::split(QRegExp(",[ ]*"), p3pstr); - for (QStringList::Iterator it = policyfields.begin(); + TQStringList policyrefs, compact; + TQStringList policyfields = TQStringList::split(TQRegExp(",[ ]*"), p3pstr); + for (TQStringList::Iterator it = policyfields.begin(); it != policyfields.end(); ++it) { - QStringList policy = QStringList::split("=", *it); + TQStringList policy = TQStringList::split("=", *it); if (policy.count() == 2) { if (policy[0].lower() == "policyref") { - policyrefs << policy[1].replace(QRegExp("[\"\']"), "") + 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. - QStringList cps = QStringList::split(" ", - policy[1].replace(QRegExp("[\"\']"), "") + TQStringList cps = TQStringList::split(" ", + policy[1].replace(TQRegExp("[\"\']"), "") .simplifyWhiteSpace()); - for (QStringList::Iterator j = cps.begin(); j != cps.end(); ++j) + for (TQStringList::Iterator j = cps.begin(); j != cps.end(); ++j) compact << *j; } } @@ -3374,17 +3374,17 @@ try_again: // md5 signature else if (strncasecmp(buf, "Content-MD5:", 12) == 0) { - m_sContentMD5 = QString::fromLatin1(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 << QString::fromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); } else { - m_davCapabilities << QString::fromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); } } // *** Responses to the HTTP OPTIONS method finished @@ -3410,7 +3410,7 @@ try_again: } while (!m_bEOF && (len || noHeader) && (headerSize < maxHeaderSize) && (gets(buffer, sizeof(buffer)-1))); // Now process the HTTP/1.1 upgrade - QStringList::Iterator opt = upgradeOffers.begin(); + TQStringList::Iterator opt = upgradeOffers.begin(); for( ; opt != upgradeOffers.end(); ++opt) { if (*opt == "TLS/1.0") { if(upgradeRequired) { @@ -3488,7 +3488,7 @@ try_again: if ((m_request.cookieMode == HTTPRequest::CookiesAuto) && m_request.bUseCookiejar) { // Give cookies to the cookiejar. - QString domain = config()->readEntry("cross-domain"); + TQString domain = config()->readEntry("cross-domain"); if (!domain.isEmpty() && isCrossDomainRequest(m_request.url.host(), domain)) cookieStr = "Cross-Domain\n" + cookieStr; addCookies( m_request.url.url(), cookieStr ); @@ -3660,14 +3660,14 @@ try_again: if (m_strMimeType == "application/x-tar") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = QString::fromLatin1("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 = QString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } else if ( m_request.allowCompressedPage && m_strMimeType != "application/x-tgz" && @@ -3676,7 +3676,7 @@ try_again: m_request.url.path().right(6) == ".ps.gz" ) { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = QString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } else if ( (m_request.allowCompressedPage && m_strMimeType == "text/html") @@ -3693,7 +3693,7 @@ try_again: else { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = QString::fromLatin1("application/x-gzip"); + m_strMimeType = TQString::fromLatin1("application/x-gzip"); } } @@ -3706,34 +3706,34 @@ try_again: if (m_qContentEncodings.last() == "bzip2") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = QString::fromLatin1("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 = QString::fromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); else if (m_strMimeType == "application/zip") - m_strMimeType = QString::fromLatin1("application/x-zip"); + m_strMimeType = TQString::fromLatin1("application/x-zip"); else if (m_strMimeType == "image/x-png") - m_strMimeType = QString::fromLatin1("image/png"); + m_strMimeType = TQString::fromLatin1("image/png"); else if (m_strMimeType == "image/bmp") - m_strMimeType = QString::fromLatin1("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 = QString::fromLatin1("audio/x-mp3"); + m_strMimeType = TQString::fromLatin1("audio/x-mp3"); else if (m_strMimeType == "audio/microsoft-wave") - m_strMimeType = QString::fromLatin1("audio/x-wav"); + m_strMimeType = TQString::fromLatin1("audio/x-wav"); else if (m_strMimeType == "audio/midi") - m_strMimeType = QString::fromLatin1("audio/x-midi"); + m_strMimeType = TQString::fromLatin1("audio/x-midi"); else if (m_strMimeType == "image/x-xpixmap") - m_strMimeType = QString::fromLatin1("image/x-xpm"); + m_strMimeType = TQString::fromLatin1("image/x-xpm"); else if (m_strMimeType == "application/rtf") - m_strMimeType = QString::fromLatin1("text/rtf"); + m_strMimeType = TQString::fromLatin1("text/rtf"); // Crypto ones.... else if (m_strMimeType == "application/pkix-cert" || m_strMimeType == "application/binary-certificate") { - m_strMimeType = QString::fromLatin1("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. @@ -3741,25 +3741,25 @@ try_again: { if ((m_request.url.path().right(7) == ".tar.gz") || (m_request.url.path().right(4) == ".tar")) - m_strMimeType = QString::fromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); if ((m_request.url.path().right(6) == ".ps.gz")) - m_strMimeType = QString::fromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } // Some webservers say "text/plain" when they mean "application/x-bzip2" else if ((m_strMimeType == "text/plain") || (m_strMimeType == "application/octet-stream")) { - QString ext = m_request.url.path().right(4).upper(); + TQString ext = m_request.url.path().right(4).upper(); if (ext == ".BZ2") - m_strMimeType = QString::fromLatin1("application/x-bzip2"); + m_strMimeType = TQString::fromLatin1("application/x-bzip2"); else if (ext == ".PEM") - m_strMimeType = QString::fromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); else if (ext == ".SWF") - m_strMimeType = QString::fromLatin1("application/x-shockwave-flash"); + m_strMimeType = TQString::fromLatin1("application/x-shockwave-flash"); else if (ext == ".PLS") - m_strMimeType = QString::fromLatin1("audio/x-scpls"); + m_strMimeType = TQString::fromLatin1("audio/x-scpls"); else if (ext == ".WMV") - m_strMimeType = QString::fromLatin1("video/x-ms-wmv"); + m_strMimeType = TQString::fromLatin1("video/x-ms-wmv"); } #if 0 @@ -3798,7 +3798,7 @@ try_again: } else { - QString tmp; + TQString tmp; tmp.setNum(expireDate); setMetaData("expire-date", tmp); tmp.setNum(time(0)); // Cache entry will be created shortly. @@ -3824,7 +3824,7 @@ try_again: // Do we want to cache this request? if (m_request.bUseCache) { - ::unlink( QFile::encodeName(m_request.cef)); + ::unlink( TQFile::encodeName(m_request.cef)); if ( m_request.bCachedWrite && !m_strMimeType.isEmpty() ) { // Check... @@ -3849,7 +3849,7 @@ try_again: } -void HTTPProtocol::addEncoding(QString encoding, QStringList &encs) +void HTTPProtocol::addEncoding(TQString encoding, TQStringList &encs) { encoding = encoding.stripWhiteSpace().lower(); // Identity is the same as no encoding @@ -3864,11 +3864,11 @@ void HTTPProtocol::addEncoding(QString encoding, QStringList &encs) //if ( m_cmd != CMD_COPY ) m_iSize = NO_SIZE; } else if ((encoding == "x-gzip") || (encoding == "gzip")) { - encs.append(QString::fromLatin1("gzip")); + encs.append(TQString::fromLatin1("gzip")); } else if ((encoding == "x-bzip2") || (encoding == "bzip2")) { - encs.append(QString::fromLatin1("bzip2")); // Not yet supported! + encs.append(TQString::fromLatin1("bzip2")); // Not yet supported! } else if ((encoding == "x-deflate") || (encoding == "deflate")) { - encs.append(QString::fromLatin1("deflate")); + encs.append(TQString::fromLatin1("deflate")); } else { kdDebug(7113) << "(" << m_pid << ") Unknown encoding encountered. " << "Please write code. Encoding = \"" << encoding @@ -3897,7 +3897,7 @@ bool HTTPProtocol::sendBody() { kdDebug(7113) << "(" << m_pid << ") POST'ing live data..." << endl; - QByteArray buffer; + TQByteArray buffer; int old_size; m_bufPOST.resize(0); @@ -3924,7 +3924,7 @@ bool HTTPProtocol::sendBody() infoMessage( i18n( "Sending data to %1" ).arg( m_request.hostname ) ); - QString size = QString ("Content-Length: %1\r\n\r\n").arg(length); + TQString size = TQString ("Content-Length: %1\r\n\r\n").arg(length); kdDebug( 7113 ) << "(" << m_pid << ")" << size << endl; // Send the content length... @@ -3938,7 +3938,7 @@ bool HTTPProtocol::sendBody() } // Send the data... - // kdDebug( 7113 ) << "(" << m_pid << ") POST DATA: " << QCString(m_bufPOST) << endl; + // kdDebug( 7113 ) << "(" << m_pid << ") POST DATA: " << TQCString(m_bufPOST) << endl; sendOk = (write(m_bufPOST.data(), m_bufPOST.size()) == (ssize_t) m_bufPOST.size()); if (!sendOk) { @@ -3961,8 +3961,8 @@ void HTTPProtocol::httpClose( bool keepAlive ) m_request.fcache = 0; if (m_request.bCachedWrite) { - QString filename = m_request.cef + ".new"; - ::unlink( QFile::encodeName(filename) ); + TQString filename = m_request.cef + ".new"; + ::unlink( TQFile::encodeName(filename) ); } } @@ -3979,8 +3979,8 @@ void HTTPProtocol::httpClose( bool keepAlive ) m_keepAliveTimeout = 2*DEFAULT_KEEP_ALIVE_TIMEOUT; kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::httpClose: keep alive (" << m_keepAliveTimeout << ")" << endl; - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); stream << int(99); // special: Close connection setTimeoutSpecialCommand(m_keepAliveTimeout, data); return; @@ -4034,12 +4034,12 @@ void HTTPProtocol::mimetype( const KURL& url ) << endl; } -void HTTPProtocol::special( const QByteArray &data ) +void HTTPProtocol::special( const TQByteArray &data ) { kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::special" << endl; int tmp; - QDataStream stream(data, IO_ReadOnly); + TQDataStream stream(data, IO_ReadOnly); stream >> tmp; switch (tmp) { @@ -4062,7 +4062,7 @@ void HTTPProtocol::special( const QByteArray &data ) case 5: // WebDAV lock { KURL url; - QString scope, type, owner; + TQString scope, type, owner; stream >> url >> scope >> type >> owner; davLock( url, scope, type, owner ); break; @@ -4212,7 +4212,7 @@ int HTTPProtocol::readUnlimited() return 0; } -void HTTPProtocol::slotData(const QByteArray &_d) +void HTTPProtocol::slotData(const TQByteArray &_d) { if (!_d.size()) { @@ -4228,7 +4228,7 @@ void HTTPProtocol::slotData(const QByteArray &_d) m_iContentLeft = NO_SIZE; } - QByteArray d = _d; + TQByteArray d = _d; if ( !m_dataInternal ) { // If a broken server does not send the mime-type, @@ -4263,7 +4263,7 @@ void HTTPProtocol::slotData(const QByteArray &_d) if ( m_strMimeType.isEmpty() ) { - m_strMimeType = QString::fromLatin1( DEFAULT_MIME_TYPE ); + m_strMimeType = TQString::fromLatin1( DEFAULT_MIME_TYPE ); kdDebug(7113) << "(" << m_pid << ") Using default mimetype: " << m_strMimeType << endl; } @@ -4277,7 +4277,7 @@ void HTTPProtocol::slotData(const QByteArray &_d) if ( m_cpMimeBuffer ) { - // Do not make any assumption about the state of the QByteArray we received. + // Do not make any assumption about the state of the TQByteArray we received. // Fix the crash described by BR# 130104. d.detach(); d.resize(0); @@ -4380,7 +4380,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) if ( !dataInternal ) { processedSize( sz ); - data( QByteArray() ); + data( TQByteArray() ); } return true; @@ -4408,15 +4408,15 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) HTTPFilterChain chain; - QObject::connect(&chain, SIGNAL(output(const QByteArray &)), - this, SLOT(slotData(const QByteArray &))); - QObject::connect(&chain, SIGNAL(error(int, const QString &)), - this, SLOT(error(int, const QString &))); + TQObject::connect(&chain, TQT_SIGNAL(output(const TQByteArray &)), + this, TQT_SLOT(slotData(const TQByteArray &))); + TQObject::connect(&chain, TQT_SIGNAL(error(int, const TQString &)), + this, TQT_SLOT(error(int, const TQString &))); // decode all of the transfer encodings while (!m_qTransferEncodings.isEmpty()) { - QString enc = m_qTransferEncodings.last(); + TQString enc = m_qTransferEncodings.last(); m_qTransferEncodings.remove(m_qTransferEncodings.fromLast()); if ( enc == "gzip" ) chain.addFilter(new HTTPFilterGZip); @@ -4447,7 +4447,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) // WB: They shouldn't do that. We can work around that though... while (!m_qContentEncodings.isEmpty()) { - QString enc = m_qContentEncodings.last(); + TQString enc = m_qContentEncodings.last(); m_qContentEncodings.remove(m_qContentEncodings.fromLast()); if ( enc == "gzip" ) chain.addFilter(new HTTPFilterGZip); @@ -4518,11 +4518,11 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) break; } } - chain.slotInput(QByteArray()); // Flush chain. + chain.slotInput(TQByteArray()); // Flush chain. if ( useMD5 ) { - QString calculatedMD5 = md5Filter->md5(); + TQString calculatedMD5 = md5Filter->md5(); if ( m_sContentMD5 == calculatedMD5 ) kdDebug(7113) << "(" << m_pid << ") MD5 checksum MATCHED!!" << endl; @@ -4556,13 +4556,13 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) } if (!dataInternal) - data( QByteArray() ); + data( TQByteArray() ); return true; } -void HTTPProtocol::error( int _err, const QString &_text ) +void HTTPProtocol::error( int _err, const TQString &_text ) { httpClose(false); @@ -4585,50 +4585,50 @@ void HTTPProtocol::error( int _err, const QString &_text ) } -void HTTPProtocol::addCookies( const QString &url, const QCString &cookieHeader ) +void HTTPProtocol::addCookies( const TQString &url, const TQCString &cookieHeader ) { long windowId = m_request.window.toLong(); - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << url << cookieHeader << windowId; kdDebug(7113) << "(" << m_pid << ") " << cookieHeader << endl; kdDebug(7113) << "(" << m_pid << ") " << "Window ID: " << windowId << ", for host = " << url << endl; - if ( !dcopClient()->send( "kded", "kcookiejar", "addCookies(QString,QCString,long int)", params ) ) + if ( !dcopClient()->send( "kded", "kcookiejar", "addCookies(TQString,TQCString,long int)", params ) ) { kdWarning(7113) << "(" << m_pid << ") Can't communicate with kded_kcookiejar!" << endl; } } -QString HTTPProtocol::findCookies( const QString &url) +TQString HTTPProtocol::findCookies( const TQString &url) { - QCString replyType; - QByteArray params; - QByteArray reply; - QString result; + TQCString replyType; + TQByteArray params; + TQByteArray reply; + TQString result; long windowId = m_request.window.toLong(); - result = QString::null; - QDataStream stream(params, IO_WriteOnly); + result = TQString::null; + TQDataStream stream(params, IO_WriteOnly); stream << url << windowId; - if ( !dcopClient()->call( "kded", "kcookiejar", "findCookies(QString,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; return result; } - if ( replyType == "QString" ) + if ( replyType == "TQString" ) { - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; } else { kdError(7113) << "(" << m_pid << ") DCOP function findCookies(...) returns " - << replyType << ", expected QString" << endl; + << replyType << ", expected TQString" << endl; } return result; } @@ -4653,7 +4653,7 @@ void HTTPProtocol::cacheUpdate( const KURL& url, bool no_cache, time_t expireDat { fclose(m_request.fcache); m_request.fcache = 0; - ::unlink( QFile::encodeName(m_request.cef) ); + ::unlink( TQFile::encodeName(m_request.cef) ); } } else @@ -4669,9 +4669,9 @@ void HTTPProtocol::cacheUpdate( const KURL& url, bool no_cache, time_t expireDat FILE* HTTPProtocol::checkCacheEntry( bool readWrite) { - const QChar separator = '_'; + const TQChar separator = '_'; - QString CEF = m_request.path; + TQString CEF = m_request.path; int p = CEF.find('/'); @@ -4681,10 +4681,10 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) p = CEF.find('/', p); } - QString host = m_request.hostname.lower(); + TQString host = m_request.hostname.lower(); CEF = host + CEF + '_'; - QString dir = m_strCacheDir; + TQString dir = m_strCacheDir; if (dir[dir.length()-1] != '/') dir += "/"; @@ -4701,13 +4701,13 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) dir += "0"; unsigned long hash = 0x00000000; - QCString u = m_request.url.url().latin1(); + TQCString u = m_request.url.url().latin1(); for(int i = u.length(); i--;) { hash = (hash * 12211 + u[i]) % 2147483563; } - QString hashString; + TQString hashString; hashString.sprintf("%08lx", hash); CEF = CEF + hashString; @@ -4718,7 +4718,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) const char *mode = (readWrite ? "r+" : "r"); - FILE *fs = fopen( QFile::encodeName(CEF), mode); // Open for reading and writing + FILE *fs = fopen( TQFile::encodeName(CEF), mode); // Open for reading and writing if (!fs) return 0; @@ -4788,7 +4788,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) ok = false; if (ok) { - m_request.etag = QString(buffer).stripWhiteSpace(); + m_request.etag = TQString(buffer).stripWhiteSpace(); } // Last-Modified @@ -4796,14 +4796,14 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) ok = false; if (ok) { - m_request.lastModified = QString(buffer).stripWhiteSpace(); + m_request.lastModified = TQString(buffer).stripWhiteSpace(); } if (ok) return fs; fclose(fs); - unlink( QFile::encodeName(CEF)); + unlink( TQFile::encodeName(CEF)); return 0; } @@ -4814,7 +4814,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate) FILE *fs = checkCacheEntry(true); if (fs) { - QString date; + TQString date; char buffer[401]; time_t creationDate; @@ -4834,7 +4834,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate) { if (!ok || fseek(fs, cacheCreationDateOffset, SEEK_SET)) return; - QString date; + TQString date; date.setNum( time(0) ); date = date.leftJustify(16); fputs(date.latin1(), fs); // Creation date @@ -4865,21 +4865,21 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate) } } -void HTTPProtocol::createCacheEntry( const QString &mimetype, time_t expireDate) +void HTTPProtocol::createCacheEntry( const TQString &mimetype, time_t expireDate) { - QString dir = m_request.cef; + TQString dir = m_request.cef; int p = dir.findRev('/'); if (p == -1) return; // Error. dir.truncate(p); // Create file - (void) ::mkdir( QFile::encodeName(dir), 0700 ); + (void) ::mkdir( TQFile::encodeName(dir), 0700 ); - QString filename = m_request.cef + ".new"; // Create a new cache entryexpireDate + TQString filename = m_request.cef + ".new"; // Create a new cache entryexpireDate // kdDebug( 7103 ) << "creating new cache entry: " << filename << endl; - m_request.fcache = fopen( QFile::encodeName(filename), "w"); + m_request.fcache = fopen( TQFile::encodeName(filename), "w"); if (!m_request.fcache) { kdWarning(7113) << "(" << m_pid << ")createCacheEntry: opening " << filename << " failed." << endl; @@ -4891,7 +4891,7 @@ void HTTPProtocol::createCacheEntry( const QString &mimetype, time_t expireDate) fputs(m_request.url.url().latin1(), m_request.fcache); // Url fputc('\n', m_request.fcache); - QString date; + TQString date; m_request.creationDate = time(0); date.setNum( m_request.creationDate ); date = date.leftJustify(16); @@ -4931,8 +4931,8 @@ void HTTPProtocol::writeCacheEntry( const char *buffer, int nbytes) kdWarning(7113) << "(" << m_pid << ") writeCacheEntry: writing " << nbytes << " bytes failed." << endl; fclose(m_request.fcache); m_request.fcache = 0; - QString filename = m_request.cef + ".new"; - ::unlink( QFile::encodeName(filename) ); + TQString filename = m_request.cef + ".new"; + ::unlink( TQFile::encodeName(filename) ); return; } long file_pos = ftell( m_request.fcache ) / 1024; @@ -4942,20 +4942,20 @@ void HTTPProtocol::writeCacheEntry( const char *buffer, int nbytes) << "Kb, exceeds cache limits. (" << m_maxCacheSize << "Kb)" << endl; fclose(m_request.fcache); m_request.fcache = 0; - QString filename = m_request.cef + ".new"; - ::unlink( QFile::encodeName(filename) ); + TQString filename = m_request.cef + ".new"; + ::unlink( TQFile::encodeName(filename) ); return; } } void HTTPProtocol::closeCacheEntry() { - QString filename = m_request.cef + ".new"; + TQString filename = m_request.cef + ".new"; int result = fclose( m_request.fcache); m_request.fcache = 0; if (result == 0) { - if (::rename( QFile::encodeName(filename), QFile::encodeName(m_request.cef)) == 0) + if (::rename( TQFile::encodeName(filename), TQFile::encodeName(m_request.cef)) == 0) return; // Success kdWarning(7113) << "(" << m_pid << ") closeCacheEntry: error renaming " @@ -4971,17 +4971,17 @@ void HTTPProtocol::cleanCache() { const time_t maxAge = DEFAULT_CLEAN_CACHE_INTERVAL; // 30 Minutes. bool doClean = false; - QString cleanFile = m_strCacheDir; + TQString cleanFile = m_strCacheDir; if (cleanFile[cleanFile.length()-1] != '/') cleanFile += "/"; cleanFile += "cleaned"; struct stat stat_buf; - int result = ::stat(QFile::encodeName(cleanFile), &stat_buf); + int result = ::stat(TQFile::encodeName(cleanFile), &stat_buf); if (result == -1) { - int fd = creat( QFile::encodeName(cleanFile), 0600); + int fd = creat( TQFile::encodeName(cleanFile), 0600); if (fd != -1) { doClean = true; @@ -4997,7 +4997,7 @@ void HTTPProtocol::cleanCache() if (doClean) { // Touch file. - utime(QFile::encodeName(cleanFile), 0); + utime(TQFile::encodeName(cleanFile), 0); KApplication::startServiceByDesktopPath("http_cache_cleaner.desktop"); } } @@ -5106,19 +5106,19 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) if ( strncasecmp( p, "realm=", 6 ) == 0 ) { //for sites like lib.homelinux.org - QTextCodec* oldCodec=QTextCodec::codecForCStrings(); + TQTextCodec* oldCodec=TQTextCodec::codecForCStrings(); if (KGlobal::locale()->language().contains("ru")) - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("CP1251")); + TQTextCodec::setCodecForCStrings(TQTextCodec::codecForName("CP1251")); p += 6; if (*p == '"') p++; while( p[i] && p[i] != '"' ) i++; if( isForProxy ) - m_strProxyRealm = QString::fromAscii( p, i ); + m_strProxyRealm = TQString::fromAscii( p, i ); else - m_strRealm = QString::fromAscii( p, i ); + m_strRealm = TQString::fromAscii( p, i ); - QTextCodec::setCodecForCStrings(oldCodec); + TQTextCodec::setCodecForCStrings(oldCodec); if (!p[i]) break; } @@ -5128,19 +5128,19 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) if( isForProxy ) { ProxyAuthentication = f; - m_strProxyAuthorization = QString::fromLatin1( strAuth ); + m_strProxyAuthorization = TQString::fromLatin1( strAuth ); } else { Authentication = f; - m_strAuthorization = QString::fromLatin1( strAuth ); + m_strAuthorization = TQString::fromLatin1( strAuth ); } } bool HTTPProtocol::retryPrompt() { - QString prompt; + TQString prompt; switch ( m_responseCode ) { case 401: @@ -5217,7 +5217,7 @@ bool HTTPProtocol::getAuthorization() bool repeatFailure = (m_prevResponseCode == m_responseCode); - QString errorMsg; + TQString errorMsg; if (repeatFailure) { @@ -5225,7 +5225,7 @@ bool HTTPProtocol::getAuthorization() if ( Authentication == AUTH_Digest || ProxyAuthentication == AUTH_Digest ) { bool isStaleNonce = false; - QString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; + TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; int pos = auth.find("stale", 0, false); if ( pos != -1 ) { @@ -5262,7 +5262,7 @@ bool HTTPProtocol::getAuthorization() if ( Authentication == AUTH_NTLM || ProxyAuthentication == AUTH_NTLM ) { - QString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; + TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; kdDebug(7113) << "auth: " << auth << endl; if ( auth.length() > 4 ) { @@ -5344,7 +5344,7 @@ bool HTTPProtocol::getAuthorization() if ( Authentication == AUTH_Digest ) { - QString auth; + TQString auth; if (m_responseCode == 401) auth = m_strAuthorization; @@ -5417,7 +5417,7 @@ bool HTTPProtocol::getAuthorization() if (m_request.bErrorPage) errorPage(); else - error( ERR_USER_CANCELED, QString::null ); + error( ERR_USER_CANCELED, TQString::null ); return false; } @@ -5448,14 +5448,14 @@ void HTTPProtocol::saveAuthorization() } #ifdef HAVE_LIBGSSAPI -QCString HTTPProtocol::gssError( int major_status, int minor_status ) +TQCString HTTPProtocol::gssError( int major_status, int minor_status ) { OM_uint32 new_status; OM_uint32 msg_ctx = 0; gss_buffer_desc major_string; gss_buffer_desc minor_string; OM_uint32 ret; - QCString errorstr; + TQCString errorstr; errorstr = ""; @@ -5471,11 +5471,11 @@ QCString HTTPProtocol::gssError( int major_status, int minor_status ) return errorstr; } -QString HTTPProtocol::createNegotiateAuth() +TQString HTTPProtocol::createNegotiateAuth() { - QString auth; - QCString servicename; - QByteArray input; + TQString auth; + TQCString servicename; + TQByteArray input; OM_uint32 major_status, minor_status; OM_uint32 req_flags = 0; gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; @@ -5527,8 +5527,8 @@ QString HTTPProtocol::createNegotiateAuth() if (GSS_ERROR(major_status)) { kdDebug(7113) << "(" << m_pid << ") gss_import_name failed: " << gssError(major_status, minor_status) << endl; // reset the auth string so that subsequent methods aren't confused - m_strAuthorization = QString::null; - return QString::null; + m_strAuthorization = TQString::null; + return TQString::null; } major_status = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL, @@ -5547,8 +5547,8 @@ QString HTTPProtocol::createNegotiateAuth() ctx = GSS_C_NO_CONTEXT; } // reset the auth string so that subsequent methods aren't confused - m_strAuthorization = QString::null; - return QString::null; + m_strAuthorization = TQString::null; + return TQString::null; } input.duplicate((const char *)output_token.value, output_token.length); @@ -5569,24 +5569,24 @@ QString HTTPProtocol::createNegotiateAuth() #else // Dummy -QCString HTTPProtocol::gssError( int, int ) +TQCString HTTPProtocol::gssError( int, int ) { return ""; } // Dummy -QString HTTPProtocol::createNegotiateAuth() +TQString HTTPProtocol::createNegotiateAuth() { - return QString::null; + return TQString::null; } #endif -QString HTTPProtocol::createNTLMAuth( bool isForProxy ) +TQString HTTPProtocol::createNTLMAuth( bool isForProxy ) { uint len; - QString auth, user, domain, passwd; - QCString strauth; - QByteArray buf; + TQString auth, user, domain, passwd; + TQCString strauth; + TQByteArray buf; if ( isForProxy ) { @@ -5612,12 +5612,12 @@ QString HTTPProtocol::createNTLMAuth( bool isForProxy ) kdDebug(7113) << "(" << m_pid << ") NTLM length: " << len << endl; if ( user.isEmpty() || passwd.isEmpty() || len < 4 ) - return QString::null; + return TQString::null; if ( len > 4 ) { // create a response - QByteArray challenge; + TQByteArray challenge; KCodecs::base64Decode( strauth.right( len - 5 ), challenge ); KNTLM::getAuth( buf, challenge, user, passwd, domain, KNetwork::KResolver::localHostName(), false, false ); @@ -5639,10 +5639,10 @@ QString HTTPProtocol::createNTLMAuth( bool isForProxy ) return auth; } -QString HTTPProtocol::createBasicAuth( bool isForProxy ) +TQString HTTPProtocol::createBasicAuth( bool isForProxy ) { - QString auth; - QCString user, passwd; + TQString auth; + TQCString user, passwd; if ( isForProxy ) { auth = "Proxy-Authorization: Basic "; @@ -5669,14 +5669,14 @@ QString HTTPProtocol::createBasicAuth( bool isForProxy ) return auth; } -void HTTPProtocol::calculateResponse( DigestAuthInfo& info, QCString& Response ) +void HTTPProtocol::calculateResponse( DigestAuthInfo& info, TQCString& Response ) { KMD5 md; - QCString HA1; - QCString HA2; + TQCString HA1; + TQCString HA2; // Calculate H(A1) - QCString authStr = info.username; + TQCString authStr = info.username; authStr += ':'; authStr += info.realm; authStr += ':'; @@ -5736,13 +5736,13 @@ void HTTPProtocol::calculateResponse( DigestAuthInfo& info, QCString& Response ) << Response << endl; } -QString HTTPProtocol::createDigestAuth ( bool isForProxy ) +TQString HTTPProtocol::createDigestAuth ( bool isForProxy ) { const char *p; - QString auth; - QCString opaque; - QCString Response; + TQString auth; + TQCString opaque; + TQCString Response; DigestAuthInfo info; @@ -5762,12 +5762,12 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) p = m_strAuthorization.latin1(); } if (!p || !*p) - return QString::null; + return TQString::null; p += 6; // Skip "Digest" if ( info.username.isEmpty() || info.password.isEmpty() || !p ) - return QString::null; + return TQString::null; // info.entityBody = p; // FIXME: send digest of data for POST action ?? info.realm = ""; @@ -5847,21 +5847,21 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) p+=6; while ( *p == '"' ) p++; // Go past any number of " mark(s) first while ( p[i] != '"' ) i++; // Read everything until the last " mark - info.realm = QCString( p, i+1 ); + info.realm = TQCString( p, i+1 ); } else if (strncasecmp(p, "algorith=", 9)==0) { p+=9; while ( *p == '"' ) p++; // Go past any number of " mark(s) first while ( ( p[i] != '"' ) && ( p[i] != ',' ) && ( p[i] != '\0' ) ) i++; - info.algorithm = QCString(p, i+1); + info.algorithm = TQCString(p, i+1); } else if (strncasecmp(p, "algorithm=", 10)==0) { p+=10; while ( *p == '"' ) p++; // Go past any " mark(s) first while ( ( p[i] != '"' ) && ( p[i] != ',' ) && ( p[i] != '\0' ) ) i++; - info.algorithm = QCString(p,i+1); + info.algorithm = TQCString(p,i+1); } else if (strncasecmp(p, "domain=", 7)==0) { @@ -5870,7 +5870,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) while ( p[i] != '"' ) i++; // Read everything until the last " mark int pos; int idx = 0; - QCString uri = QCString(p,i+1); + TQCString uri = TQCString(p,i+1); do { pos = uri.find( ' ', idx ); @@ -5894,27 +5894,27 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) p+=6; while ( *p == '"' ) p++; // Go past any " mark(s) first while ( p[i] != '"' ) i++; // Read everything until the last " mark - info.nonce = QCString(p,i+1); + info.nonce = TQCString(p,i+1); } else if (strncasecmp(p, "opaque=", 7)==0) { p+=7; while ( *p == '"' ) p++; // Go past any " mark(s) first while ( p[i] != '"' ) i++; // Read everything until the last " mark - opaque = QCString(p,i+1); + opaque = TQCString(p,i+1); } else if (strncasecmp(p, "qop=", 4)==0) { p+=4; while ( *p == '"' ) p++; // Go past any " mark(s) first while ( p[i] != '"' ) i++; // Read everything until the last " mark - info.qop = QCString(p,i+1); + info.qop = TQCString(p,i+1); } p+=(i+1); } if (info.realm.isEmpty() || info.nonce.isEmpty()) - return QString::null; + return TQString::null; // If the "domain" attribute was not specified and the current response code // is authentication needed, add the current request url to the list over which @@ -5928,7 +5928,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) bool send = true; // Determine the path of the request url... - QString requestPath = m_request.url.directory(false, false); + TQString requestPath = m_request.url.directory(false, false); if (requestPath.isEmpty()) requestPath = "/"; @@ -5944,7 +5944,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) if (m_request.port > 0 && u.port() > 0) send &= (m_request.port == u.port()); - QString digestPath = u.directory (false, false); + TQString digestPath = u.directory (false, false); if (digestPath.isEmpty()) digestPath = "/"; @@ -5958,7 +5958,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) "authentication credential test: " << send << endl; if (!send) - return QString::null; + return TQString::null; } kdDebug(7113) << "(" << m_pid << ") RESULT OF PARSING:" << endl; @@ -6010,9 +6010,9 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy ) return auth; } -QString HTTPProtocol::proxyAuthenticationHeader() +TQString HTTPProtocol::proxyAuthenticationHeader() { - QString header; + TQString header; // We keep proxy authentication locally until they are changed. // Thus, no need to check with the password manager for every diff --git a/kioslave/http/http.h b/kioslave/http/http.h index ea2e68a8a..24f041cb4 100644 --- a/kioslave/http/http.h +++ b/kioslave/http/http.h @@ -30,9 +30,9 @@ #include <stdio.h> #include <time.h> -#include <qptrlist.h> -#include <qstrlist.h> -#include <qstringlist.h> +#include <tqptrlist.h> +#include <tqstrlist.h> +#include <tqstringlist.h> #include <kurl.h> #include "kio/tcpslavebase.h" @@ -46,12 +46,12 @@ namespace KIO { class AuthInfo; } -class HTTPProtocol : public QObject, public KIO::TCPSlaveBase +class HTTPProtocol : public TQObject, public KIO::TCPSlaveBase { Q_OBJECT public: - HTTPProtocol( const QCString &protocol, const QCString &pool, - const QCString &app ); + HTTPProtocol( const TQCString &protocol, const TQCString &pool, + const TQCString &app ); virtual ~HTTPProtocol(); /** HTTP version **/ @@ -75,11 +75,11 @@ public: doProxy = false; } - QString hostname; - QString encoded_hostname; + TQString hostname; + TQString encoded_hostname; short unsigned int port; - QString user; - QString passwd; + TQString user; + TQString passwd; bool doProxy; }; @@ -92,7 +92,7 @@ public: depth = 0; } - QString desturl; + TQString desturl; bool overwrite; int depth; }; @@ -121,44 +121,44 @@ public: creationDate = 0; } - QString hostname; - QString encoded_hostname; + TQString hostname; + TQString encoded_hostname; short unsigned int port; - QString user; - QString passwd; - QString path; - QString query; + TQString user; + TQString passwd; + TQString path; + TQString query; KIO::HTTP_METHOD method; KIO::CacheControl cache; KIO::filesize_t offset; bool doProxy; KURL url; - QString window; // Window Id this request is related to. - QString referrer; - QString charsets; - QString languages; + TQString window; // Window Id this request is related to. + TQString referrer; + TQString charsets; + TQString languages; bool allowCompressedPage; bool disablePassDlg; - QString userAgent; - QString id; + TQString userAgent; + TQString id; DAVRequest davData; bool bNoAuth; // Do not authenticate // Cache related - QString cef; // Cache Entry File belonging to this URL. + TQString cef; // Cache Entry File belonging to this URL. bool bUseCache; // Whether the cache is active bool bCachedRead; // Whether the file is to be read from m_fcache. bool bCachedWrite; // Whether the file is to be written to m_fcache. FILE* fcache; // File stream of a cache entry - QString etag; // ETag header. - QString lastModified; // Last modified. + TQString etag; // ETag header. + TQString lastModified; // Last modified. bool bMustRevalidate; // Cache entry is expired. long cacheExpireDateOffset; // Position in the cache entry where the // 16 byte expire date is stored. time_t expireDate; // Date when the cache entry will expire time_t creationDate; // Date when the cache entry was created - QString strCharset; // Charset + TQString strCharset; // Charset // Indicates whether an error-page or error-msg should is preferred. bool bErrorPage; @@ -170,22 +170,22 @@ public: struct DigestAuthInfo { - QCString nc; - QCString qop; - QCString realm; - QCString nonce; - QCString method; - QCString cnonce; - QCString username; - QCString password; - QStrList digestURI; - QCString algorithm; - QCString entityBody; + TQCString nc; + TQCString qop; + TQCString realm; + TQCString nonce; + TQCString method; + TQCString cnonce; + TQCString username; + TQCString password; + TQStrList digestURI; + TQCString algorithm; + TQCString entityBody; }; //---------------------- Re-implemented methods ---------------- - virtual void setHost(const QString& host, int port, const QString& user, - const QString& pass); + virtual void setHost(const TQString& host, int port, const TQString& user, + const TQString& pass); virtual void slave_status(); @@ -208,15 +208,15 @@ public: void davGeneric( const KURL& url, KIO::HTTP_METHOD method ); // Send requests to lock and unlock resources - void davLock( const KURL& url, const QString& scope, - const QString& type, const QString& owner ); + void davLock( const KURL& url, const TQString& scope, + const TQString& type, const TQString& owner ); void davUnlock( const KURL& url ); // Calls httpClose() and finished() void davFinished(); // Handle error conditions - QString davError( int code = -1, QString url = QString::null ); + TQString davError( int code = -1, TQString url = TQString::null ); //---------------------------- End WebDAV ----------------------- /** @@ -228,7 +228,7 @@ public: * 5 - DAV LOCK (see * 6 - DAV UNLOCK README.webdav) */ - virtual void special( const QByteArray &data ); + virtual void special( const TQByteArray &data ); virtual void mimetype( const KURL& url); @@ -239,7 +239,7 @@ public: virtual void closeConnection(); // Forced close of connection void post( const KURL& url ); - void multiGet(const QByteArray &data); + void multiGet(const TQByteArray &data); bool checkRequestURL( const KURL& ); void cacheUpdate( const KURL &url, bool nocache, time_t expireDate); @@ -248,8 +248,8 @@ public: bool isOffline(const KURL &url); // Check network status protected slots: - void slotData(const QByteArray &); - void error( int _errid, const QString &_text ); + void slotData(const TQByteArray &); + void error( int _errid, const TQString &_text ); protected: int readChunked(); // Read a chunk @@ -281,7 +281,7 @@ protected: * is nececesary because transfer encodings and * content encodings must be handled separately. */ - void addEncoding(QString, QStringList &); + void addEncoding(TQString, TQStringList &); void configAuth( char *, bool ); @@ -305,37 +305,37 @@ protected: /** * Performs a WebDAV stat or list */ - void davSetRequest( const QCString& requestXML ); + void davSetRequest( const TQCString& requestXML ); void davStatList( const KURL& url, bool stat = true ); - void davParsePropstats( const QDomNodeList& propstats, KIO::UDSEntry& entry ); - void davParseActiveLocks( const QDomNodeList& activeLocks, + void davParsePropstats( const TQDomNodeList& propstats, KIO::UDSEntry& entry ); + void davParseActiveLocks( const TQDomNodeList& activeLocks, uint& lockCount ); /** * Parses a date & time string */ - long parseDateTime( const QString& input, const QString& type ); + long parseDateTime( const TQString& input, const TQString& type ); /** * Returns the error code from a "HTTP/1.1 code Code Name" string */ - int codeFromResponse( const QString& response ); + int codeFromResponse( const TQString& response ); /** * Extracts locks from metadata * Returns the appropriate If: header */ - QString davProcessLocks(); + TQString davProcessLocks(); /** * Send a cookie to the cookiejar */ - void addCookies( const QString &url, const QCString &cookieHeader); + void addCookies( const TQString &url, const TQCString &cookieHeader); /** * Look for cookies in the cookiejar */ - QString findCookies( const QString &url); + TQString findCookies( const TQString &url); /** * Do a cache lookup for the current url. (m_state.url) @@ -355,7 +355,7 @@ protected: * * Set the contents type of the cache entry to 'mimetype'. */ - void createCacheEntry(const QString &mimetype, time_t expireDate); + void createCacheEntry(const TQString &mimetype, time_t expireDate); /** * Write data to cache. @@ -413,7 +413,7 @@ protected: * Returns any pre-cached proxy authentication info * info in HTTP header format. */ - QString proxyAuthenticationHeader(); + TQString proxyAuthenticationHeader(); /** * Retrieves authorization info from cache or user. @@ -428,32 +428,32 @@ protected: /** * Creates the entity-header for Basic authentication. */ - QString createBasicAuth( bool isForProxy = false ); + TQString createBasicAuth( bool isForProxy = false ); /** * Creates the entity-header for Digest authentication. */ - QString createDigestAuth( bool isForProxy = false ); + TQString createDigestAuth( bool isForProxy = false ); /** * Creates the entity-header for NTLM authentication. */ - QString createNTLMAuth( bool isForProxy = false ); + TQString createNTLMAuth( bool isForProxy = false ); /** * Creates the entity-header for Negotiate authentication. */ - QString createNegotiateAuth(); + TQString createNegotiateAuth(); /** * create GSS error string */ - QCString gssError( int major_status, int minor_status ); + TQCString gssError( int major_status, int minor_status ); /** * Calcualtes the message digest response based on RFC 2617. */ - void calculateResponse( DigestAuthInfo &info, QCString &Response ); + void calculateResponse( DigestAuthInfo &info, TQCString &Response ); /** * Prompts the user for authorization retry. @@ -468,14 +468,14 @@ protected: protected: HTTPState m_state; HTTPRequest m_request; - QPtrList<HTTPRequest> m_requestQueue; + TQPtrList<HTTPRequest> m_requestQueue; bool m_bBusy; // Busy handling request queue. bool m_bEOF; bool m_bEOD; //--- Settings related to a single response only - QStringList m_responseHeader; // All headers + TQStringList m_responseHeader; // All headers KURL m_redirectLocation; bool m_bRedirect; // Indicates current request is a redirection @@ -484,7 +484,7 @@ protected: KIO::filesize_t m_iSize; // Expected size of message KIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message. KIO::filesize_t m_iContentLeft; // # of content bytes left - QByteArray m_bufReceive; // Receive buffer + TQByteArray m_bufReceive; // Receive buffer bool m_dataInternal; // Data is for internal consumption char m_lineBuf[1024]; char m_rewindBuf[8192]; @@ -497,19 +497,19 @@ protected: // Mimetype determination bool m_cpMimeBuffer; - QByteArray m_mimeTypeBuffer; + TQByteArray m_mimeTypeBuffer; // Language/Encoding related - QStringList m_qTransferEncodings; - QStringList m_qContentEncodings; - QString m_sContentMD5; - QString m_strMimeType; + TQStringList m_qTransferEncodings; + TQStringList m_qContentEncodings; + TQString m_sContentMD5; + TQString m_strMimeType; //--- WebDAV // Data structure to hold data which will be passed to an internal func. - QByteArray m_bufWebDavData; - QStringList m_davCapabilities; + TQByteArray m_bufWebDavData; + TQStringList m_davCapabilities; bool m_davHostOk; bool m_davHostUnsupported; @@ -518,12 +518,12 @@ protected: // Holds the POST data so it won't get lost on if we // happend to get a 401/407 response when submitting, // a form. - QByteArray m_bufPOST; + TQByteArray m_bufPOST; // Cache related int m_maxCacheAge; // Maximum age of a cache entry. long m_maxCacheSize; // Maximum cache size in Kb. - QString m_strCacheDir; // Location of the cache. + TQString m_strCacheDir; // Location of the cache. @@ -534,15 +534,15 @@ protected: bool m_bProxyAuthValid; int m_iProxyPort; KURL m_proxyURL; - QString m_strProxyRealm; + TQString m_strProxyRealm; // Operation mode - QCString m_protocol; + TQCString m_protocol; // Authentication - QString m_strRealm; - QString m_strAuthorization; - QString m_strProxyAuthorization; + TQString m_strRealm; + TQString m_strAuthorization; + TQString m_strProxyAuthorization; HTTP_AUTH Authentication; HTTP_AUTH ProxyAuthentication; bool m_bUnauthorized; diff --git a/kioslave/http/http_cache_cleaner.cpp b/kioslave/http/http_cache_cleaner.cpp index f7406bcc1..74b0b8102 100644 --- a/kioslave/http/http_cache_cleaner.cpp +++ b/kioslave/http/http_cache_cleaner.cpp @@ -28,9 +28,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <time.h> #include <stdlib.h> -#include <qdir.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kinstance.h> #include <klocale.h> @@ -61,18 +61,18 @@ static const KCmdLineOptions options[] = }; struct FileInfo { - QString name; + TQString name; int size; // Size in Kb. int age; }; -template class QPtrList<FileInfo>; +template class TQPtrList<FileInfo>; -class FileInfoList : public QPtrList<FileInfo> +class FileInfoList : public TQPtrList<FileInfo> { public: - FileInfoList() : QPtrList<FileInfo>() { } - int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) + FileInfoList() : TQPtrList<FileInfo>() { } + int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { return ((FileInfo *)item1)->age - ((FileInfo *)item2)->age; } }; @@ -80,9 +80,9 @@ public: // Keep the following in sync with the cache code in http.cc #define CACHE_REVISION "7\n" -FileInfo *readEntry( const QString &filename) +FileInfo *readEntry( const TQString &filename) { - QCString CEF = QFile::encodeName(filename); + TQCString CEF = TQFile::encodeName(filename); FILE *fs = fopen( CEF.data(), "r"); if (!fs) return 0; @@ -161,16 +161,16 @@ FileInfo *readEntry( const QString &filename) // Keep the above in sync with the cache code in http.cc // !END OF SYNC! -void scanDirectory(FileInfoList &fileEntries, const QString &name, const QString &strDir) +void scanDirectory(FileInfoList &fileEntries, const TQString &name, const TQString &strDir) { - QDir dir(strDir); + TQDir dir(strDir); if (!dir.exists()) return; QFileInfoList *newEntries = (QFileInfoList *) dir.entryInfoList(); if (!newEntries) return; // Directory not accessible ?? - for(QFileInfo *qFileInfo = newEntries->first(); + for(TQFileInfo *qFileInfo = newEntries->first(); qFileInfo; qFileInfo = newEntries->next()) { @@ -205,7 +205,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) if (!deleteAll) { DCOPClient *dcop = new DCOPClient(); - QCString name = dcop->registerAs(appName, false); + TQCString name = dcop->registerAs(appName, false); if (!name.isEmpty() && (name != appName)) { fprintf(stderr, "%s: Already running! (%s)\n", appName, name.data()); @@ -220,20 +220,20 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) if (deleteAll) m_maxCacheSize = -1; - QString strCacheDir = KGlobal::dirs()->saveLocation("cache", "http"); + TQString strCacheDir = KGlobal::dirs()->saveLocation("cache", "http"); - QDir cacheDir( strCacheDir ); + TQDir cacheDir( strCacheDir ); if (!cacheDir.exists()) { fprintf(stderr, "%s: '%s' does not exist.\n", appName, strCacheDir.ascii()); return 0; } - QStringList dirs = cacheDir.entryList( ); + TQStringList dirs = cacheDir.entryList( ); FileInfoList cachedEntries; - for(QStringList::Iterator it = dirs.begin(); + for(TQStringList::Iterator it = dirs.begin(); it != dirs.end(); it++) { @@ -253,7 +253,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { if (fileInfo->size > maxCachedSize) { - QCString filename = QFile::encodeName( strCacheDir + "/" + fileInfo->name); + TQCString filename = TQFile::encodeName( strCacheDir + "/" + fileInfo->name); unlink(filename.data()); // kdDebug () << appName << ": Object too big, deleting '" << filename.data() << "' (" << result<< ")" << endl; } @@ -267,7 +267,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { if ((totalSize + fileInfo->size) > m_maxCacheSize) { - QCString filename = QFile::encodeName( strCacheDir + "/" + fileInfo->name); + TQCString filename = TQFile::encodeName( strCacheDir + "/" + fileInfo->name); unlink(filename.data()); // kdDebug () << appName << ": Cache too big, deleting '" << filename.data() << "' (" << fileInfo->size << ")" << endl; } diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index 5b5f78f6b..909f92dcb 100644 --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -55,13 +55,13 @@ //#include <netinet/in.h> //#include <arpa/inet.h> -#include <qstring.h> -#include <qstrlist.h> -#include <qptrlist.h> -#include <qptrdict.h> -#include <qfile.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqstrlist.h> +#include <tqptrlist.h> +#include <tqptrdict.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqregexp.h> #include <kurl.h> #include <krfcdate.h> @@ -84,17 +84,17 @@ #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 QString::fromLatin1( ) +// 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) QString::fromLatin1(x) +#define L1(x) TQString::fromLatin1(x) -template class QPtrList<KHttpCookie>; -template class QPtrDict<KHttpCookieList>; +template class TQPtrList<KHttpCookie>; +template class TQPtrDict<KHttpCookieList>; -QString KCookieJar::adviceToStr(KCookieAdvice _advice) +TQString KCookieJar::adviceToStr(KCookieAdvice _advice) { switch( _advice ) { @@ -105,12 +105,12 @@ QString KCookieJar::adviceToStr(KCookieAdvice _advice) } } -KCookieAdvice KCookieJar::strToAdvice(const QString &_str) +KCookieAdvice KCookieJar::strToAdvice(const TQString &_str) { if (_str.isEmpty()) return KCookieDunno; - QCString advice = _str.lower().latin1(); + TQCString advice = _str.lower().latin1(); if (advice == "accept") return KCookieAccept; @@ -128,11 +128,11 @@ KCookieAdvice KCookieJar::strToAdvice(const QString &_str) // // Cookie constructor // -KHttpCookie::KHttpCookie(const QString &_host, - const QString &_domain, - const QString &_path, - const QString &_name, - const QString &_value, +KHttpCookie::KHttpCookie(const TQString &_host, + const TQString &_domain, + const TQString &_path, + const TQString &_name, + const TQString &_value, time_t _expireDate, int _protocolVersion, bool _secure, @@ -140,7 +140,7 @@ KHttpCookie::KHttpCookie(const QString &_host, bool _explicitPath) : mHost(_host), mDomain(_domain), - mPath(_path.isEmpty() ? QString::null : _path), + mPath(_path.isEmpty() ? TQString::null : _path), mName(_name), mValue(_value), mExpireDate(_expireDate), @@ -162,9 +162,9 @@ bool KHttpCookie::isExpired(time_t currentDate) // // Returns a string for a HTTP-header // -QString KHttpCookie::cookieStr(bool useDOMFormat) +TQString KHttpCookie::cookieStr(bool useDOMFormat) { - QString result; + TQString result; if (useDOMFormat || (mProtocolVersion == 0)) { @@ -185,8 +185,8 @@ QString KHttpCookie::cookieStr(bool useDOMFormat) // // Returns whether this cookie should be send to this location. -bool KHttpCookie::match(const QString &fqdn, const QStringList &domains, - const QString &path) +bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains, + const TQString &path) { // Cookie domain match check if (mDomain.isEmpty()) @@ -200,7 +200,7 @@ bool KHttpCookie::match(const QString &fqdn, const QStringList &domains, return false; // Maybe the domain needs an extra dot. - QString domain = '.' + mDomain; + TQString domain = '.' + mDomain; if ( !domains.contains( domain ) ) if ( fqdn != mDomain ) return false; @@ -257,8 +257,8 @@ KCookieJar::KCookieJar() m_cookiesChanged = false; KConfig cfg("khtml/domain_info", true, false, "data"); - QStringList countries = cfg.readListEntry("twoLevelTLD"); - for(QStringList::ConstIterator it = countries.begin(); + TQStringList countries = cfg.readListEntry("twoLevelTLD"); + for(TQStringList::ConstIterator it = countries.begin(); it != countries.end(); ++it) { m_twoLevelTLD.replace(*it, (int *) 1); @@ -277,13 +277,13 @@ KCookieJar::~KCookieJar() static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePtr, bool nameMatchOnly=false, bool updateWindowId=false) { - QString domain1 = cookiePtr->domain(); + TQString domain1 = cookiePtr->domain(); if (domain1.isEmpty()) domain1 = cookiePtr->host(); for ( KHttpCookiePtr cookie=list->first(); cookie != 0; ) { - QString domain2 = cookie->domain(); + TQString domain2 = cookie->domain(); if (domain2.isEmpty()) domain2 = cookie->host(); @@ -297,7 +297,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt { if (updateWindowId) { - for(QValueList<long>::ConstIterator it = cookie->windowIds().begin(); + for(TQValueList<long>::ConstIterator it = cookie->windowIds().begin(); it != cookie->windowIds().end(); ++it) { long windowId = *it; @@ -325,12 +325,12 @@ 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. // -QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies) +TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies) { - QString cookieStr; - QStringList domains; - QString fqdn; - QString path; + TQString cookieStr; + TQStringList domains; + TQString fqdn; + TQString path; KHttpCookiePtr cookie; KCookieAdvice advice = m_globalAdvice; @@ -346,7 +346,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win KHttpCookieList allCookies; - for(QStringList::ConstIterator it = domains.begin(); + for(TQStringList::ConstIterator it = domains.begin(); true; ++it) { @@ -360,7 +360,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win } else { - QString key = (*it).isNull() ? L1("") : (*it); + TQString key = (*it).isNull() ? L1("") : (*it); cookieList = m_cookieDomains[key]; if (!cookieList) continue; // No cookies for this domain @@ -437,7 +437,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win cookieStr += L1("Cookie: "); if (protVersion > 0) { - QString version; + TQString version; version.sprintf("$Version=%d; ", protVersion); // Without quotes cookieStr += version; } @@ -465,8 +465,8 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win // ',' - Another cookie follows // '\n' - Another header follows static const char * parseNameValue(const char *header, - QString &Name, - QString &Value, + TQString &Name, + TQString &Value, bool keepQuotes=false, bool rfcQuotes=false) { @@ -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 = QString::fromLatin1(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 = QString::fromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate(s - header); return (s); } } - Value = QString::fromLatin1(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 = QString::fromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate( s - header ); Value = Value.stripWhiteSpace(); } @@ -550,9 +550,9 @@ static const char * parseNameValue(const char *header, } -void KCookieJar::stripDomain(const QString &_fqdn, QString &_domain) +void KCookieJar::stripDomain(const TQString &_fqdn, TQString &_domain) { - QStringList domains; + TQStringList domains; extractDomains(_fqdn, domains); if (domains.count() > 3) _domain = domains[3]; @@ -560,9 +560,9 @@ void KCookieJar::stripDomain(const QString &_fqdn, QString &_domain) _domain = domains[0]; } -QString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr) +TQString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr) { - QString domain; // We file the cookie under this domain. + TQString domain; // We file the cookie under this domain. if (cookiePtr->domain().isEmpty()) stripDomain( cookiePtr->host(), domain); else @@ -570,9 +570,9 @@ QString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr) return domain; } -bool KCookieJar::parseURL(const QString &_url, - QString &_fqdn, - QString &_path) +bool KCookieJar::parseURL(const TQString &_url, + TQString &_fqdn, + TQString &_path) { KURL kurl(_url); if (!kurl.isValid()) @@ -600,7 +600,7 @@ bool KCookieJar::parseURL(const QString &_url, if (_path.isEmpty()) _path = L1("/"); - QRegExp exp(L1("[\\\\/]\\.\\.[\\\\/]")); + TQRegExp exp(L1("[\\\\/]\\.\\.[\\\\/]")); // Weird path, cookie stealing attempt? if (exp.search(_path) != -1) return false; // Deny everything!! @@ -608,8 +608,8 @@ bool KCookieJar::parseURL(const QString &_url, return true; } -void KCookieJar::extractDomains(const QString &_fqdn, - QStringList &_domains) +void KCookieJar::extractDomains(const TQString &_fqdn, + TQStringList &_domains) { // Return numeric IPv6 addresses as is... if (_fqdn[0] == '[') @@ -620,14 +620,14 @@ void KCookieJar::extractDomains(const QString &_fqdn, // Return numeric IPv4 addresses as is... if ((_fqdn[0] >= '0') && (_fqdn[0] <= '9')) { - if (_fqdn.find(QRegExp(IP_ADDRESS_EXPRESSION)) > -1) + if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) { _domains.append( _fqdn ); return; } } - QStringList partList = QStringList::split('.', _fqdn, false); + TQStringList partList = TQStringList::split('.', _fqdn, false); if (partList.count()) partList.remove(partList.begin()); // Remove hostname @@ -653,12 +653,12 @@ void KCookieJar::extractDomains(const QString &_fqdn, // Catch some TLDs that we miss with the previous check // e.g. com.au, org.uk, mil.co - QCString t = partList[0].lower().utf8(); + TQCString t = partList[0].lower().utf8(); if ((t == "com") || (t == "net") || (t == "org") || (t == "gov") || (t == "edu") || (t == "mil") || (t == "int")) break; } - QString domain = partList.join(L1(".")); + TQString domain = partList.join(L1(".")); _domains.append(domain); _domains.append('.' + domain); partList.remove(partList.begin()); // Remove part @@ -681,16 +681,16 @@ void KCookieJar::extractDomains(const QString &_fqdn, to allow KRFCDate::parseDate to properly parse expiration date formats used in cookies by some servers such as amazon.com. See BR# 145244. */ -static QString fixupDateTime(const QString& dt) +static TQString fixupDateTime(const TQString& dt) { - const int index = dt.find(QRegExp("[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) { - QStringList dateStrList = QStringList::split(' ', dt.mid(index)); + TQStringList dateStrList = TQStringList::split(' ', dt.mid(index)); if (dateStrList.count() > 1) { - QString date = dateStrList[0]; + TQString date = dateStrList[0]; dateStrList[0] = dateStrList[1]; dateStrList[1] = date; date = dt; @@ -709,18 +709,18 @@ static QString fixupDateTime(const QString& dt) // cookie_headers should be a concatenation of all lines of a HTTP-header // which start with "Set-Cookie". The lines should be separated by '\n's. // -KHttpCookieList KCookieJar::makeCookies(const QString &_url, - const QCString &cookie_headers, +KHttpCookieList KCookieJar::makeCookies(const TQString &_url, + const TQCString &cookie_headers, long windowId) { KHttpCookieList cookieList; KHttpCookieList cookieList2; KHttpCookiePtr lastCookie = 0; const char *cookieStr = cookie_headers.data(); - QString Name; - QString Value; - QString fqdn; - QString path; + TQString Name; + TQString Value; + TQString fqdn; + TQString path; bool crossDomain = false; if (!parseURL(_url, fqdn, path)) @@ -728,7 +728,7 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url, // Error parsing _url return KHttpCookieList(); } - QString defaultPath; + TQString defaultPath; int i = path.findRev('/'); if (i > 0) defaultPath = path.left(i); @@ -799,10 +799,10 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url, // Name-Value pair follows cookieStr = parseNameValue(cookieStr, Name, Value); - QCString cName = Name.lower().latin1(); + TQCString cName = Name.lower().latin1(); if (cName == "domain") { - QString dom = Value.lower(); + TQString dom = Value.lower(); // RFC2965 3.2.2: If an explicitly specified value does not // start with a dot, the user agent supplies a leading dot if(dom.length() && dom[0] != '.') @@ -835,7 +835,7 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url, else if (cName == "path") { if (Value.isEmpty()) - lastCookie->mPath = QString::null; // Catch "" <> QString::null + lastCookie->mPath = TQString::null; // Catch "" <> TQString::null else lastCookie->mPath = KURL::decode_string(Value); lastCookie->mExplicitPath = true; @@ -879,8 +879,8 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url, * pairs. Any whitespace before "name" or around '=' is discarded. * If no cookies are found, 0 is returned. */ -KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url, - const QCString &cookie_domstring, +KHttpCookieList KCookieJar::makeDOMCookies(const TQString &_url, + const TQCString &cookie_domstring, long windowId) { // A lot copied from above @@ -888,10 +888,10 @@ KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url, KHttpCookiePtr lastCookie = 0; const char *cookieStr = cookie_domstring.data(); - QString Name; - QString Value; - QString fqdn; - QString path; + TQString Name; + TQString Value; + TQString fqdn; + TQString path; if (!parseURL(_url, fqdn, path)) { @@ -907,7 +907,7 @@ KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url, // Host = FQDN // Default domain = "" // Default path = "" - KHttpCookie *cookie = new KHttpCookie(fqdn, QString::null, QString::null, + KHttpCookie *cookie = new KHttpCookie(fqdn, TQString::null, TQString::null, Name, Value ); if (windowId) cookie->mWindowIds.append(windowId); @@ -946,26 +946,26 @@ static void makeRoom(KHttpCookieList *cookieList, KHttpCookiePtr &cookiePtr) // void KCookieJar::addCookie(KHttpCookiePtr &cookiePtr) { - QStringList domains; + TQStringList domains; KHttpCookieList *cookieList = 0L; // We always need to do this to make sure that the // that cookies of type hostname == cookie-domainname // are properly removed and/or updated as necessary! extractDomains( cookiePtr->host(), domains ); - for ( QStringList::ConstIterator it = domains.begin(); + for ( TQStringList::ConstIterator it = domains.begin(); (it != domains.end() && !cookieList); ++it ) { - QString key = (*it).isNull() ? L1("") : (*it); + TQString key = (*it).isNull() ? L1("") : (*it); KHttpCookieList *list= m_cookieDomains[key]; if ( !list ) continue; removeDuplicateFromList(list, cookiePtr, false, true); } - QString domain = stripDomain( cookiePtr ); - QString key = domain.isNull() ? L1("") : domain; + TQString domain = stripDomain( cookiePtr ); + TQString key = domain.isNull() ? L1("") : domain; cookieList = m_cookieDomains[ key ]; if (!cookieList) { @@ -1011,7 +1011,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) if (m_rejectCrossDomainCookies && cookiePtr->isCrossDomain()) return KCookieReject; - QStringList domains; + TQStringList domains; extractDomains(cookiePtr->host(), domains); @@ -1022,7 +1022,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) { if (!domains.contains(cookiePtr->domain()) && !cookiePtr->domain().endsWith("."+cookiePtr->host())) - cookiePtr->fixDomain(QString::null); + cookiePtr->fixDomain(TQString::null); } if (m_autoAcceptSessionCookies && (cookiePtr->expireDate() == 0 || @@ -1031,10 +1031,10 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) KCookieAdvice advice = KCookieDunno; bool isFQDN = true; // First is FQDN - QStringList::Iterator it = domains.begin(); // Start with FQDN which first in the list. + TQStringList::Iterator it = domains.begin(); // Start with FQDN which first in the list. while( (advice == KCookieDunno) && (it != domains.end())) { - QString domain = *it; + TQString domain = *it; // Check if a policy for the FQDN/domain is set. if ( domain[0] == '.' || isFQDN ) { @@ -1057,7 +1057,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) // This function gets the advice for all cookies originating from // _domain. // -KCookieAdvice KCookieJar::getDomainAdvice(const QString &_domain) +KCookieAdvice KCookieJar::getDomainAdvice(const TQString &_domain) { KHttpCookieList *cookieList = m_cookieDomains[_domain]; KCookieAdvice advice; @@ -1078,9 +1078,9 @@ KCookieAdvice KCookieJar::getDomainAdvice(const QString &_domain) // This function sets the advice for all cookies originating from // _domain. // -void KCookieJar::setDomainAdvice(const QString &_domain, KCookieAdvice _advice) +void KCookieJar::setDomainAdvice(const TQString &_domain, KCookieAdvice _advice) { - QString domain(_domain); + TQString domain(_domain); KHttpCookieList *cookieList = m_cookieDomains[domain]; if (cookieList) @@ -1124,7 +1124,7 @@ void KCookieJar::setDomainAdvice(const QString &_domain, KCookieAdvice _advice) // void KCookieJar::setDomainAdvice(KHttpCookiePtr cookiePtr, KCookieAdvice _advice) { - QString domain; + TQString domain; stripDomain(cookiePtr->host(), domain); // We file the cookie under this domain. setDomainAdvice(domain, _advice); @@ -1143,7 +1143,7 @@ void KCookieJar::setGlobalAdvice(KCookieAdvice _advice) // // Get a list of all domains known to the cookie jar. // -const QStringList& KCookieJar::getDomainList() +const TQStringList& KCookieJar::getDomainList() { return m_domainList; } @@ -1151,10 +1151,10 @@ const QStringList& KCookieJar::getDomainList() // // Get a list of all cookies in the cookie jar originating from _domain. // -const KHttpCookieList *KCookieJar::getCookieList(const QString & _domain, - const QString & _fqdn ) +const KHttpCookieList *KCookieJar::getCookieList(const TQString & _domain, + const TQString & _fqdn ) { - QString domain; + TQString domain; if (_domain.isEmpty()) stripDomain( _fqdn, domain ); @@ -1170,7 +1170,7 @@ const KHttpCookieList *KCookieJar::getCookieList(const QString & _domain, // void KCookieJar::eatCookie(KHttpCookiePtr cookiePtr) { - QString domain = stripDomain(cookiePtr); // We file the cookie under this domain. + TQString domain = stripDomain(cookiePtr); // We file the cookie under this domain. KHttpCookieList *cookieList = m_cookieDomains[domain]; if (cookieList) @@ -1190,7 +1190,7 @@ void KCookieJar::eatCookie(KHttpCookiePtr cookiePtr) } } -void KCookieJar::eatCookiesForDomain(const QString &domain) +void KCookieJar::eatCookiesForDomain(const TQString &domain) { KHttpCookieList *cookieList = m_cookieDomains[domain]; if (!cookieList || cookieList->isEmpty()) return; @@ -1210,23 +1210,23 @@ void KCookieJar::eatSessionCookies( long windowId ) if (!windowId) return; - QStringList::Iterator it=m_domainList.begin(); + TQStringList::Iterator it=m_domainList.begin(); for ( ; it != m_domainList.end(); ++it ) eatSessionCookies( *it, windowId, false ); } void KCookieJar::eatAllCookies() { - for ( QStringList::Iterator it=m_domainList.begin(); + for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end();) { - QString domain = *it++; + TQString domain = *it++; // This might remove domain from domainList! eatCookiesForDomain(domain); } } -void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId, +void KCookieJar::eatSessionCookies( const TQString& fqdn, long windowId, bool isFQDN ) { KHttpCookieList* cookieList; @@ -1234,7 +1234,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId, cookieList = m_cookieDomains[fqdn]; else { - QString domain; + TQString domain; stripDomain( fqdn, domain ); cookieList = m_cookieDomains[domain]; } @@ -1250,7 +1250,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId, continue; } - QValueList<long> &ids = cookie->windowIds(); + TQValueList<long> &ids = cookie->windowIds(); if (!ids.remove(windowId) || !ids.isEmpty()) { cookie = cookieList->next(); @@ -1267,7 +1267,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId, // Saves all cookies to the file '_filename'. // On succes 'true' is returned. // On failure 'false' is returned. -bool KCookieJar::saveCookies(const QString &_filename) +bool KCookieJar::saveCookies(const TQString &_filename) { KSaveFile saveFile(_filename, 0600); @@ -1284,10 +1284,10 @@ bool KCookieJar::saveCookies(const QString &_filename) "# Host", "Domain", "Path", "Exp.date", "Prot", "Name", "Sec", "Value"); - for ( QStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); + for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); it++ ) { - const QString &domain = *it; + const TQString &domain = *it; bool domainPrinted = false; KHttpCookieList *cookieList = m_cookieDomains[domain]; @@ -1310,10 +1310,10 @@ bool KCookieJar::saveCookies(const QString &_filename) fprintf(fStream, "[%s]\n", domain.local8Bit().data()); } // Store persistent cookies - QString path = L1("\""); + TQString path = L1("\""); path += cookie->path(); path += '"'; - QString domain = L1("\""); + TQString domain = L1("\""); domain += cookie->domain(); domain += '"'; fprintf(fStream, "%-20s %-20s %-12s %10lu %3d %-20s %-4i %s\n", @@ -1374,9 +1374,9 @@ static const char *parseField(charPtr &buffer, bool keepQuotes=false) // Reloads all cookies from the file '_filename'. // On succes 'true' is returned. // On failure 'false' is returned. -bool KCookieJar::loadCookies(const QString &_filename) +bool KCookieJar::loadCookies(const TQString &_filename) { - FILE *fStream = fopen( QFile::encodeName(_filename), "r"); + FILE *fStream = fopen( TQFile::encodeName(_filename), "r"); if (fStream == 0) { return false; @@ -1457,11 +1457,11 @@ bool KCookieJar::loadCookies(const QString &_filename) if ((expDate == 0) || (expDate < curTime)) continue; - KHttpCookie *cookie = new KHttpCookie(QString::fromLatin1(host), - QString::fromLatin1(domain), - QString::fromLatin1(path), - QString::fromLatin1(name), - QString::fromLatin1(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); @@ -1489,16 +1489,16 @@ void KCookieJar::saveConfig(KConfig *_config) _config->setGroup("Cookie Policy"); _config->writeEntry("CookieGlobalAdvice", adviceToStr( m_globalAdvice)); - QStringList domainSettings; - for ( QStringList::Iterator it=m_domainList.begin(); + TQStringList domainSettings; + for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); it++ ) { - const QString &domain = *it; + const TQString &domain = *it; KCookieAdvice advice = getDomainAdvice( domain); if (advice != KCookieDunno) { - QString value(domain); + TQString value(domain); value += ':'; value += adviceToStr(advice); domainSettings.append(value); @@ -1524,34 +1524,34 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse ) m_preferredPolicy = _config->readNumEntry( "PreferredPolicy", 0 ); _config->setGroup("Cookie Policy"); - QStringList domainSettings = _config->readListEntry("CookieDomainAdvice"); + TQStringList domainSettings = _config->readListEntry("CookieDomainAdvice"); m_rejectCrossDomainCookies = _config->readBoolEntry( "RejectCrossDomainCookies", true ); m_autoAcceptSessionCookies = _config->readBoolEntry( "AcceptSessionCookies", true ); m_ignoreCookieExpirationDate = _config->readBoolEntry( "IgnoreExpirationDate", false ); - QString value = _config->readEntry("CookieGlobalAdvice", L1("Ask")); + TQString value = _config->readEntry("CookieGlobalAdvice", L1("Ask")); m_globalAdvice = strToAdvice(value); // Reset current domain settings first. - for ( QStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); ) + for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); ) { // Make sure to update iterator before calling setDomainAdvice() // setDomainAdvice() might delete the domain from domainList. - QString domain = *it++; + TQString domain = *it++; setDomainAdvice(domain, KCookieDunno); } // Now apply the domain settings read from config file... - for ( QStringList::Iterator it=domainSettings.begin(); + for ( TQStringList::Iterator it=domainSettings.begin(); it != domainSettings.end(); ) { - const QString &value = *it++; + const TQString &value = *it++; int sepPos = value.findRev(':'); if (sepPos <= 0) continue; - QString domain(value.left(sepPos)); + TQString domain(value.left(sepPos)); KCookieAdvice advice = strToAdvice( value.mid(sepPos + 1) ); setDomainAdvice(domain, advice); } diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index c73708bea..eb64485ea 100644 --- a/kioslave/http/kcookiejar/kcookiejar.h +++ b/kioslave/http/kcookiejar/kcookiejar.h @@ -25,10 +25,10 @@ #ifndef KCOOKIEJAR_H #define KCOOKIEJAR_H -#include <qstring.h> -#include <qstringlist.h> -#include <qdict.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdict.h> +#include <tqptrlist.h> #include <time.h> class KConfig; @@ -52,40 +52,40 @@ class KHttpCookie friend class KHttpCookieList; protected: - QString mHost; - QString mDomain; - QString mPath; - QString mName; - QString mValue; + TQString mHost; + TQString mDomain; + TQString mPath; + TQString mName; + TQString mValue; time_t mExpireDate; int mProtocolVersion; bool mSecure; bool mCrossDomain; bool mHttpOnly; bool mExplicitPath; - QValueList<long> mWindowIds; + TQValueList<long> mWindowIds; - QString cookieStr(bool useDOMFormat); + TQString cookieStr(bool useDOMFormat); public: - KHttpCookie(const QString &_host=QString::null, - const QString &_domain=QString::null, - const QString &_path=QString::null, - const QString &_name=QString::null, - const QString &_value=QString::null, + KHttpCookie(const TQString &_host=TQString::null, + const TQString &_domain=TQString::null, + const TQString &_path=TQString::null, + const TQString &_name=TQString::null, + const TQString &_value=TQString::null, time_t _expireDate=0, int _protocolVersion=0, bool _secure = false, bool _httpOnly = false, bool _explicitPath = false); - QString domain(void) { return mDomain; } - QString host(void) { return mHost; } - QString path(void) { return mPath; } - QString name(void) { return mName; } - QString value(void) { return mValue; } - QValueList<long> &windowIds(void) { return mWindowIds; } - void fixDomain(const QString &domain) { mDomain = domain; } + TQString domain(void) { return mDomain; } + TQString host(void) { return mHost; } + TQString path(void) { return mPath; } + TQString name(void) { return mName; } + TQString value(void) { return mValue; } + TQValueList<long> &windowIds(void) { return mWindowIds; } + void fixDomain(const TQString &domain) { mDomain = domain; } time_t expireDate(void) { return mExpireDate; } int protocolVersion(void) { return mProtocolVersion; } bool isSecure(void) { return mSecure; } @@ -93,13 +93,13 @@ public: bool isCrossDomain(void) { return mCrossDomain; } bool isHttpOnly(void) { return mHttpOnly; } bool hasExplicitPath(void) { return mExplicitPath; } - bool match(const QString &fqdn, const QStringList &domainList, const QString &path); + bool match(const TQString &fqdn, const TQStringList &domainList, const TQString &path); }; -class KHttpCookieList : public QPtrList<KHttpCookie> +class KHttpCookieList : public TQPtrList<KHttpCookie> { public: - KHttpCookieList() : QPtrList<KHttpCookie>(), advice( KCookieDunno ) + KHttpCookieList() : TQPtrList<KHttpCookie>(), advice( KCookieDunno ) { } virtual ~KHttpCookieList() { } @@ -136,12 +136,12 @@ public: /** * Store all the cookies in a safe(?) place */ - bool saveCookies(const QString &_filename); + bool saveCookies(const TQString &_filename); /** * Load all the cookies from file and add them to the cookie jar. */ - bool loadCookies(const QString &_filename); + bool loadCookies(const TQString &_filename); /** * Save the cookie configuration @@ -164,7 +164,7 @@ public: * approved yet by the user but that will be included in the result * none the less. */ - QString findCookies(const QString &_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 @@ -174,7 +174,7 @@ public: * cookie_headers should be a concatenation of all lines of a HTTP-header * which start with "Set-Cookie". The lines should be separated by '\n's. */ - KHttpCookieList makeCookies(const QString &_url, const QCString &cookie_headers, long windowId); + KHttpCookieList makeCookies(const TQString &_url, const TQCString &cookie_headers, long windowId); /** * This function parses cookie_headers and returns a linked list of @@ -184,7 +184,7 @@ public: * cookie_domstr should be a concatenation of "name=value" pairs, separated * by a semicolon ';'. */ - KHttpCookieList makeDOMCookies(const QString &_url, const QCString &cookie_domstr, long windowId); + KHttpCookieList makeDOMCookies(const TQString &_url, const TQCString &cookie_domstr, long windowId); /** * This function hands a KHttpCookie object over to the cookie jar. @@ -213,7 +213,7 @@ public: * - KCookieReject, reject all cookies for _domain * - KCookieAsk, the user decides what to do with cookies for _domain */ - KCookieAdvice getDomainAdvice(const QString &_domain); + KCookieAdvice getDomainAdvice(const TQString &_domain); /** * This function sets the advice for all cookies originating from @@ -225,7 +225,7 @@ public: * - KCookieReject, reject all cookies for _domain * - KCookieAsk, the user decides what to do with cookies for _domain */ - void setDomainAdvice(const QString &_domain, KCookieAdvice _advice); + void setDomainAdvice(const TQString &_domain, KCookieAdvice _advice); /** * This function sets the advice for all cookies originating from @@ -269,13 +269,13 @@ public: * - It has a cookie originating from the domain * - It has a specific advice set for the domain */ - const QStringList& getDomainList(); + const TQStringList& getDomainList(); /** * Get a list of all cookies in the cookie jar originating from _domain. */ - const KHttpCookieList *getCookieList(const QString & _domain, - const QString& _fqdn ); + const KHttpCookieList *getCookieList(const TQString & _domain, + const TQString& _fqdn ); /** * Remove & delete a cookie from the jar. @@ -289,7 +289,7 @@ public: /** * Remove & delete all cookies for @p domain. */ - void eatCookiesForDomain(const QString &domain); + void eatCookiesForDomain(const TQString &domain); /** * Remove & delete all cookies @@ -306,25 +306,25 @@ public: * Removes all end of session cookies set by the * session @p windId. */ - void eatSessionCookies( const QString& fqdn, long windowId, bool isFQDN = true ); + void eatSessionCookies( const TQString& fqdn, long windowId, bool isFQDN = true ); /** * Parses _url and returns the FQDN (_fqdn) and path (_path). */ - static bool parseURL(const QString &_url, - QString &_fqdn, - QString &_path); + static bool parseURL(const TQString &_url, + TQString &_fqdn, + TQString &_path); /** * Returns a list of domains in @p _domainList relevant for this host. * The list is sorted with the FQDN listed first and the top-most * domain listed last */ - void extractDomains(const QString &_fqdn, - QStringList &_domainList); + void extractDomains(const TQString &_fqdn, + TQStringList &_domainList); - static QString adviceToStr(KCookieAdvice _advice); - static KCookieAdvice strToAdvice(const QString &_str); + static TQString adviceToStr(KCookieAdvice _advice); + static KCookieAdvice strToAdvice(const TQString &_str); /** Returns the */ int preferredDefaultPolicy() const { return m_preferredPolicy; } @@ -344,14 +344,14 @@ public: void setShowCookieDetails (bool value) { m_showCookieDetails = value; } protected: - void stripDomain(const QString &_fqdn, QString &_domain); - QString stripDomain( KHttpCookiePtr cookiePtr); + void stripDomain(const TQString &_fqdn, TQString &_domain); + TQString stripDomain( KHttpCookiePtr cookiePtr); protected: - QStringList m_domainList; + TQStringList m_domainList; KCookieAdvice m_globalAdvice; - QDict<KHttpCookieList> m_cookieDomains; - QDict<int> m_twoLevelTLD; + TQDict<KHttpCookieList> m_cookieDomains; + TQDict<int> m_twoLevelTLD; bool m_configChanged; bool m_cookiesChanged; diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index 365f15e79..e6469f127 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -29,9 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <unistd.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqfile.h> #include <dcopclient.h> @@ -46,7 +46,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kcookieserver.h" extern "C" { - KDE_EXPORT KDEDModule *create_kcookiejar(const QCString &name) + KDE_EXPORT KDEDModule *create_kcookiejar(const TQCString &name) { return new KCookieServer(name); } @@ -62,20 +62,20 @@ class CookieRequest { public: DCOPClient *client; DCOPClientTransaction *transaction; - QString url; + TQString url; bool DOM; long windowId; }; -template class QPtrList<CookieRequest>; +template class TQPtrList<CookieRequest>; -class RequestList : public QPtrList<CookieRequest> +class RequestList : public TQPtrList<CookieRequest> { public: - RequestList() : QPtrList<CookieRequest>() { } + RequestList() : TQPtrList<CookieRequest>() { } }; -KCookieServer::KCookieServer(const QCString &name) +KCookieServer::KCookieServer(const TQCString &name) :KDEDModule(name) { mOldCookieServer = new DCOPClient(); // backwards compatibility. @@ -86,29 +86,29 @@ KCookieServer::KCookieServer(const QCString &name) mPendingCookies->setAutoDelete(true); mRequestList = new RequestList; mAdvicePending = false; - mTimer = new QTimer(); - connect( mTimer, SIGNAL( timeout()), SLOT( slotSave())); + mTimer = new TQTimer(); + connect( mTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotSave())); mConfig = new KConfig("kcookiejarrc"); mCookieJar->loadConfig( mConfig ); - QString filename = locateLocal("data", "kcookiejar/cookies"); + TQString filename = locateLocal("data", "kcookiejar/cookies"); // Stay backwards compatible! - QString filenameOld = locate("data", "kfm/cookies"); + TQString filenameOld = locate("data", "kfm/cookies"); if (!filenameOld.isEmpty()) { mCookieJar->loadCookies( filenameOld ); if (mCookieJar->saveCookies( filename)) { - unlink(QFile::encodeName(filenameOld)); // Remove old kfm cookie file + unlink(TQFile::encodeName(filenameOld)); // Remove old kfm cookie file } } else { mCookieJar->loadCookies( filename); } - connect(this, SIGNAL(windowUnregistered(long)), - this, SLOT(slotDeleteSessionCookies(long))); + connect(this, TQT_SIGNAL(windowUnregistered(long)), + this, TQT_SLOT(slotDeleteSessionCookies(long))); } KCookieServer::~KCookieServer() @@ -122,11 +122,11 @@ KCookieServer::~KCookieServer() delete mConfig; } -bool KCookieServer::cookiesPending( const QString &url, KHttpCookieList *cookieList ) +bool KCookieServer::cookiesPending( const TQString &url, KHttpCookieList *cookieList ) { - QString fqdn; - QStringList domains; - QString path; + TQString fqdn; + TQStringList domains; + TQString path; // Check whether 'url' has cookies on the pending list if (mPendingCookies->isEmpty()) return false; @@ -150,7 +150,7 @@ bool KCookieServer::cookiesPending( const QString &url, KHttpCookieList *cookieL return cookieList->isEmpty(); } -void KCookieServer::addCookies( const QString &url, const QCString &cookieHeader, +void KCookieServer::addCookies( const TQString &url, const TQCString &cookieHeader, long windowId, bool useDOMFormat ) { KHttpCookieList cookieList; @@ -216,7 +216,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList) KHttpCookieList currentList; currentList.append(currentCookie); - QString currentHost = currentCookie->host(); + TQString currentHost = currentCookie->host(); cookie = mPendingCookies->next(); while (cookie) @@ -275,13 +275,13 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList) { if (!cookiesPending( request->url )) { - QCString replyType; - QByteArray replyData; - QString res = mCookieJar->findCookies( request->url, request->DOM, request->windowId ); + TQCString replyType; + TQByteArray replyData; + TQString res = mCookieJar->findCookies( request->url, request->DOM, request->windowId ); - QDataStream stream2(replyData, IO_WriteOnly); + TQDataStream stream2(replyData, IO_WriteOnly); stream2 << res; - replyType = "QString"; + replyType = "TQString"; request->client->endTransaction( request->transaction, replyType, replyData); CookieRequest *tmp = request; @@ -300,7 +300,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList) void KCookieServer::slotSave() { - QString filename = locateLocal("data", "kcookiejar/cookies"); + TQString filename = locateLocal("data", "kcookiejar/cookies"); mCookieJar->saveCookies(filename); } @@ -312,10 +312,10 @@ void KCookieServer::saveCookieJar() mTimer->start( 1000*60*SAVE_DELAY, true ); } -void KCookieServer::putCookie( QStringList& out, KHttpCookie *cookie, - const QValueList<int>& fields ) +void KCookieServer::putCookie( TQStringList& out, KHttpCookie *cookie, + const TQValueList<int>& fields ) { - QValueList<int>::ConstIterator i = fields.begin(); + TQValueList<int>::ConstIterator i = fields.begin(); for ( ; i != fields.end(); ++i ) { switch(*i) @@ -336,23 +336,23 @@ void KCookieServer::putCookie( QStringList& out, KHttpCookie *cookie, out << cookie->value(); break; case CF_EXPIRE : - out << QString::number(cookie->expireDate()); + out << TQString::number(cookie->expireDate()); break; case CF_PROVER : - out << QString::number(cookie->protocolVersion()); + out << TQString::number(cookie->protocolVersion()); break; case CF_SECURE : - out << QString::number( cookie->isSecure() ? 1 : 0 ); + out << TQString::number( cookie->isSecure() ? 1 : 0 ); break; default : - out << QString::null; + out << TQString::null; } } } bool KCookieServer::cookieMatches( KHttpCookiePtr c, - QString domain, QString fqdn, - QString path, QString name ) + TQString domain, TQString fqdn, + TQString path, TQString name ) { if( c ) { @@ -369,14 +369,14 @@ bool KCookieServer::cookieMatches( KHttpCookiePtr c, // DCOP function QString -KCookieServer::findCookies(QString url) +KCookieServer::findCookies(TQString url) { return findCookies(url, 0); } // DCOP function QString -KCookieServer::findCookies(QString url, long windowId) +KCookieServer::findCookies(TQString url, long windowId) { if (cookiesPending(url)) { @@ -387,10 +387,10 @@ KCookieServer::findCookies(QString url, long windowId) request->DOM = false; request->windowId = windowId; mRequestList->append( request ); - return QString::null; // Talk to you later :-) + return TQString::null; // Talk to you later :-) } - QString cookies = mCookieJar->findCookies(url, false, windowId); + TQString cookies = mCookieJar->findCookies(url, false, windowId); if (mCookieJar->changed()) saveCookieJar(); @@ -402,9 +402,9 @@ KCookieServer::findCookies(QString url, long windowId) QStringList KCookieServer::findDomains() { - QStringList result; - const QStringList domains = mCookieJar->getDomainList(); - for ( QStringList::ConstIterator domIt = domains.begin(); + TQStringList result; + const TQStringList domains = mCookieJar->getDomainList(); + for ( TQStringList::ConstIterator domIt = domains.begin(); domIt != domains.end(); ++domIt ) { // Ignore domains that have policy set for but contain @@ -418,19 +418,19 @@ KCookieServer::findDomains() // DCOP function QStringList -KCookieServer::findCookies(QValueList<int> fields, - QString domain, - QString fqdn, - QString path, - QString name) +KCookieServer::findCookies(TQValueList<int> fields, + TQString domain, + TQString fqdn, + TQString path, + TQString name) { - QStringList result; + TQStringList result; bool allDomCookies = name.isEmpty(); const KHttpCookieList* list = mCookieJar->getCookieList(domain, fqdn); if ( list && !list->isEmpty() ) { - QPtrListIterator<KHttpCookie>it( *list ); + TQPtrListIterator<KHttpCookie>it( *list ); for ( ; it.current(); ++it ) { if ( !allDomCookies ) @@ -450,14 +450,14 @@ KCookieServer::findCookies(QValueList<int> fields, // DCOP function QString -KCookieServer::findDOMCookies(QString url) +KCookieServer::findDOMCookies(TQString url) { return findDOMCookies(url, 0); } // DCOP function QString -KCookieServer::findDOMCookies(QString 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. @@ -470,20 +470,20 @@ KCookieServer::findDOMCookies(QString url, long windowId) // DCOP function void -KCookieServer::addCookies(QString arg1, QCString arg2, long arg3) +KCookieServer::addCookies(TQString arg1, TQCString arg2, long arg3) { addCookies(arg1, arg2, arg3, false); } // DCOP function void -KCookieServer::deleteCookie(QString domain, QString fqdn, - QString path, QString name) +KCookieServer::deleteCookie(TQString domain, TQString fqdn, + TQString path, TQString name) { const KHttpCookieList* list = mCookieJar->getCookieList( domain, fqdn ); if ( list && !list->isEmpty() ) { - QPtrListIterator<KHttpCookie>it (*list); + TQPtrListIterator<KHttpCookie>it (*list); for ( ; it.current(); ++it ) { if( cookieMatches(it.current(), domain, fqdn, path, name) ) @@ -498,7 +498,7 @@ KCookieServer::deleteCookie(QString domain, QString fqdn, // DCOP function void -KCookieServer::deleteCookiesFromDomain(QString domain) +KCookieServer::deleteCookiesFromDomain(TQString domain) { mCookieJar->eatCookiesForDomain(domain); saveCookieJar(); @@ -521,7 +521,7 @@ KCookieServer::deleteSessionCookies( long windowId ) } void -KCookieServer::deleteSessionCookiesFor(QString fqdn, long windowId) +KCookieServer::deleteSessionCookiesFor(TQString fqdn, long windowId) { mCookieJar->eatSessionCookies( fqdn, windowId ); saveCookieJar(); @@ -537,20 +537,20 @@ KCookieServer::deleteAllCookies() // DCOP function void -KCookieServer::addDOMCookies(QString arg1, QCString arg2, long arg3) +KCookieServer::addDOMCookies(TQString arg1, TQCString arg2, long arg3) { addCookies(arg1, arg2, arg3, true); } // DCOP function void -KCookieServer::setDomainAdvice(QString url, QString advice) +KCookieServer::setDomainAdvice(TQString url, TQString advice) { - QString fqdn; - QString dummy; + TQString fqdn; + TQString dummy; if (KCookieJar::parseURL(url, fqdn, dummy)) { - QStringList domains; + TQStringList domains; mCookieJar->extractDomains(fqdn, domains); mCookieJar->setDomainAdvice(domains[domains.count() > 3 ? 3 : 0], @@ -562,17 +562,17 @@ KCookieServer::setDomainAdvice(QString url, QString advice) // DCOP function QString -KCookieServer::getDomainAdvice(QString url) +KCookieServer::getDomainAdvice(TQString url) { KCookieAdvice advice = KCookieDunno; - QString fqdn; - QString dummy; + TQString fqdn; + TQString dummy; if (KCookieJar::parseURL(url, fqdn, dummy)) { - QStringList domains; + TQStringList domains; mCookieJar->extractDomains(fqdn, domains); - QStringList::ConstIterator it = domains.begin(); + TQStringList::ConstIterator it = domains.begin(); while ( (advice == KCookieDunno) && (it != domains.end()) ) { // Always check advice in both ".domain" and "domain". Note diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h index bcd7fa530..ac185c38d 100644 --- a/kioslave/http/kcookiejar/kcookieserver.h +++ b/kioslave/http/kcookiejar/kcookieserver.h @@ -25,7 +25,7 @@ #ifndef KCOOKIESERVER_H #define KCOOKIESERVER_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kded/kdedmodule.h> class KHttpCookieList; @@ -41,37 +41,37 @@ class KCookieServer : public KDEDModule Q_OBJECT K_DCOP public: - KCookieServer(const QCString &); + KCookieServer(const TQCString &); ~KCookieServer(); k_dcop: - QString findCookies(QString); - QString findCookies(QString, long); - QStringList findDomains(); - QStringList findCookies(QValueList<int>,QString,QString,QString,QString); - QString findDOMCookies(QString); - QString findDOMCookies(QString, long); - void addCookies(QString, QCString, long); - void deleteCookie(QString, QString, QString, QString); - void deleteCookiesFromDomain(QString); + 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); void deleteSessionCookies(long); - void deleteSessionCookiesFor(QString, long); + void deleteSessionCookiesFor(TQString, long); void deleteAllCookies(); - void addDOMCookies(QString, QCString, long); + void addDOMCookies(TQString, TQCString, long); /** * Sets the cookie policy for the domain associated with the specified URL. */ - void setDomainAdvice(QString url, QString advice); + void setDomainAdvice(TQString url, TQString advice); /** * Returns the cookie policy in effect for the specified URL. */ - QString getDomainAdvice(QString url); + TQString getDomainAdvice(TQString url); void reloadPolicy(); void shutdown(); public: - bool cookiesPending(const QString &url, KHttpCookieList *cookieList=0); - void addCookies(const QString &url, const QCString &cookieHeader, + bool cookiesPending(const TQString &url, KHttpCookieList *cookieList=0); + void addCookies(const TQString &url, const TQCString &cookieHeader, long windowId, bool useDOMFormat); void checkCookies(KHttpCookieList *cookieList); @@ -83,15 +83,15 @@ protected: KCookieJar *mCookieJar; KHttpCookieList *mPendingCookies; RequestList *mRequestList; - QTimer *mTimer; + TQTimer *mTimer; bool mAdvicePending; DCOPClient *mOldCookieServer; KConfig *mConfig; private: - virtual int newInstance(QValueList<QCString>) { return 0; } - bool cookieMatches(KHttpCookie*, QString, QString, QString, QString); - void putCookie(QStringList&, KHttpCookie*, const QValueList<int>&); + virtual int newInstance(TQValueList<TQCString>) { return 0; } + bool cookieMatches(KHttpCookie*, TQString, TQString, TQString, TQString); + void putCookie(TQStringList&, KHttpCookie*, const TQValueList<int>&); void saveCookieJar(); }; diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index 5c68f8c1e..2c11c33cb 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -30,30 +30,30 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // this file is also used in Konqueror/Embedded. One of the aims of // Konqueror/Embedded is to be a small as possible to fit on embedded // devices. For this it's also useful to strip out unneeded features of -// Qt, like for example QToolTip or QWhatsThis. The availability (or the +// Qt, like for example TQToolTip or TQWhatsThis. The availability (or the // lack thereof) can be determined using these preprocessor defines. // The same applies to the QT_NO_ACCEL ifdef below. I hope it doesn't make // too much trouble... (Simon) -#include <qhbox.h> -#include <qvbox.h> -#include <qaccel.h> -#include <qlabel.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qdatetime.h> -#include <qmessagebox.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqaccel.h> +#include <tqlabel.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqdatetime.h> +#include <tqmessagebox.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> #ifndef QT_NO_TOOLTIP -#include <qtooltip.h> +#include <tqtooltip.h> #endif #ifndef QT_NO_WHATSTHIS -#include <qwhatsthis.h> +#include <tqwhatsthis.h> #endif #include <kidna.h> @@ -72,7 +72,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kcookiejar.h" #include "kcookiewin.h" -KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList, +KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, int defaultButton, bool showDetails ) :KDialog( parent, "cookiealert", true ) { @@ -94,42 +94,42 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList, # endif #endif // Main widget's layout manager... - QVBoxLayout* vlayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - vlayout->setResizeMode( QLayout::Fixed ); + TQVBoxLayout* vlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlayout->setResizeMode( TQLayout::Fixed ); // Cookie image and message to user - QHBox* hBox = new QHBox( this ); + TQHBox* hBox = new TQHBox( this ); hBox->setSpacing( KDialog::spacingHint() ); - QLabel* icon = new QLabel( hBox ); - icon->setPixmap( QMessageBox::standardIcon(QMessageBox::Warning) ); + TQLabel* icon = new TQLabel( hBox ); + icon->setPixmap( TQMessageBox::standardIcon(TQMessageBox::Warning) ); icon->setAlignment( Qt::AlignCenter ); icon->setFixedSize( 2*icon->sizeHint() ); int count = cookieList.count(); - QVBox* vBox = new QVBox( hBox ); - QString txt = i18n("You received a cookie from", + TQVBox* vBox = new TQVBox( hBox ); + TQString txt = i18n("You received a cookie from", "You received %n cookies from", count); - QLabel* lbl = new QLabel( txt, vBox ); + TQLabel* lbl = new TQLabel( txt, vBox ); lbl->setAlignment( Qt::AlignCenter ); KHttpCookiePtr cookie = cookieList.first(); - QString host (cookie->host()); + TQString host (cookie->host()); int pos = host.find(':'); if ( pos > 0 ) { - QString portNum = host.left(pos); + TQString portNum = host.left(pos); host.remove(0, pos+1); host += ':'; host += portNum; } - txt = QString("<b>%1</b>").arg( KIDNA::toUnicode(host) ); + txt = TQString("<b>%1</b>").arg( KIDNA::toUnicode(host) ); if (cookie->isCrossDomain()) txt += i18n(" <b>[Cross Domain!]</b>"); - lbl = new QLabel( txt, vBox ); + lbl = new TQLabel( txt, vBox ); lbl->setAlignment( Qt::AlignCenter ); - lbl = new QLabel( i18n("Do you want to accept or reject?"), vBox ); + lbl = new TQLabel( i18n("Do you want to accept or reject?"), vBox ); lbl->setAlignment( Qt::AlignCenter ); vlayout->addWidget( hBox, 0, Qt::AlignLeft ); @@ -140,29 +140,29 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList, m_showDetails ? m_detailView->show():m_detailView->hide(); // Cookie policy choice... - m_btnGrp = new QVButtonGroup( i18n("Apply Choice To"), this ); + m_btnGrp = new TQVButtonGroup( i18n("Apply Choice To"), this ); m_btnGrp->setRadioButtonExclusive( true ); txt = (count == 1)? i18n("&Only this cookie") : i18n("&Only these cookies"); - QRadioButton* rb = new QRadioButton( txt, m_btnGrp ); + TQRadioButton* rb = new TQRadioButton( txt, m_btnGrp ); #ifndef QT_NO_WHATSTHIS - QWhatsThis::add( rb, i18n("Select this option to accept/reject only this cookie. " + TQWhatsThis::add( rb, i18n("Select this option to accept/reject only this cookie. " "You will be prompted if another cookie is received. " "<em>(see WebBrowsing/Cookies in the Control Center)</em>." ) ); #endif m_btnGrp->insert( rb ); - rb = new QRadioButton( i18n("All cookies from this do&main"), m_btnGrp ); + rb = new TQRadioButton( i18n("All cookies from this do&main"), m_btnGrp ); #ifndef QT_NO_WHATSTHIS - QWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from " + TQWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from " "this site. Choosing this option will add a new policy for " "the site this cookie originated from. This policy will be " "permanent until you manually change it from the Control Center " "<em>(see WebBrowsing/Cookies in the Control Center)</em>.") ); #endif m_btnGrp->insert( rb ); - rb = new QRadioButton( i18n("All &cookies"), m_btnGrp ); + rb = new TQRadioButton( i18n("All &cookies"), m_btnGrp ); #ifndef QT_NO_WHATSTHIS - QWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from " + TQWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from " "anywhere. Choosing this option will change the global " "cookie policy set in the Control Center for all cookies " "<em>(see WebBrowsing/Cookies in the Control Center)</em>.") ); @@ -176,29 +176,29 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList, m_btnGrp->setButton( 1 ); // Accept/Reject buttons - QWidget* bbox = new QWidget( this ); - QBoxLayout* bbLay = new QHBoxLayout( bbox ); + TQWidget* bbox = new TQWidget( this ); + TQBoxLayout* bbLay = new TQHBoxLayout( bbox ); bbLay->setSpacing( KDialog::spacingHint() ); - QPushButton* btn = new QPushButton( i18n("&Accept"), bbox ); + TQPushButton* btn = new TQPushButton( i18n("&Accept"), bbox ); btn->setDefault( true ); btn->setFocus(); - connect( btn, SIGNAL(clicked()), SLOT(accept()) ); + connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); bbLay->addWidget( btn ); - btn = new QPushButton( i18n("&Reject"), bbox ); - connect( btn, SIGNAL(clicked()), SLOT(reject()) ); + btn = new TQPushButton( i18n("&Reject"), bbox ); + connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); bbLay->addWidget( btn ); bbLay->addStretch( 1 ); #ifndef QT_NO_ACCEL - QAccel* a = new QAccel( this ); - a->connectItem( a->insertItem(Qt::Key_Escape), btn, SLOT(animateClick()) ); + TQAccel* a = new TQAccel( this ); + a->connectItem( a->insertItem(Qt::Key_Escape), btn, TQT_SLOT(animateClick()) ); #endif - m_button = new QPushButton( bbox ); + m_button = new TQPushButton( bbox ); m_button->setText( m_showDetails ? i18n("&Details <<"):i18n("&Details >>") ); - connect( m_button, SIGNAL(clicked()), SLOT(slotCookieDetails()) ); + connect( m_button, TQT_SIGNAL(clicked()), TQT_SLOT(slotCookieDetails()) ); bbLay->addWidget( m_button ); #ifndef QT_NO_WHATSTHIS - QWhatsThis::add( m_button, i18n("See or modify the cookie information") ); + TQWhatsThis::add( m_button, i18n("See or modify the cookie information") ); #endif @@ -236,7 +236,7 @@ KCookieAdvice KCookieWin::advice( KCookieJar *cookiejar, KHttpCookie* cookie ) cookiejar->setShowCookieDetails ( m_showDetails ); - KCookieAdvice advice = (result==QDialog::Accepted) ? KCookieAccept:KCookieReject; + KCookieAdvice advice = (result==TQDialog::Accepted) ? KCookieAccept:KCookieReject; int preferredPolicy = m_btnGrp->id( m_btnGrp->selected() ); cookiejar->setPreferredDefaultPolicy( preferredPolicy ); @@ -257,17 +257,17 @@ KCookieAdvice KCookieWin::advice( KCookieJar *cookiejar, KHttpCookie* cookie ) } KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount, - QWidget* parent, const char* name ) - :QGroupBox( parent, name ) + TQWidget* parent, const char* name ) + :TQGroupBox( parent, name ) { setTitle( i18n("Cookie Details") ); - QGridLayout* grid = new QGridLayout( this, 9, 2, + TQGridLayout* grid = new TQGridLayout( this, 9, 2, KDialog::spacingHint(), KDialog::marginHint() ); grid->addRowSpacing( 0, fontMetrics().lineSpacing() ); grid->setColStretch( 1, 3 ); - QLabel* label = new QLabel( i18n("Name:"), this ); + TQLabel* label = new TQLabel( i18n("Name:"), this ); grid->addWidget( label, 1, 0 ); m_name = new KLineEdit( this ); m_name->setReadOnly( true ); @@ -275,35 +275,35 @@ KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount, grid->addWidget( m_name, 1 ,1 ); //Add the value - label = new QLabel( i18n("Value:"), this ); + label = new TQLabel( i18n("Value:"), this ); grid->addWidget( label, 2, 0 ); m_value = new KLineEdit( this ); m_value->setReadOnly( true ); m_value->setMaximumWidth( fontMetrics().maxWidth() * 25 ); grid->addWidget( m_value, 2, 1); - label = new QLabel( i18n("Expires:"), this ); + label = new TQLabel( i18n("Expires:"), this ); grid->addWidget( label, 3, 0 ); m_expires = new KLineEdit( this ); m_expires->setReadOnly( true ); m_expires->setMaximumWidth(fontMetrics().maxWidth() * 25 ); grid->addWidget( m_expires, 3, 1); - label = new QLabel( i18n("Path:"), this ); + label = new TQLabel( i18n("Path:"), this ); grid->addWidget( label, 4, 0 ); m_path = new KLineEdit( this ); m_path->setReadOnly( true ); m_path->setMaximumWidth( fontMetrics().maxWidth() * 25 ); grid->addWidget( m_path, 4, 1); - label = new QLabel( i18n("Domain:"), this ); + label = new TQLabel( i18n("Domain:"), this ); grid->addWidget( label, 5, 0 ); m_domain = new KLineEdit( this ); m_domain->setReadOnly( true ); m_domain->setMaximumWidth( fontMetrics().maxWidth() * 25 ); grid->addWidget( m_domain, 5, 1); - label = new QLabel( i18n("Exposure:"), this ); + label = new TQLabel( i18n("Exposure:"), this ); grid->addWidget( label, 6, 0 ); m_secure = new KLineEdit( this ); m_secure->setReadOnly( true ); @@ -312,12 +312,12 @@ KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount, if ( cookieCount > 1 ) { - QPushButton* btnNext = new QPushButton( i18n("Next cookie","&Next >>"), this ); + TQPushButton* btnNext = new TQPushButton( i18n("Next cookie","&Next >>"), this ); btnNext->setFixedSize( btnNext->sizeHint() ); grid->addMultiCellWidget( btnNext, 8, 8, 0, 1 ); - connect( btnNext, SIGNAL(clicked()), SLOT(slotNextCookie()) ); + connect( btnNext, TQT_SIGNAL(clicked()), TQT_SLOT(slotNextCookie()) ); #ifndef QT_NO_TOOLTIP - QToolTip::add( btnNext, i18n("Show details of the next cookie") ); + TQToolTip::add( btnNext, i18n("Show details of the next cookie") ); #endif } m_cookieList = cookieList; @@ -354,13 +354,13 @@ void KCookieDetail::slotNextCookie() else m_domain->setText( m_cookie->domain() ); m_path->setText( m_cookie->path() ); - QDateTime cookiedate; + TQDateTime cookiedate; cookiedate.setTime_t( m_cookie->expireDate() ); if ( m_cookie->expireDate() ) m_expires->setText( KGlobal::locale()->formatDateTime(cookiedate) ); else m_expires->setText( i18n("End of Session") ); - QString sec; + TQString sec; if (m_cookie->isSecure()) { if (m_cookie->isHttpOnly()) diff --git a/kioslave/http/kcookiejar/kcookiewin.h b/kioslave/http/kcookiejar/kcookiewin.h index 30e92e7e0..926964dec 100644 --- a/kioslave/http/kcookiejar/kcookiewin.h +++ b/kioslave/http/kcookiejar/kcookiewin.h @@ -27,7 +27,7 @@ #ifndef _KCOOKIEWIN_H_ #define _KCOOKIEWIN_H_ -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <kdialog.h> #include "kcookiejar.h" @@ -42,7 +42,7 @@ class KCookieDetail : public QGroupBox Q_OBJECT public : - KCookieDetail( KHttpCookieList cookieList, int cookieCount, QWidget *parent=0, + KCookieDetail( KHttpCookieList cookieList, int cookieCount, TQWidget *parent=0, const char *name=0 ); ~KCookieDetail(); @@ -66,15 +66,15 @@ class KCookieWin : public KDialog Q_OBJECT public : - KCookieWin( QWidget *parent, KHttpCookieList cookieList, int defaultButton=0, + KCookieWin( TQWidget *parent, KHttpCookieList cookieList, int defaultButton=0, bool showDetails=false ); ~KCookieWin(); KCookieAdvice advice( KCookieJar *cookiejar, KHttpCookie* cookie ); private : - QPushButton* m_button; - QVButtonGroup* m_btnGrp; + TQPushButton* m_button; + TQVButtonGroup* m_btnGrp; KCookieDetail* m_detailView; bool m_showDetails; diff --git a/kioslave/http/kcookiejar/main.cpp b/kioslave/http/kcookiejar/main.cpp index 1e943b939..1a47b398e 100644 --- a/kioslave/http/kcookiejar/main.cpp +++ b/kioslave/http/kcookiejar/main.cpp @@ -53,39 +53,39 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) kapp->dcopClient()->attach(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (args->isSet("remove-all")) { - kapp->dcopClient()->call( "kded", "kcookiejar", "deleteAllCookies()", QByteArray(), replyType, replyData); + kapp->dcopClient()->call( "kded", "kcookiejar", "deleteAllCookies()", TQByteArray(), replyType, replyData); } if (args->isSet("remove")) { - QString domain = args->getOption("remove"); - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQString domain = args->getOption("remove"); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << domain; - kapp->dcopClient()->call( "kded", "kcookiejar", "deleteCookiesFromDomain(QString)", params, replyType, replyData); + kapp->dcopClient()->call( "kded", "kcookiejar", "deleteCookiesFromDomain(TQString)", params, replyType, replyData); } if (args->isSet("shutdown")) { - QCString module = "kcookiejar"; - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQCString module = "kcookiejar"; + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << module; - kapp->dcopClient()->call( "kded", "kded", "unloadModule(QCString)", params, replyType, replyData); + kapp->dcopClient()->call( "kded", "kded", "unloadModule(TQCString)", params, replyType, replyData); } else if(args->isSet("reload-config")) { - kapp->dcopClient()->call( "kded", "kcookiejar", "reloadPolicy()", QByteArray(), replyType, replyData); + kapp->dcopClient()->call( "kded", "kcookiejar", "reloadPolicy()", TQByteArray(), replyType, replyData); } else { - QCString module = "kcookiejar"; - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQCString module = "kcookiejar"; + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << module; - kapp->dcopClient()->call( "kded", "kded", "loadModule(QCString)", params, replyType, replyData); + kapp->dcopClient()->call( "kded", "kded", "loadModule(TQCString)", params, replyType, replyData); } return 0; diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index f196f1820..0ad238ab7 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -21,8 +21,8 @@ #include <stdio.h> #include <stdlib.h> -#include <qdatetime.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqstring.h> #include <kapplication.h> #include <kaboutdata.h> @@ -34,8 +34,8 @@ static const char *description = "KCookiejar regression test"; static KCookieJar *jar; -static QCString *lastYear; -static QCString *nextYear; +static TQCString *lastYear; +static TQCString *nextYear; static KConfig *config = 0; @@ -45,13 +45,13 @@ static KCmdLineOptions options[] = KCmdLineLastOption }; -static void FAIL(const QString &msg) +static void FAIL(const TQString &msg) { qWarning("%s", msg.local8Bit().data()); exit(1); } -static void popArg(QCString &command, QCString & line) +static void popArg(TQCString &command, TQCString & line) { int i = line.find(' '); if (i != -1) @@ -67,17 +67,17 @@ static void popArg(QCString &command, QCString & line) } -static void popArg(QString &command, QCString & line) +static void popArg(TQString &command, TQCString & line) { int i = line.find(' '); if (i != -1) { - command = QString::fromLatin1(line.left(i)); + command = TQString::fromLatin1(line.left(i)); line = line.mid(i+1); } else { - command = QString::fromLatin1(line); + command = TQString::fromLatin1(line); line = 0; } } @@ -85,8 +85,8 @@ static void popArg(QString &command, QCString & line) static void clearConfig() { delete config; - QString file = locateLocal("config", "kcookiejar-testconfig"); - QFile::remove(file); + TQString file = locateLocal("config", "kcookiejar-testconfig"); + TQFile::remove(file); config = new KConfig(file); config->setGroup("Cookie Policy"); config->writeEntry("RejectCrossDomainCookies", false); @@ -103,8 +103,8 @@ static void clearCookies() static void saveCookies() { - QString file = locateLocal("config", "kcookiejar-testcookies"); - QFile::remove(file); + TQString file = locateLocal("config", "kcookiejar-testcookies"); + TQFile::remove(file); jar->saveCookies(file); delete jar; jar = new KCookieJar(); @@ -112,21 +112,21 @@ static void saveCookies() jar->loadCookies(file); } -static void processCookie(QCString &line) +static void processCookie(TQCString &line) { - QString policy; + TQString policy; popArg(policy, line); KCookieAdvice expectedAdvice = KCookieJar::strToAdvice(policy); if (expectedAdvice == KCookieDunno) - FAIL(QString("Unknown accept policy '%1'").arg(policy)); + FAIL(TQString("Unknown accept policy '%1'").arg(policy)); - QString urlStr; + TQString urlStr; popArg(urlStr, line); KURL url(urlStr); if (!url.isValid()) - FAIL(QString("Invalid URL '%1'").arg(urlStr)); + FAIL(TQString("Invalid URL '%1'").arg(urlStr)); if (url.isEmpty()) - FAIL(QString("Missing URL")); + FAIL(TQString("Missing URL")); line.replace("%LASTYEAR%", *lastYear); line.replace("%NEXTYEAR%", *nextYear); @@ -134,62 +134,62 @@ static void processCookie(QCString &line) KHttpCookieList list = jar->makeCookies(urlStr, line, 0); if (list.isEmpty()) - FAIL(QString("Failed to make cookies from: '%1'").arg(line)); + FAIL(TQString("Failed to make cookies from: '%1'").arg(line)); for(KHttpCookie *cookie = list.first(); cookie; cookie = list.next()) { KCookieAdvice cookieAdvice = jar->cookieAdvice(cookie); if (cookieAdvice != expectedAdvice) - FAIL(urlStr+QString("\n'%2'\nGot advice '%3' expected '%4'").arg(line) + FAIL(urlStr+TQString("\n'%2'\nGot advice '%3' expected '%4'").arg(line) .arg(KCookieJar::adviceToStr(cookieAdvice)) .arg(KCookieJar::adviceToStr(expectedAdvice))); jar->addCookie(cookie); } } -static void processCheck(QCString &line) +static void processCheck(TQCString &line) { - QString urlStr; + TQString urlStr; popArg(urlStr, line); KURL url(urlStr); if (!url.isValid()) - FAIL(QString("Invalid URL '%1'").arg(urlStr)); + FAIL(TQString("Invalid URL '%1'").arg(urlStr)); if (url.isEmpty()) - FAIL(QString("Missing URL")); + FAIL(TQString("Missing URL")); - QString expectedCookies = QString::fromLatin1(line); + TQString expectedCookies = TQString::fromLatin1(line); - QString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace(); + TQString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace(); if (cookies != expectedCookies) - FAIL(urlStr+QString("\nGot '%1' expected '%2'") + FAIL(urlStr+TQString("\nGot '%1' expected '%2'") .arg(cookies, expectedCookies)); } -static void processClear(QCString &line) +static void processClear(TQCString &line) { if (line == "CONFIG") clearConfig(); else if (line == "COOKIES") clearCookies(); else - FAIL(QString("Unknown command 'CLEAR %1'").arg(line)); + FAIL(TQString("Unknown command 'CLEAR %1'").arg(line)); } -static void processConfig(QCString &line) +static void processConfig(TQCString &line) { - QCString key; + TQCString key; popArg(key, line); if (key.isEmpty()) - FAIL(QString("Missing Key")); + FAIL(TQString("Missing Key")); config->setGroup("Cookie Policy"); config->writeEntry(key.data(), line.data()); jar->loadConfig(config, false); } -static void processLine(QCString line) +static void processLine(TQCString line) { if (line.isEmpty()) return; @@ -201,7 +201,7 @@ static void processLine(QCString line) return; } - QCString command; + TQCString command; popArg(command, line); if (command.isEmpty()) return; @@ -217,14 +217,14 @@ static void processLine(QCString line) else if (command == "SAVE") saveCookies(); else - FAIL(QString("Unknown command '%1'").arg(command)); + FAIL(TQString("Unknown command '%1'").arg(command)); } -static void runRegression(const QString &filename) +static void runRegression(const TQString &filename) { FILE *file = fopen(filename.local8Bit(), "r"); if (!file) - FAIL(QString("Can't open '%1'").arg(filename)); + FAIL(TQString("Can't open '%1'").arg(filename)); char buf[4096]; while (fgets(buf, sizeof(buf), file)) @@ -242,12 +242,12 @@ static void runRegression(const QString &filename) int main(int argc, char *argv[]) { - QString arg1; - QCString arg2; - QString result; + TQString arg1; + TQCString arg2; + TQString result; - lastYear = new QCString(QString("Fri, 04-May-%1 01:00:00 GMT").arg(QDate::currentDate().year()-1).utf8()); - nextYear = new QCString(QString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(QDate::currentDate().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); @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) clearConfig(); - QString file = args->url(0).path(); + TQString file = args->url(0).path(); runRegression(file); return 0; } diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index 8b7ebe66a..268805770 100644 --- a/kioslave/iso/iso.cpp +++ b/kioslave/iso/iso.cpp @@ -27,7 +27,7 @@ #include <unistd.h> #include <klargefile.h> -#include <qfile.h> +#include <tqfile.h> #include <kurl.h> #include <kdebug.h> #include <kinstance.h> @@ -78,7 +78,7 @@ int kdemain( int argc, char **argv ) } -kio_isoProtocol::kio_isoProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "iso", pool, app ) +kio_isoProtocol::kio_isoProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "iso", pool, app ) { kdDebug() << "kio_isoProtocol::kio_isoProtocol" << endl; m_isoFile = 0L; @@ -89,7 +89,7 @@ kio_isoProtocol::~kio_isoProtocol() delete m_isoFile; } -bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int startsec ) +bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int startsec ) { kdDebug() << "kio_isoProtocol::checkNewFile " << fullPath << " startsec: " << startsec << endl; @@ -100,7 +100,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts { // Has it changed ? struct stat statbuf; - if ( ::stat( QFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 ) + if ( ::stat( TQFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 ) { if ( m_mtime == statbuf.st_mtime ) { @@ -122,8 +122,8 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts // Find where the iso file is in the full path int pos = 0; - QString isoFile; - path = QString::null; + TQString isoFile; + path = TQString::null; int len = fullPath.length(); if ( len != 0 && fullPath[ len - 1 ] != '/' ) @@ -132,11 +132,11 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts kdDebug() << "the full path is " << fullPath << endl; while ( (pos=fullPath.find( '/', pos+1 )) != -1 ) { - QString tryPath = fullPath.left( pos ); + TQString tryPath = fullPath.left( pos ); kdDebug() << fullPath << " trying " << tryPath << endl; KDE_struct_stat statbuf; - if ( KDE_lstat( QFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) ) + if ( KDE_lstat( TQFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) ) { isoFile = tryPath; m_mtime = statbuf.st_mtime; @@ -150,7 +150,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts path.truncate( len - 1 ); } else - path = QString::fromLatin1("/"); + path = TQString::fromLatin1("/"); kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl; break; } @@ -234,10 +234,10 @@ void kio_isoProtocol::listDir( const KURL & url ) { kdDebug() << "kio_isoProtocol::listDir " << url.url() << endl; - QString path; + TQString path; if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) { - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); kdDebug() << "Checking (stat) on " << _path << endl; struct stat buff; if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { @@ -259,10 +259,10 @@ void kio_isoProtocol::listDir( const KURL & url ) if ( path.isEmpty() ) { - KURL redir( QString::fromLatin1( "iso:/") ); + KURL redir( TQString::fromLatin1( "iso:/") ); kdDebug() << "url.path()==" << url.path() << endl; if (url.hasRef()) redir.setRef(url.htmlRef()); - redir.setPath( url.path() + QString::fromLatin1("/") ); + redir.setPath( url.path() + TQString::fromLatin1("/") ); 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() << QString("Looking for entry %1").arg(path) << endl; + kdDebug() << TQString("Looking for entry %1").arg(path) << endl; const KArchiveEntry* e = root->entry( path ); if ( !e ) { @@ -291,11 +291,11 @@ void kio_isoProtocol::listDir( const KURL & url ) dir = root; } - QStringList l = dir->entries(); + TQStringList l = dir->entries(); totalSize( l.count() ); UDSEntry entry; - QStringList::Iterator it = l.begin(); + TQStringList::Iterator it = l.begin(); for( ; it != l.end(); ++it ) { kdDebug() << (*it) << endl; @@ -315,7 +315,7 @@ void kio_isoProtocol::listDir( const KURL & url ) void kio_isoProtocol::stat( const KURL & url ) { - QString path; + TQString path; UDSEntry entry; kdDebug() << "kio_isoProtocol::stat " << url.url() << endl; @@ -323,7 +323,7 @@ void kio_isoProtocol::stat( const KURL & url ) { // We may be looking at a real directory - this happens // when pressing up after being in the root of an archive - QCString _path( QFile::encodeName(url.path())); + TQCString _path( TQFile::encodeName(url.path())); kdDebug() << "kio_isoProtocol::stat (stat) on " << _path << endl; struct stat buff; if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { @@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url ) const KArchiveEntry* isoEntry; if ( path.isEmpty() ) { - path = QString::fromLatin1( "/" ); + path = TQString::fromLatin1( "/" ); isoEntry = root; } else { isoEntry = root->entry( path ); @@ -371,11 +371,11 @@ void kio_isoProtocol::stat( const KURL & url ) finished(); } -void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const QString &path ) +void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &path ) { unsigned long long size, pos = 0; bool mime=false,zlib=false; - QByteArray fileData, pointer_block, inbuf, outbuf; + TQByteArray fileData, pointer_block, inbuf, outbuf; char *pptr = 0; compressed_file_header *hdr; int block_shift; @@ -489,7 +489,7 @@ void kio_isoProtocol::get( const KURL & url ) { kdDebug() << "kio_isoProtocol::get" << url.url() << endl; - QString path; + TQString path; if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) { error( KIO::ERR_DOES_NOT_EXIST, url.path() ); diff --git a/kioslave/iso/iso.h b/kioslave/iso/iso.h index 079f68e6a..6b16b6389 100644 --- a/kioslave/iso/iso.h +++ b/kioslave/iso/iso.h @@ -31,7 +31,7 @@ class KIso; class kio_isoProtocol : public KIO::SlaveBase { public: - kio_isoProtocol( const QCString &pool, const QCString &app ); + kio_isoProtocol( const TQCString &pool, const TQCString &app ); virtual ~kio_isoProtocol(); virtual void listDir( const KURL & url ); @@ -39,9 +39,9 @@ public: virtual void get( const KURL & url ); protected: - void getFile( const KIsoFile *isoFileEntry, const QString &path ); + void getFile( const KIsoFile *isoFileEntry, const TQString &path ); void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry ); - bool checkNewFile( QString fullPath, QString & path, int startsec ); + bool checkNewFile( TQString fullPath, TQString & path, int startsec ); KIso * m_isoFile; time_t m_mtime; diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp index 6bc4241fe..dff111bff 100644 --- a/kioslave/iso/kiso.cpp +++ b/kioslave/iso/kiso.cpp @@ -27,9 +27,9 @@ #include <sys/types.h> #include <sys/stat.h> -#include <qcstring.h> -#include <qdir.h> -#include <qfile.h> +#include <tqcstring.h> +#include <tqdir.h> +#include <tqfile.h> #include <kdebug.h> #include <kurl.h> #include <kmimetype.h> @@ -102,16 +102,16 @@ class KIso::KIsoPrivate { public: KIsoPrivate() {} - QStringList dirList; + TQStringList dirList; }; -KIso::KIso( const QString& filename, const QString & _mimetype ) +KIso::KIso( const TQString& filename, const TQString & _mimetype ) : KArchive( 0L ) { m_startsec = -1; m_filename = filename; d = new KIsoPrivate; - QString mimetype( _mimetype ); + TQString mimetype( _mimetype ); bool forced = true; if ( mimetype.isEmpty() ) { @@ -128,7 +128,7 @@ KIso::KIso( const QString& filename, const QString & _mimetype ) else { // Something else. Check if it's not really gzip though (e.g. for KOffice docs) - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_ReadOnly ) ) { unsigned char firstByte = file.getch(); @@ -152,8 +152,8 @@ KIso::KIso( const QString& filename, const QString & _mimetype ) prepareDevice( filename, mimetype, forced ); } -void KIso::prepareDevice( const QString & filename, - const QString & mimetype, bool forced ) +void KIso::prepareDevice( const TQString & filename, + const TQString & mimetype, bool forced ) { /* 'hack' for Qt's false assumption that only S_ISREG is seekable */ if( "inode/blockdevice" == mimetype ) @@ -164,14 +164,14 @@ void KIso::prepareDevice( const QString & filename, || "application/x-bzip2" == mimetype) forced = true; - QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced ); + TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced ); if( dev ) setDevice( dev ); } } -KIso::KIso( QIODevice * dev ) +KIso::KIso( TQIODevice * dev ) : KArchive( dev ) { d = new KIsoPrivate; @@ -190,7 +190,7 @@ KIso::~KIso() /* callback function for libisofs */ static int readf(char *buf, int start, int len,void *udata) { - QIODevice* dev = ( static_cast<KIso*> (udata) )->device(); + TQIODevice* dev = ( static_cast<KIso*> (udata) )->device(); if (dev->at(start<<11)) { if ((dev->readBlock(buf, len<<11)) != -1) return (len); @@ -204,7 +204,7 @@ static int readf(char *buf, int start, int len,void *udata) { static int mycallb(struct iso_directory_record *idr,void *udata) { KIso *iso = static_cast<KIso*> (udata); - QString path,user,group,symlink; + TQString path,user,group,symlink; int i; int access; int time,cdate,adate; @@ -249,7 +249,7 @@ static int mycallb(struct iso_directory_record *idr,void *udata) { if (!special) { if (iso->joliet) { for (i=0;i<(isonum_711(idr->name_len)-1);i+=2) { - QChar ch( be2me_16(*((ushort*)&(idr->name[i]))) ); + TQChar ch( be2me_16(*((ushort*)&(idr->name[i]))) ); if (ch==';') break; path+=ch; } @@ -292,12 +292,12 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) { int i,size; boot_head boot; boot_entry *be; - QString path; + TQString path; KIsoFile *entry; entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR, dirent->date(), dirent->adate(), dirent->cdate(), - dirent->user(), dirent->group(), QString::null, + dirent->user(), dirent->group(), TQString::null, isonum_731(bootdesc->boot_catalog)<<11, 2048 ); dirent->addEntry(entry); if (!ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,this)) { @@ -307,10 +307,10 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) { size=BootImageSize( isonum_711(((struct default_entry*) be->data)->media), isonum_721(((struct default_entry*) be->data)->seccount)); path="Default Image"; - if (i>1) path += " (" + QString::number(i) + ")"; + if (i>1) path += " (" + TQString::number(i) + ")"; entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR, dirent->date(), dirent->adate(), dirent->cdate(), - dirent->user(), dirent->group(), QString::null, + dirent->user(), dirent->group(), TQString::null, isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 ); dirent->addEntry(entry); be=be->next; @@ -335,7 +335,7 @@ void KIso::readParams() bool KIso::openArchive( int mode ) { iso_vol_desc *desc; - QString path,tmp,uid,gid; + TQString path,tmp,uid,gid; struct stat buf; int tracks[2*100],trackno=0,i,access,c_b,c_i,c_j; KArchiveDirectory *root; @@ -375,10 +375,10 @@ bool KIso::openArchive( int mode ) c_b=1;c_i=1;c_j=1; root=rootDir(); if (trackno>1) { - path=QString::null; - QTextOStream(&path) << "Track " << tracks[(i<<1)+1]; + path=TQString::null; + TQTextOStream(&path) << "Track " << tracks[(i<<1)+1]; root = new KIsoDirectory( this, path, access | S_IFDIR, - buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null ); rootDir()->addEntry(root); } @@ -395,10 +395,10 @@ bool KIso::openArchive( int mode ) bootdesc=(struct el_torito_boot_descriptor*) &(desc->data); if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) { path="El Torito Boot"; - if (c_b>1) path += " (" + QString::number(c_b) + ")"; + if (c_b>1) path += " (" + TQString::number(c_b) + ")"; dirent = new KIsoDirectory( this, path, access | S_IFDIR, - buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null ); root->addEntry(dirent); addBoot(bootdesc); @@ -411,14 +411,14 @@ bool KIso::openArchive( int mode ) idr=(struct iso_directory_record*) &( ((struct iso_primary_descriptor*) &desc->data)->root_directory_record); joliet = JolietLevel(&desc->data); if (joliet) { - QTextOStream(&path) << "Joliet level " << joliet; - if (c_j>1) path += " (" + QString::number(c_j) + ")"; + TQTextOStream(&path) << "Joliet level " << joliet; + if (c_j>1) path += " (" + TQString::number(c_j) + ")"; } else { path = "ISO9660"; - if (c_i>1) path += " (" + QString::number(c_i) + ")"; + if (c_i>1) path += " (" + TQString::number(c_i) + ")"; } dirent = new KIsoDirectory( this, path, access | S_IFDIR, - buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null ); root->addEntry(dirent); level=0; mycallb(idr, this ); @@ -439,12 +439,12 @@ bool KIso::closeArchive() return true; } -bool KIso::writeDir( const QString&, const QString&, const QString& ) +bool KIso::writeDir( const TQString&, const TQString&, const TQString& ) { return false; } -bool KIso::prepareWriting( const QString&, const QString&, const QString&, uint) +bool KIso::prepareWriting( const TQString&, const TQString&, const TQString&, uint) { return false; } diff --git a/kioslave/iso/kiso.h b/kioslave/iso/kiso.h index ceddb4a0f..c488dd0cb 100644 --- a/kioslave/iso/kiso.h +++ b/kioslave/iso/kiso.h @@ -25,10 +25,10 @@ #include <sys/stat.h> #include <sys/types.h> -#include <qdatetime.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qdict.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdict.h> #include "kisofile.h" #include "kisodirectory.h" @@ -50,15 +50,15 @@ public: * Do not use application/x-tgz or so. Only the compression layer ! * If the mimetype is ommitted, it will be determined from the filename. */ - KIso( const QString& filename, const QString & mimetype = QString::null ); + KIso( const TQString& filename, const TQString & mimetype = TQString::null ); /** * Creates an instance that operates on the given device. - * The device can be compressed (KFilterDev) or not (QFile, etc.). - * WARNING: don't assume that giving a QFile here will decompress the file, + * The device can be compressed (KFilterDev) or not (TQFile, etc.). + * WARNING: don't assume that giving a TQFile here will decompress the file, * in case it's compressed! */ - KIso( QIODevice * dev ); + KIso( TQIODevice * dev ); /** * If the .iso is still opened, then it will be @@ -68,12 +68,12 @@ public: /** * The name of the os file, as passed to the constructor - * Null if you used the QIODevice constructor. + * Null if you used the TQIODevice constructor. */ - QString fileName() { return m_filename; } + TQString fileName() { return m_filename; } - bool writeDir( const QString& , const QString& , const QString& ); - bool prepareWriting( const QString& , const QString& , const QString& , uint ); + bool writeDir( const TQString& , const TQString& , const TQString& ); + bool prepareWriting( const TQString& , const TQString& , const TQString& , uint ); bool doneWriting( uint ); void setStartSec(int startsec) { m_startsec = startsec; } @@ -98,10 +98,10 @@ private: * @internal */ void addBoot(struct el_torito_boot_descriptor* bootdesc); - void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false ); + void prepareDevice( const TQString & filename, const TQString & mimetype, bool forced = false ); int m_startsec; - QString m_filename; + TQString m_filename; protected: virtual void virtual_hook( int id, void* data ); private: diff --git a/kioslave/iso/kisodirectory.cpp b/kioslave/iso/kisodirectory.cpp index f354383e1..74987a232 100644 --- a/kioslave/iso/kisodirectory.cpp +++ b/kioslave/iso/kisodirectory.cpp @@ -17,9 +17,9 @@ #include "kisodirectory.h" -KIsoDirectory::KIsoDirectory( KArchive* archive, const QString& name, int access, - int date, int adate, int cdate, const QString& user, const QString& group, - const QString& symlink) : +KIsoDirectory::KIsoDirectory( KArchive* archive, const TQString& name, int access, + int date, int adate, int cdate, const TQString& user, const TQString& group, + const TQString& symlink) : KArchiveDirectory(archive, name, access, date, user, group, symlink) { diff --git a/kioslave/iso/kisodirectory.h b/kioslave/iso/kisodirectory.h index 0b59719d4..74045ac75 100644 --- a/kioslave/iso/kisodirectory.h +++ b/kioslave/iso/kisodirectory.h @@ -18,7 +18,7 @@ #ifndef KISODIRECTORY_H #define KISODIRECTORY_H -#include <qstring.h> +#include <tqstring.h> #include <karchive.h> /** @@ -27,9 +27,9 @@ class KIsoDirectory : public KArchiveDirectory { public: - KIsoDirectory( KArchive* archive, const QString& name, int access, int date, - int adate,int cdate, const QString& user, const QString& group, - const QString& symlink); + KIsoDirectory( KArchive* archive, const TQString& name, int access, int date, + int adate,int cdate, const TQString& user, const TQString& group, + const TQString& symlink); ~KIsoDirectory(); int adate() const { return m_adate; } int cdate() const { return m_cdate; } diff --git a/kioslave/iso/kisofile.cpp b/kioslave/iso/kisofile.cpp index 1d23b9c36..afac16b74 100644 --- a/kioslave/iso/kisofile.cpp +++ b/kioslave/iso/kisofile.cpp @@ -18,9 +18,9 @@ #include "kisofile.h" #include <kdebug.h> -KIsoFile::KIsoFile( KArchive* archive, const QString& name, int access, - int date, int adate,int cdate, const QString& user, const QString& group, - const QString& symlink,int pos, int size) : +KIsoFile::KIsoFile( KArchive* archive, const TQString& name, int access, + int date, int adate,int cdate, const TQString& user, const TQString& group, + const TQString& symlink,int pos, int size) : KArchiveFile(archive, name, access, date, user, group, symlink, pos, size) { @@ -38,8 +38,8 @@ void KIsoFile::setZF(char algo[2],char parms[2],int realsize) { m_realsize=realsize; } -QByteArray KIsoFile::data(long long pos, int count) const { - QByteArray r; +TQByteArray KIsoFile::data(long long pos, int count) const { + TQByteArray r; int rlen; if ( archive()->device()->at(position()+pos) && diff --git a/kioslave/iso/kisofile.h b/kioslave/iso/kisofile.h index a30fc758c..193509cf6 100644 --- a/kioslave/iso/kisofile.h +++ b/kioslave/iso/kisofile.h @@ -18,7 +18,7 @@ #ifndef KISOFILE_H #define KISOFILE_H -#include <qstring.h> +#include <tqstring.h> #include <karchive.h> /** @@ -27,16 +27,16 @@ class KIsoFile : public KArchiveFile { public: - KIsoFile( KArchive* archive, const QString& name, int access, int date, - int adate,int cdate, const QString& user, const QString& group, - const QString& symlink, int pos, int size); + KIsoFile( KArchive* archive, const TQString& name, int access, int date, + int adate,int cdate, const TQString& user, const TQString& group, + const TQString& symlink, int pos, int size); ~KIsoFile(); void setZF(char algo[2],char parms[2],int realsize); int adate() const { return m_adate; } int cdate() const { return m_cdate; } long long realsize() const { return m_realsize; } - virtual QByteArray data(long long pos, int count) const; + virtual TQByteArray data(long long pos, int count) const; private: /* hide this member function, it's broken by design, because the full data often requires too much memory */ diff --git a/kioslave/iso/qfilehack.cpp b/kioslave/iso/qfilehack.cpp index 6f0b99d4a..f4f788f25 100644 --- a/kioslave/iso/qfilehack.cpp +++ b/kioslave/iso/qfilehack.cpp @@ -20,7 +20,7 @@ QFileHack::QFileHack(){ } -QFileHack::QFileHack( const QString & name ) : QFile(name) { +QFileHack::QFileHack( const TQString & name ) : TQFile(name) { } QFileHack::~QFileHack(){ @@ -32,7 +32,7 @@ bool QFileHack::open ( int m ) { #ifdef __linux__ m |= IO_Async; //On linux, set O_NONBLOCK, opens CD-ROMs faster #endif - ret=QFile::open(m); + ret=TQFile::open(m); if (ret && isSequentialAccess() ) { setType(IO_Direct); } diff --git a/kioslave/iso/qfilehack.h b/kioslave/iso/qfilehack.h index 5e9e247d0..3f0b1f6a6 100644 --- a/kioslave/iso/qfilehack.h +++ b/kioslave/iso/qfilehack.h @@ -18,8 +18,8 @@ #ifndef QFILEHACK_H #define QFILEHACK_H -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> /** *@author Szombathelyi György @@ -27,10 +27,10 @@ * block devices for example? */ -class QFileHack : public QFile { +class QFileHack : public TQFile { public: QFileHack(); - QFileHack( const QString & name ); + QFileHack( const TQString & name ); ~QFileHack(); virtual bool open ( int m ); }; diff --git a/kioslave/metainfo/metainfo.cpp b/kioslave/metainfo/metainfo.cpp index 0e4814b33..21e24e428 100644 --- a/kioslave/metainfo/metainfo.cpp +++ b/kioslave/metainfo/metainfo.cpp @@ -56,7 +56,7 @@ int kdemain(int argc, char **argv) return 0; } -MetaInfoProtocol::MetaInfoProtocol(const QCString &pool, const QCString &app) +MetaInfoProtocol::MetaInfoProtocol(const TQCString &pool, const TQCString &app) : SlaveBase("metainfo", pool, app) { } @@ -67,11 +67,11 @@ MetaInfoProtocol::~MetaInfoProtocol() void MetaInfoProtocol::get(const KURL &url) { - QString mimeType = metaData("mimeType"); + TQString mimeType = metaData("mimeType"); KFileMetaInfo info(url.path(), mimeType); - QByteArray arr; - QDataStream stream(arr, IO_WriteOnly); + TQByteArray arr; + TQDataStream stream(arr, IO_WriteOnly); stream << info; @@ -81,12 +81,12 @@ void MetaInfoProtocol::get(const KURL &url) void MetaInfoProtocol::put(const KURL& url, int, bool, bool) { - QString mimeType = metaData("mimeType"); + TQString mimeType = metaData("mimeType"); KFileMetaInfo info; - QByteArray arr; + TQByteArray arr; readData(arr); - QDataStream stream(arr, IO_ReadOnly); + TQDataStream stream(arr, IO_ReadOnly); stream >> info; diff --git a/kioslave/metainfo/metainfo.h b/kioslave/metainfo/metainfo.h index de2a6b055..491da62eb 100644 --- a/kioslave/metainfo/metainfo.h +++ b/kioslave/metainfo/metainfo.h @@ -26,7 +26,7 @@ class MetaInfoProtocol : public KIO::SlaveBase { public: - MetaInfoProtocol(const QCString &pool, const QCString &app); + MetaInfoProtocol(const TQCString &pool, const TQCString &app); virtual ~MetaInfoProtocol(); virtual void get(const KURL &url); |