kio_mhtml: RFC2047 decoder
Daniel Teske
teske at squorn.de
Mon Jan 17 23:07:23 GMT 2005
>tmpIn=(const char *)encodedText;
>// tmpIn is QCString and encodedText is QString
>
>
The encodedText is converted to const char * by calling
QString::operator const char*(), there is a QCString::operator = ()
which takes a const char.
>QTextCodec *codec = QTextCodec::codecForName(charset);
>// charset is QString
>
>
The charset is automatically converted to const char * by calling
*QString::**operator const char **
<http://doc.trolltech.com/3.3/qstring.html#operator-const-char-*> () const
If C++ detects a mismatch between the types of parameter you supplied
and the type the function it will at most call one function to convert
between them.
Apart from operator type conversions, C++ will use any non explicit one
parameter constructor.
(This is the reason why one parameter constructors should be always
explicit.)
daniel
More information about the kfm-devel
mailing list