From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kio/misc/kpac/README.wpad | 4 ++-- kio/misc/kpac/discovery.cpp | 6 +++--- kio/misc/kpac/downloader.h | 2 +- kio/misc/kpac/proxyscout.cpp | 4 ++-- kio/misc/kpac/script.cpp | 32 ++++++++++++++++---------------- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'kio/misc/kpac') diff --git a/kio/misc/kpac/README.wpad b/kio/misc/kpac/README.wpad index ed18a36b5..f63d25764 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 tqfind the proxy settings. +users on their network to fully automatically find 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 tqfind +The WPAD part of the process (#1 above) described here is about how to find 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 193b46d98..7a84958f7 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 tqfind a usable proxy configuration script" ) ); + setError( i18n( "Could not find 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" tqcontains a SOA record) + // queried for a host called "wpad" contains a SOA record) bool firstQuery = m_hostname.isEmpty(); if ( ( firstQuery && !initHostName() ) || ( !firstQuery && !checkDomain() ) ) @@ -126,7 +126,7 @@ namespace KPAC return; } - int dot = m_hostname.tqfind( '.' ); + int dot = m_hostname.find( '.' ); 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 82418882f..05d8569cc 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 TQObject + class Downloader : public QObject { Q_OBJECT public: diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp index f843dc045..6cba79db6 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.tqfind( ":/", len ) != len ) + if ( !proxyURL.isValid() || proxy.find( ":/", len ) != len ) proxy.prepend("http://"); - BlackList::Iterator it = m_blackList.tqfind( proxy ); + BlackList::Iterator it = m_blackList.find( 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 752fb4cc5..55faef8a1 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.tqunicode(), s.length() * sizeof( UChar ) ); + std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) ); rep = Rep::create( data, s.length() ); } @@ -98,7 +98,7 @@ namespace virtual bool implementsCall() const { return true; } - static int tqfindString( const UString& s, const char* const* values ) + static int findString( 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 tqcontains a domain part + // @returns true if @p host doesn't contains 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 ).tqfind( "." ) == -1 ); + return Boolean( args[ 0 ].toString( exec ).find( "." ) == -1 ); } }; @@ -154,7 +154,7 @@ namespace { if ( args.size() != 2 ) return Undefined(); UString host = args[ 0 ].toString( exec ).toLower(); - if ( host.tqfind( "." ) == -1 ) return Boolean( true ); + if ( host.find( "." ) == -1 ) return Boolean( true ); UString fqdn = args[ 1 ].toString( exec ).toLower(); return Boolean( host == fqdn ); } @@ -173,9 +173,9 @@ namespace } }; - // isInNet( host, subnet, tqmask ) + // isInNet( host, subnet, mask ) // @returns true if @p host is within the IP subnet - // specified via @p subnet and @p tqmask + // specified via @p subnet and @p mask 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 tqmask = Address::parse( args[ 2 ].toString( exec ) ); - return Boolean( ( host & tqmask ) == ( subnet & tqmask ) ); + in_addr_t mask = Address::parse( args[ 2 ].toString( exec ) ); + return Boolean( ( host & mask ) == ( subnet & mask ) ); } 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 = tqfindString( args[ 0 ].toString( exec ), days ); + int d1 = findString( args[ 0 ].toString( exec ), days ); if ( d1 == -1 ) return Undefined(); - int d2 = tqfindString( args[ 1 ].toString( exec ), days ); + int d2 = findString( 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 = tqfindString( args[ i ].toString( exec ), months ); + else value = findString( 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 tqfindFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); - Object tqfindObj = Object::dynamicCast( tqfindFunc ); - if (!tqfindObj.isValid() || !tqfindObj.implementsCall()) + Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); + Object findObj = Object::dynamicCast( findFunc ); + if (!findObj.isValid() || !findObj.implementsCall()) throw Error( "No such function FindProxyForURL" ); Object thisObj; List args; args.append(String(url.url())); args.append(String(url.host())); - Value retval = tqfindObj.call( exec, thisObj, args ); + Value retval = findObj.call( exec, thisObj, args ); if ( exec->hadException() ) { Value ex = exec->exception(); -- cgit v1.2.1