CVS commit by thiago: Moving Waldo's encodingMib() function into KRemoteEncoding. Looks cleaner this way (no C casts). CCMAIL:bastian@kde.org M +6 -0 kio/kio/kremoteencoding.h 1.6 M +1 -7 kioslave/http/http.cc 1.640 --- kdelibs/kio/kio/kremoteencoding.h #1.5:1.6 @@ -98,4 +98,10 @@ public: /** + * Returns the MIB for the codec being used. + */ + inline int encodingMib() const + { return codec->mibEnum(); } + + /** * Sets the encoding being used. * This function does not change the global configuration. --- kdelibs/kioslave/http/http.cc #1.639:1.640 @@ -632,10 +632,4 @@ void HTTPProtocol::davSetRequest( const } -class KRemoteWebDavEncoding : public KRemoteEncoding -{ -public: - int encodingMib() { return codec->mibEnum(); } -}; - void HTTPProtocol::davStatList( const KURL& url, bool stat ) { @@ -725,5 +719,5 @@ void HTTPProtocol::davStatList( const KU QString urlStr = href.text(); - int encoding = ((KRemoteWebDavEncoding*)remoteEncoding())->encodingMib(); + 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