[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml/misc
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2009-04-30 0:07:48
Message-ID: 1241050068.011560.14305.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 961354 by ggarand:

enable the checking of @charset, that was never enabled for ill-know
reasons.
The check is really simplistic but will do for know.


 M  +1 -3      loader.cpp  
 M  +1 -0      loader.h  


--- trunk/KDE/kdelibs/khtml/misc/loader.cpp #961353:961354
@@ -277,7 +277,7 @@
     buffer.close();
     setSize(buffer.buffer().size());
 
-//     QString charset = checkCharset( buffer.buffer() );
+    m_charset = checkCharset( buffer.buffer() );
     QTextCodec* c = 0;
     if (!m_charset.isEmpty()) {
         c = KGlobal::charsets()->codecForName(m_charset);
@@ -317,7 +317,6 @@
         it.next().value()->error( m_err, m_errText );
 }
 
-#if 0
 QString CachedCSSStyleSheet::checkCharset(const QByteArray& buffer ) const
 {
     int s = buffer.size();
@@ -337,7 +336,6 @@
     }
     return m_charset;
 }
-#endif
 
 // -------------------------------------------------------------------------------------------
 
--- trunk/KDE/kdelibs/khtml/misc/loader.h #961353:961354
@@ -231,6 +231,7 @@
         virtual bool schedule() const { return true; }
         void setCharsetHint( const QString& charset ) { m_charsetHint = charset; }
         void setCharset( const QString& charset ) { m_charset = charset; }
+        QString checkCharset(const QByteArray& buffer ) const;
 
 
     protected:
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic