diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kio/misc/kpac | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/misc/kpac')
-rw-r--r-- | kio/misc/kpac/README.wpad | 4 | ||||
-rw-r--r-- | kio/misc/kpac/discovery.cpp | 6 | ||||
-rw-r--r-- | kio/misc/kpac/downloader.h | 2 | ||||
-rw-r--r-- | kio/misc/kpac/proxyscout.cpp | 4 | ||||
-rw-r--r-- | kio/misc/kpac/script.cpp | 32 |
5 files changed, 24 insertions, 24 deletions
diff --git a/kio/misc/kpac/README.wpad b/kio/misc/kpac/README.wpad index f63d25764..ed18a36b5 100644 --- a/kio/misc/kpac/README.wpad +++ b/kio/misc/kpac/README.wpad @@ -2,7 +2,7 @@ Web Proxy Auto Discovery (WPAD) =============================== This README is intended for network administrators who want to enable the -users on their network to fully automatically find the proxy settings. +users on their network to fully automatically tqfind the proxy settings. Automatic proxy discovery works in two steps: 1) Find a configuration script @@ -12,7 +12,7 @@ The configuration script is a "PAC" (JavaScript) file just as in plain Proxy Auto Configuration as described here: http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html -The WPAD part of the process (#1 above) described here is about how to find +The WPAD part of the process (#1 above) described here is about how to tqfind this script without having the users enter its URL into the proxy settings. (All they have to do in a WPAD-enabled network is to select "Automatically detected script file" in KDE's proxy setup. diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp index 7a84958f7..193b46d98 100644 --- a/kio/misc/kpac/discovery.cpp +++ b/kio/misc/kpac/discovery.cpp @@ -113,11 +113,11 @@ namespace KPAC void Discovery::failed() { - setError( i18n( "Could not find a usable proxy configuration script" ) ); + setError( i18n( "Could not tqfind a usable proxy configuration script" ) ); // If this is the first DNS query, initialize our host name or abort // on failure. Otherwise abort if the current domain (which was already - // queried for a host called "wpad" contains a SOA record) + // queried for a host called "wpad" tqcontains a SOA record) bool firstQuery = m_hostname.isEmpty(); if ( ( firstQuery && !initHostName() ) || ( !firstQuery && !checkDomain() ) ) @@ -126,7 +126,7 @@ namespace KPAC return; } - int dot = m_hostname.find( '.' ); + int dot = m_hostname.tqfind( '.' ); if ( dot >= 0 ) { m_hostname.remove( 0, dot + 1 ); // remove one domain level diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h index 05d8569cc..82418882f 100644 --- a/kio/misc/kpac/downloader.h +++ b/kio/misc/kpac/downloader.h @@ -29,7 +29,7 @@ namespace KIO { class Job; } namespace KPAC { - class Downloader : public QObject + class Downloader : public TQObject { Q_OBJECT public: diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp index 6cba79db6..f843dc045 100644 --- a/kio/misc/kpac/proxyscout.cpp +++ b/kio/misc/kpac/proxyscout.cpp @@ -162,9 +162,9 @@ namespace KPAC // this particular case, simply calling setProtocol() on // it trashes the whole URL. int len = proxyURL.protocol().length(); - if ( !proxyURL.isValid() || proxy.find( ":/", len ) != len ) + if ( !proxyURL.isValid() || proxy.tqfind( ":/", len ) != len ) proxy.prepend("http://"); - BlackList::Iterator it = m_blackList.find( proxy ); + BlackList::Iterator it = m_blackList.tqfind( proxy ); if ( it == m_blackList.end() ) return proxy; else if ( std::time( 0 ) - *it > 1800 ) // 30 minutes { diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp index 55faef8a1..752fb4cc5 100644 --- a/kio/misc/kpac/script.cpp +++ b/kio/misc/kpac/script.cpp @@ -49,7 +49,7 @@ TQString UString::qstring() const UString::UString( const TQString &s ) { UChar* data = new UChar[ s.length() ]; - std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) ); + std::memcpy( data, s.tqunicode(), s.length() * sizeof( UChar ) ); rep = Rep::create( data, s.length() ); } @@ -98,7 +98,7 @@ namespace virtual bool implementsCall() const { return true; } - static int findString( const UString& s, const char* const* values ) + static int tqfindString( const UString& s, const char* const* values ) { int index = 0; UString lower = s.toLower(); @@ -123,13 +123,13 @@ namespace }; // isPlainHostName( host ) - // @returns true if @p host doesn't contains a domain part + // @returns true if @p host doesn't tqcontains a domain part struct IsPlainHostName : public Function { virtual Value call( ExecState* exec, Object&, const List& args ) { if ( args.size() != 1 ) return Undefined(); - return Boolean( args[ 0 ].toString( exec ).find( "." ) == -1 ); + return Boolean( args[ 0 ].toString( exec ).tqfind( "." ) == -1 ); } }; @@ -154,7 +154,7 @@ namespace { if ( args.size() != 2 ) return Undefined(); UString host = args[ 0 ].toString( exec ).toLower(); - if ( host.find( "." ) == -1 ) return Boolean( true ); + if ( host.tqfind( "." ) == -1 ) return Boolean( true ); UString fqdn = args[ 1 ].toString( exec ).toLower(); return Boolean( host == fqdn ); } @@ -173,9 +173,9 @@ namespace } }; - // isInNet( host, subnet, mask ) + // isInNet( host, subnet, tqmask ) // @returns true if @p host is within the IP subnet - // specified via @p subnet and @p mask + // specified via @p subnet and @p tqmask struct IsInNet : public Function { virtual Value call( ExecState* exec, Object&, const List& args ) @@ -185,8 +185,8 @@ namespace { in_addr_t host = Address::resolve( args[ 0 ].toString( exec ) ); in_addr_t subnet = Address::parse( args[ 1 ].toString( exec ) ); - in_addr_t mask = Address::parse( args[ 2 ].toString( exec ) ); - return Boolean( ( host & mask ) == ( subnet & mask ) ); + in_addr_t tqmask = Address::parse( args[ 2 ].toString( exec ) ); + return Boolean( ( host & tqmask ) == ( subnet & tqmask ) ); } catch ( const Address::Error& ) { @@ -259,10 +259,10 @@ namespace if ( args.size() < 1 || args.size() > 3 ) return Undefined(); static const char* const days[] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat", 0 }; - int d1 = findString( args[ 0 ].toString( exec ), days ); + int d1 = tqfindString( args[ 0 ].toString( exec ), days ); if ( d1 == -1 ) return Undefined(); - int d2 = findString( args[ 1 ].toString( exec ), days ); + int d2 = tqfindString( args[ 1 ].toString( exec ), days ); if ( d2 == -1 ) d2 = d1; return checkRange( getTime( exec, args )->tm_wday, d1, d2 ); } @@ -293,7 +293,7 @@ namespace int value = -1; if ( args[ i ].isA( NumberType ) ) value = args[ i ].toInteger( exec ); - else value = findString( args[ i ].toString( exec ), months ); + else value = tqfindString( args[ i ].toString( exec ), months ); if ( value >= 0 ) values.push_back( value ); else break; } @@ -441,16 +441,16 @@ namespace KPAC TQString Script::evaluate( const KURL& url ) { ExecState *exec = m_interpreter.globalExec(); - Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); - Object findObj = Object::dynamicCast( findFunc ); - if (!findObj.isValid() || !findObj.implementsCall()) + Value tqfindFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); + Object tqfindObj = Object::dynamicCast( tqfindFunc ); + if (!tqfindObj.isValid() || !tqfindObj.implementsCall()) throw Error( "No such function FindProxyForURL" ); Object thisObj; List args; args.append(String(url.url())); args.append(String(url.host())); - Value retval = findObj.call( exec, thisObj, args ); + Value retval = tqfindObj.call( exec, thisObj, args ); if ( exec->hadException() ) { Value ex = exec->exception(); |