diff options
author | Thiago Macieira <thiago@kde.org> | 2011-07-08 15:49:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-11 11:16:22 +0200 |
commit | d9bec0a1d2d7ac18a9a8ae5eff8dd8204eb6bf70 (patch) | |
tree | c8b6b481bc85d0d463a0d7b92be1ed7504b71cfd /src/corelib/tools/qchar.h | |
parent | 8cc3b1a42683c72b6c192ecfda28245dc561eeee (diff) |
Remove Qt 4.3 binary compatibility for MSVC
When we removed the useless "const" in the return type, we broke
compatibility with a few compilers that include the return type in the
mangling. We don't need that anymore in Qt 5.
This change should have had a ### Qt5 mark everywhere, not just in a
comment in qstring.cpp.
Change-Id: I8839f8dc540b34e57a3efdb160a1c015f7328422
Merge-request: 13
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1385
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/corelib/tools/qchar.h')
-rw-r--r-- | src/corelib/tools/qchar.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index b7793403bd..cd30dace09 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -56,13 +56,8 @@ struct QLatin1Char { public: inline explicit QLatin1Char(char c) : ch(c) {} -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE - inline const char toLatin1() const { return ch; } - inline const ushort unicode() const { return ushort(uchar(ch)); } -#else inline char toLatin1() const { return ch; } inline ushort unicode() const { return ushort(uchar(ch)); } -#endif private: char ch; @@ -230,15 +225,9 @@ public: UnicodeVersion unicodeVersion() const; -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE - const char toAscii() const; - inline const char toLatin1() const; - inline const ushort unicode() const { return ucs; } -#else char toAscii() const; inline char toLatin1() const; inline ushort unicode() const { return ucs; } -#endif #ifdef Q_NO_PACKED_REFERENCE inline ushort &unicode() { return const_cast<ushort&>(ucs); } #else @@ -339,11 +328,7 @@ Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE); inline QChar::QChar() : ucs(0) {} -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -inline const char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); } -#else inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); } -#endif inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); } inline QChar::QChar(uchar c, uchar r) : ucs(ushort((r << 8) | c)){} |