summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2011-07-08 15:49:26 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-11 11:16:22 +0200
commitd9bec0a1d2d7ac18a9a8ae5eff8dd8204eb6bf70 (patch)
treec8b6b481bc85d0d463a0d7b92be1ed7504b71cfd /src/corelib/tools/qbytearray.h
parent8cc3b1a42683c72b6c192ecfda28245dc561eeee (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/qbytearray.h')
-rw-r--r--src/corelib/tools/qbytearray.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 9f54f1a831..26cf2af59c 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -172,15 +172,9 @@ public:
inline bool isSharedWith(const QByteArray &other) const { return d == other.d; }
void clear();
-#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
- const char at(int i) const;
- const char operator[](int i) const;
- const char operator[](uint i) const;
-#else
char at(int i) const;
char operator[](int i) const;
char operator[](uint i) const;
-#endif
QByteRef operator[](int i);
QByteRef operator[](uint i);
@@ -359,21 +353,12 @@ inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); }
inline int QByteArray::size() const
{ return d->size; }
-#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
-inline const char QByteArray::at(int i) const
-{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
-inline const char QByteArray::operator[](int i) const
-{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
-inline const char QByteArray::operator[](uint i) const
-{ Q_ASSERT(i < uint(size())); return d->data[i]; }
-#else
inline char QByteArray::at(int i) const
{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
inline char QByteArray::operator[](int i) const
{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
inline char QByteArray::operator[](uint i) const
{ Q_ASSERT(i < uint(size())); return d->data[i]; }
-#endif
inline bool QByteArray::isEmpty() const
{ return d->size == 0; }
@@ -412,13 +397,8 @@ class Q_CORE_EXPORT QByteRef {
: a(array),i(idx) {}
friend class QByteArray;
public:
-#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
- inline operator const char() const
- { return i < a.d->size ? a.d->data[i] : char(0); }
-#else
inline operator char() const
{ return i < a.d->size ? a.d->data[i] : char(0); }
-#endif
inline QByteRef &operator=(char c)
{ if (i >= a.d->size) a.expand(i); else a.detach();
a.d->data[i] = c; return *this; }