summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-17 18:10:19 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-01-06 19:38:24 +0100
commitdd8b75d8fb2503aed9e29fabf3cfd3a33a0efb5a (patch)
treea787e3cd2ec841bde3b797397690bb150a6bc5bb /src/corelib
parentccef8261d4d005a8666ef2c10b82860602f781b3 (diff)
Remove workarounds for RVCT compiler bugs
This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h11
-rw-r--r--src/corelib/io/qiodevice.cpp20
-rw-r--r--src/corelib/kernel/qfunctions_p.h10
-rw-r--r--src/corelib/tools/qbytearraymatcher.h8
-rw-r--r--src/corelib/tools/qhash.h18
-rw-r--r--src/corelib/tools/qmap.h18
-rw-r--r--src/corelib/tools/qstringmatcher.h8
7 files changed, 4 insertions, 89 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index cb0f66842c..273dcb9acb 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -624,14 +624,7 @@ Q_CORE_EXPORT bool qSharedBuild() Q_DECL_NOTHROW;
/*
Avoid "unused parameter" warnings
*/
-
-#if defined(Q_CC_RVCT)
-template <typename T>
-inline void qUnused(T &x) { (void)x; }
-# define Q_UNUSED(x) qUnused(x);
-#else
-# define Q_UNUSED(x) (void)x;
-#endif
+#define Q_UNUSED(x) (void)x;
/*
Debugging and error handling
@@ -865,7 +858,7 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic
# endif
#endif
-#if defined(Q_COMPILER_DECLTYPE) || (defined(Q_CC_GNU) && !defined(Q_CC_RVCT))
+#if defined(Q_COMPILER_DECLTYPE) || defined(Q_CC_GNU)
/* make use of decltype or GCC's __typeof__ extension */
template <typename T>
class QForeachContainer {
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index d7ce8731c5..b1f164ab1b 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -733,12 +733,6 @@ qint64 QIODevice::bytesToWrite() const
return qint64(0);
}
-#ifdef Q_CC_RVCT
-// arm mode makes the 64-bit integer operations much faster in RVCT 2.2
-#pragma push
-#pragma arm
-#endif
-
/*!
Reads at most \a maxSize bytes from the device into \a data, and
returns the number of bytes read. If an error occurs, such as when
@@ -902,10 +896,6 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
return readSoFar;
}
-#ifdef Q_CC_RVCT
-#pragma pop
-#endif
-
/*!
\overload
@@ -1018,12 +1008,6 @@ QByteArray QIODevice::readAll()
return result;
}
-#ifdef Q_CC_RVCT
-// arm mode makes the 64-bit integer operations much faster in RVCT 2.2
-#pragma push
-#pragma arm
-#endif
-
/*!
This function reads a line of ASCII characters from the device, up
to a maximum of \a maxSize - 1 bytes, stores the characters in \a
@@ -1243,10 +1227,6 @@ qint64 QIODevice::readLineData(char *data, qint64 maxSize)
return readSoFar;
}
-#ifdef Q_CC_RVCT
-#pragma pop
-#endif
-
/*!
Returns \c true if a complete line of data can be read from the device;
otherwise returns \c false.
diff --git a/src/corelib/kernel/qfunctions_p.h b/src/corelib/kernel/qfunctions_p.h
index b10d92398b..d0623aab6b 100644
--- a/src/corelib/kernel/qfunctions_p.h
+++ b/src/corelib/kernel/qfunctions_p.h
@@ -57,14 +57,8 @@
# include "QtCore/qfunctions_winrt.h"
#endif
-#ifdef Q_CC_RVCT
-// rvct doesn't see static operators when using our qalgorithms
-# define Q_STATIC_GLOBAL_OPERATOR inline
-# define Q_STATIC_GLOBAL_INLINE_OPERATOR inline
-#else
-# define Q_STATIC_GLOBAL_OPERATOR static
-# define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline
-#endif
+#define Q_STATIC_GLOBAL_OPERATOR static
+#define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline
#endif
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index c7b83a98cc..a49ae2fd9d 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -66,11 +66,6 @@ public:
private:
QByteArrayMatcherPrivate *d;
QByteArray q_pattern;
-#ifdef Q_CC_RVCT
-// explicitly allow anonymous unions for RVCT to prevent compiler warnings
-# pragma push
-# pragma anon_unions
-#endif
struct Data {
uchar q_skiptable[256];
const uchar *p;
@@ -80,9 +75,6 @@ private:
uint dummy[256];
Data p;
};
-#ifdef Q_CC_RVCT
-# pragma pop
-#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 771e81c8f4..325799d165 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -977,29 +977,11 @@ public:
inline QMultiHash operator+(const QMultiHash &other) const
{ QMultiHash result = *this; result += other; return result; }
-#if !defined(Q_CC_RVCT)
- // RVCT compiler doesn't handle using-keyword right when used functions are overloaded in child class
using QHash<Key, T>::contains;
using QHash<Key, T>::remove;
using QHash<Key, T>::count;
using QHash<Key, T>::find;
using QHash<Key, T>::constFind;
-#else
- inline bool contains(const Key &key) const
- { return QHash<Key, T>::contains(key); }
- inline int remove(const Key &key)
- { return QHash<Key, T>::remove(key); }
- inline int count(const Key &key) const
- { return QHash<Key, T>::count(key); }
- inline int count() const
- { return QHash<Key, T>::count(); }
- inline typename QHash<Key, T>::iterator find(const Key &key)
- { return QHash<Key, T>::find(key); }
- inline typename QHash<Key, T>::const_iterator find(const Key &key) const
- { return QHash<Key, T>::find(key); }
- inline typename QHash<Key, T>::const_iterator constFind(const Key &key) const
- { return QHash<Key, T>::constFind(key); }
-#endif
bool contains(const Key &key, const T &value) const;
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index ce550c540b..4b1fc65b22 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -1157,29 +1157,11 @@ public:
inline QMultiMap operator+(const QMultiMap &other) const
{ QMultiMap result = *this; result += other; return result; }
-#if !defined(Q_CC_RVCT)
- // RVCT compiler doesn't handle using-keyword right when used functions are overloaded in child class
using QMap<Key, T>::contains;
using QMap<Key, T>::remove;
using QMap<Key, T>::count;
using QMap<Key, T>::find;
using QMap<Key, T>::constFind;
-#else
- inline bool contains(const Key &key) const
- { return QMap<Key, T>::contains(key); }
- inline int remove(const Key &key)
- { return QMap<Key, T>::remove(key); }
- inline int count(const Key &key) const
- { return QMap<Key, T>::count(key); }
- inline int count() const
- { return QMap<Key, T>::count(); }
- inline typename QMap<Key, T>::iterator find(const Key &key)
- { return QMap<Key, T>::find(key); }
- inline typename QMap<Key, T>::const_iterator find(const Key &key) const
- { return QMap<Key, T>::find(key); }
- inline typename QMap<Key, T>::const_iterator constFind(const Key &key) const
- { return QMap<Key, T>::constFind(key); }
-#endif
bool contains(const Key &key, const T &value) const;
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h
index 00e5fc1587..d416831434 100644
--- a/src/corelib/tools/qstringmatcher.h
+++ b/src/corelib/tools/qstringmatcher.h
@@ -66,11 +66,6 @@ private:
QStringMatcherPrivate *d_ptr;
QString q_pattern;
Qt::CaseSensitivity q_cs;
-#ifdef Q_CC_RVCT
-// explicitly allow anonymous unions for RVCT to prevent compiler warnings
-# pragma push
-# pragma anon_unions
-#endif
struct Data {
uchar q_skiptable[256];
const QChar *uc;
@@ -80,9 +75,6 @@ private:
uint q_data[256];
Data p;
};
-#ifdef Q_CC_RVCT
-# pragma pop
-#endif
};
QT_END_NAMESPACE