Compatibility Members for QTextCodec

The following members of class QTextCodecare part of the Qt compatibility layer. We advise against using them in new code.

Public Functions

QByteArray fromUnicode(const QString & uc, int & lenInOut) const
QByteArray mimeName() const
QString toUnicode(const QByteArray & a, int len) const

Static Public Members

QTextCodec * codecForContent(const char * str, int size)
QTextCodec * codecForIndex(int i)
QTextCodec * codecForName(const char * hint, int accuracy)
const char * locale()

Member Function Documentation

[static] QTextCodec * QTextCodec::codecForContent(const char * str, int size)

This functionality is no longer provided by Qt. This compatibility function always returns a null pointer.

[static] QTextCodec * QTextCodec::codecForIndex(int i)

Use availableCodecs() or availableMibs() instead and iterate through the resulting list.

[static] QTextCodec * QTextCodec::codecForName(const char * hint, int accuracy)

Use the codecForName(const QByteArray &) overload instead.

QByteArray QTextCodec::fromUnicode(const QString & uc, int & lenInOut) const

This is an overloaded function.

[static] const char * QTextCodec::locale()

Returns a string representing the current language and sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil.

See also QLocale.

QByteArray QTextCodec::mimeName() const

Use name() instead.

QString QTextCodec::toUnicode(const QByteArray & a, int len) const

This is an overloaded function.

a contains the source characters; len contains the number of characters in a to use.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.