From 703fb0c89c2eee56a1e613e67a446db9d4287929 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 25 Jan 2013 00:35:07 -0600 Subject: Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 --- kioslave/http/http.cc | 62 +++++++++++------------ kioslave/http/http.h | 24 ++++----- kioslave/http/kcookiejar/kcookiejar.cpp | 6 +-- kioslave/http/kcookiejar/kcookiejar.h | 6 +-- kioslave/http/kcookiejar/kcookieserver.cpp | 2 +- kioslave/http/kcookiejar/kcookieserver.h | 4 +- kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 4 +- 7 files changed, 54 insertions(+), 54 deletions(-) (limited to 'kioslave/http') diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index f6e714988..cbff13fdf 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -90,7 +90,7 @@ #include -using namespace KIO; +using namespace TDEIO; extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); @@ -185,7 +185,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header) } -#define NO_SIZE ((KIO::filesize_t) -1) +#define NO_SIZE ((TDEIO::filesize_t) -1) #ifdef HAVE_STRTOLL #define STRTOLL strtoll @@ -465,7 +465,7 @@ bool HTTPProtocol::checkRequestURL( const KURL& u ) if (m_request.hostname.isEmpty()) { - error( KIO::ERR_UNKNOWN_HOST, i18n("No host specified.")); + error( TDEIO::ERR_UNKNOWN_HOST, i18n("No host specified.")); return false; } @@ -619,15 +619,15 @@ void HTTPProtocol::stat(const KURL& url) // When downloading we assume it exists UDSEntry entry; UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = url.fileName(); entry.append( atom ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFREG; // a file entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = S_IRUSR | S_IRGRP | S_IROTH; // readable by everybody entry.append( atom ); @@ -762,7 +762,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) KURL thisURL ( urlStr, encoding ); - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; if ( thisURL.isValid() ) { // don't list the base dir of a listDir() @@ -811,7 +811,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) } } -void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) +void HTTPProtocol::davGeneric( const KURL& url, TDEIO::HTTP_METHOD method ) { kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davGeneric " << url.url() << endl; @@ -877,7 +877,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& if ( hasMetaData( "davRequestResponse" ) ) { - atom.m_uds = KIO::UDS_XML_PROPERTIES; + atom.m_uds = TDEIO::UDS_XML_PROPERTIES; TQDomDocument doc; doc.appendChild(prop); atom.m_str = doc.toString(); @@ -899,14 +899,14 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& if ( property.tagName() == "creationdate" ) { // Resource creation date. Should be is ISO 8601 format. - atom.m_uds = KIO::UDS_CREATION_TIME; + atom.m_uds = TDEIO::UDS_CREATION_TIME; atom.m_long = parseDateTime( property.text(), property.attribute("dt") ); entry.append( atom ); } else if ( property.tagName() == "getcontentlength" ) { // Content length (file size) - atom.m_uds = KIO::UDS_SIZE; + atom.m_uds = TDEIO::UDS_SIZE; atom.m_long = property.text().toULong(); entry.append( atom ); } @@ -952,7 +952,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& else if ( property.tagName() == "getlastmodified" ) { // Last modification date - atom.m_uds = KIO::UDS_MODIFICATION_TIME; + atom.m_uds = TDEIO::UDS_MODIFICATION_TIME; atom.m_long = parseDateTime( property.text(), property.attribute("dt") ); entry.append( atom ); @@ -1009,27 +1009,27 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& setMetaData( "davLockCount", TQString("%1").arg(lockCount) ); setMetaData( "davSupportedLockCount", TQString("%1").arg(supportedLockCount) ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = isDirectory ? S_IFDIR : S_IFREG; entry.append( atom ); if ( foundExecutable || isDirectory ) { // File was executable, or is a directory. - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = 0700; entry.append(atom); } else { - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = 0600; entry.append(atom); } if ( !isDirectory && !mimeType.isEmpty() ) { - atom.m_uds = KIO::UDS_MIME_TYPE; + atom.m_uds = TDEIO::UDS_MIME_TYPE; atom.m_str = mimeType; entry.append( atom ); } @@ -1553,7 +1553,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url ) url = m_request.url.url(); TQString action, errorString; - KIO::Error kError; + TDEIO::Error kError; // for 412 Precondition Failed TQString ow = i18n( "Otherwise, the request would have succeeded." ); @@ -1742,7 +1742,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url ) void HTTPProtocol::httpError() { TQString action, errorString; - KIO::Error kError; + TDEIO::Error kError; switch ( m_request.method ) { case HTTP_PUT: @@ -2187,10 +2187,10 @@ bool HTTPProtocol::httpOpen() { m_request.fcache = checkCacheEntry( ); - bool bCacheOnly = (m_request.cache == KIO::CC_CacheOnly); + bool bCacheOnly = (m_request.cache == TDEIO::CC_CacheOnly); bool bOffline = isOffline(m_request.doProxy ? m_proxyURL : m_request.url); - if (bOffline && (m_request.cache != KIO::CC_Reload)) - m_request.cache = KIO::CC_CacheOnly; + if (bOffline && (m_request.cache != TDEIO::CC_Reload)) + m_request.cache = TDEIO::CC_CacheOnly; if (m_request.cache == CC_Reload && m_request.fcache) { @@ -2198,7 +2198,7 @@ bool HTTPProtocol::httpOpen() fclose(m_request.fcache); m_request.fcache = 0; } - if ((m_request.cache == KIO::CC_CacheOnly) || (m_request.cache == KIO::CC_Cache)) + if ((m_request.cache == TDEIO::CC_CacheOnly) || (m_request.cache == TDEIO::CC_Cache)) m_request.bMustRevalidate = false; m_request.bCachedWrite = true; @@ -2429,8 +2429,8 @@ bool HTTPProtocol::httpOpen() if ( m_request.offset > 0 ) { - header += TQString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset)); - kdDebug(7103) << "kio_http : Range = " << KIO::number(m_request.offset) << endl; + header += TQString("Range: bytes=%1-\r\n").arg(TDEIO::number(m_request.offset)); + kdDebug(7103) << "kio_http : Range = " << TDEIO::number(m_request.offset) << endl; } if ( m_request.cache == CC_Reload ) @@ -4092,7 +4092,7 @@ void HTTPProtocol::special( const TQByteArray &data ) KURL url; int method; stream >> url >> method; - davGeneric( url, (KIO::HTTP_METHOD) method ); + davGeneric( url, (TDEIO::HTTP_METHOD) method ); break; } case 99: // Close Connection @@ -4343,7 +4343,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) bool useMD5 = !m_sContentMD5.isEmpty(); // Deal with the size of the file. - KIO::filesize_t sz = m_request.offset; + TDEIO::filesize_t sz = m_request.offset; if ( sz ) m_iSize += sz; @@ -4354,7 +4354,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) if ( !dataInternal ) { if ( (m_iSize > 0) && (m_iSize != NO_SIZE)) { totalSize(m_iSize); - infoMessage( i18n( "Retrieving %1 from %2...").arg(KIO::convertSize(m_iSize)) + infoMessage( i18n( "Retrieving %1 from %2...").arg(TDEIO::convertSize(m_iSize)) .arg( m_request.hostname ) ); } else @@ -4411,7 +4411,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) m_iBytesLeft = NO_SIZE; kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readBody: retrieve data. " - << KIO::number(m_iBytesLeft) << " left." << endl; + << TDEIO::number(m_iBytesLeft) << " left." << endl; // Main incoming loop... Gather everything while we can... m_cpMimeBuffer = false; @@ -4527,7 +4527,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) if (m_iBytesLeft == 0) { - kdDebug(7113) << "("<reparseConfiguration(); diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index eb64485ea..bb16d75d3 100644 --- a/kioslave/http/kcookiejar/kcookiejar.h +++ b/kioslave/http/kcookiejar/kcookiejar.h @@ -31,7 +31,7 @@ #include #include -class KConfig; +class TDEConfig; class KCookieJar; class KHttpCookie; class KHttpCookieList; @@ -146,12 +146,12 @@ public: /** * Save the cookie configuration */ - void saveConfig(KConfig *_config); + void saveConfig(TDEConfig *_config); /** * Load the cookie configuration */ - void loadConfig(KConfig *_config, bool reparse = false); + void loadConfig(TDEConfig *_config, bool reparse = false); /** * Looks for cookies in the cookie jar which are appropriate for _url. diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index da9c16ce7..94df40b63 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -88,7 +88,7 @@ KCookieServer::KCookieServer(const TQCString &name) mAdvicePending = false; mTimer = new TQTimer(); connect( mTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotSave())); - mConfig = new KConfig("kcookiejarrc"); + mConfig = new TDEConfig("kcookiejarrc"); mCookieJar->loadConfig( mConfig ); TQString filename = locateLocal("data", "kcookiejar/cookies"); diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h index 0c36f10b1..2cbb9ccf1 100644 --- a/kioslave/http/kcookiejar/kcookieserver.h +++ b/kioslave/http/kcookiejar/kcookieserver.h @@ -34,7 +34,7 @@ class KHttpCookie; class TQTimer; class RequestList; class DCOPClient; -class KConfig; +class TDEConfig; class KCookieServer : public KDEDModule { @@ -86,7 +86,7 @@ protected: TQTimer *mTimer; bool mAdvicePending; DCOPClient *mOldCookieServer; - KConfig *mConfig; + TDEConfig *mConfig; private: virtual int newInstance(TQValueList) { return 0; } diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 05f0ac0ea..236e2406b 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -36,7 +36,7 @@ static const char *description = "KCookiejar regression test"; static KCookieJar *jar; static TQCString *lastYear; static TQCString *nextYear; -static KConfig *config = 0; +static TDEConfig *config = 0; static KCmdLineOptions options[] = @@ -87,7 +87,7 @@ static void clearConfig() delete config; TQString file = locateLocal("config", "kcookiejar-testconfig"); TQFile::remove(file); - config = new KConfig(file); + config = new TDEConfig(file); config->setGroup("Cookie Policy"); config->writeEntry("RejectCrossDomainCookies", false); config->writeEntry("AcceptSessionCookies", false); -- cgit v1.2.1