summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/concurrent/qtconcurrentcompilertest.h6
-rw-r--r--src/corelib/global/qendian.h4
-rw-r--r--src/corelib/global/qglobal.h60
-rw-r--r--src/corelib/kernel/qobject.h101
-rw-r--r--src/corelib/kernel/qvariant.cpp8
-rw-r--r--src/corelib/tools/qmap.h4
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h1
-rw-r--r--src/corelib/tools/qstring.cpp4
-rw-r--r--src/corelib/tools/qstring.h9
-rw-r--r--src/corelib/tools/qvector.h3
10 files changed, 17 insertions, 183 deletions
diff --git a/src/corelib/concurrent/qtconcurrentcompilertest.h b/src/corelib/concurrent/qtconcurrentcompilertest.h
index 982a50c274..4fbb3d76ee 100644
--- a/src/corelib/concurrent/qtconcurrentcompilertest.h
+++ b/src/corelib/concurrent/qtconcurrentcompilertest.h
@@ -51,12 +51,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Core)
-#ifdef Q_CC_MSVC
-# if _MSC_VER < 1300
-# define QT_CONURRENT_NONSTANDARD_COMPILER
-# endif
-#endif
-
#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
# define QT_TYPENAME
#else
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index d53504abe4..e0e946bb4b 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -89,7 +89,7 @@ template <typename T> inline void qToUnaligned(const T src, uchar *dest)
* and return the value in host-endian encoding.
* There is no requirement that \a src must be aligned.
*/
-#if defined Q_CC_MSVC && _MSC_VER < 1300 || defined Q_CC_SUN
+#if defined Q_CC_SUN
inline quint64 qFromLittleEndian_helper(const uchar *src, quint64 *dest)
{
return 0
@@ -177,7 +177,7 @@ template <> inline qint16 qFromLittleEndian<qint16>(const uchar *src)
* and return the value in host-endian encoding.
* There is no requirement that \a src must be aligned.
*/
-#if defined Q_CC_MSVC && _MSC_VER < 1300 || defined Q_CC_SUN
+#if defined Q_CC_SUN
inline quint64 qFromBigEndian_helper(const uchar *src, quint64 *dest)
{
return 0
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 519e6e0578..1d78cbd6e0 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -383,31 +383,12 @@ namespace QT_NAMESPACE {}
#elif defined(_MSC_VER)
# define Q_CC_MSVC
-/* proper support of bool for _MSC_VER >= 1100 */
+# define Q_CC_MSVC_NET
# define Q_CANNOT_DELETE_CONSTANT
# define Q_OUTOFLINE_TEMPLATE inline
# define Q_NO_TEMPLATE_FRIENDS
-# define QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION
-# define Q_ALIGNOF(type) __alignof(type)
-# define Q_DECL_ALIGN(n) __declspec(align(n))
-
-/* Visual C++.Net issues for _MSC_VER >= 1300 */
-# if _MSC_VER >= 1300
-# define Q_CC_MSVC_NET
-# if _MSC_VER < 1310 || (defined(Q_OS_WIN64) && defined(_M_IA64))
-# define Q_TYPENAME
-# else
-# undef QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION
-# endif
-# else
-# define Q_NO_USING_KEYWORD
-# define QT_NO_MEMBER_TEMPLATES
-# endif
-# if _MSC_VER < 1310
-# define QT_NO_QOBJECT_CHECK
-# define Q_TYPENAME
-# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
-# endif
+# define Q_ALIGNOF(type) __alignof(type)
+# define Q_DECL_ALIGN(n) __declspec(align(n))
/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
# if defined(__INTEL_COMPILER)
# define Q_CC_INTEL
@@ -924,10 +905,10 @@ redefine to built-in booleans to make autotests work properly */
#endif
/*
- Proper for-scoping in VC++6 and MIPSpro CC
+ Proper for-scoping in MIPSpro CC
*/
#ifndef QT_NO_KEYWORDS
-# if (defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) && !defined(Q_CC_INTEL)) || defined(Q_CC_MIPS) || (defined(Q_CC_HPACC) && defined(__ia64))
+# if defined(Q_CC_MIPS) || (defined(Q_CC_HPACC) && defined(__ia64))
# define for if(0){}else for
# endif
#endif
@@ -951,7 +932,7 @@ redefine to built-in booleans to make autotests work properly */
# define Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#elif (defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))) || defined(Q_CC_RVCT)
# define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
-#elif defined(Q_CC_MSVC) && (_MSC_VER >= 1300)
+#elif defined(Q_CC_MSVC)
# define Q_DECL_DEPRECATED __declspec(deprecated)
# if defined (Q_CC_INTEL)
# define Q_DECL_VARIABLE_DEPRECATED
@@ -1053,7 +1034,7 @@ redefine to built-in booleans to make autotests work properly */
#else
# define QT_FASTCALL
#endif
-# elif defined(Q_CC_MSVC) && (_MSC_VER > 1300 || defined(Q_CC_INTEL))
+# elif defined(Q_CC_MSVC)
# define QT_FASTCALL __fastcall
# else
# define QT_FASTCALL
@@ -1721,12 +1702,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
#if (defined(Q_CC_GNU) && !defined(Q_OS_SOLARIS)) || defined(Q_CC_HPACC) || defined(Q_CC_DIAB)
# define Q_FUNC_INFO __PRETTY_FUNCTION__
#elif defined(_MSC_VER)
- /* MSVC 2002 doesn't have __FUNCSIG__ nor can it handle QT_STRINGIFY. */
-# if _MSC_VER <= 1300
-# define Q_FUNC_INFO __FILE__ "(line number unavailable)"
-# else
-# define Q_FUNC_INFO __FUNCSIG__
-# endif
+# define Q_FUNC_INFO __FUNCSIG__
#else
# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN)
# define Q_FUNC_INFO __FILE__ "(line number unavailable)"
@@ -2149,10 +2125,6 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
# pragma warning(disable: 4231) /* nonstandard extension used : 'extern' before template explicit instantiation */
# pragma warning(disable: 4710) /* function not inlined */
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify -GX */
-# if _MSC_VER < 1300
-# pragma warning(disable: 4284) /* return type for 'type1::operator ->' is 'type2 *' */
- /* (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation) */
-# endif
# elif defined(Q_CC_BOR)
# pragma option -w-inl
# pragma option -w-aus
@@ -2226,13 +2198,9 @@ public:
#define Q_DECLARE_FLAGS(Flags, Enum)\
typedef QFlags<Enum> Flags;
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-# define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags)
-#else
-# define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags) \
+#define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags) \
inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
{ return QIncompatibleFlag(int(f1) | f2); }
-#endif
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags) \
inline QFlags<Flags::enum_type> operator|(Flags::enum_type f1, Flags::enum_type f2) \
@@ -2289,9 +2257,9 @@ template <typename T>
inline const QForeachContainer<T> *qForeachContainer(const QForeachContainerBase *base, const T *)
{ return static_cast<const QForeachContainer<T> *>(base); }
-#if (defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) && !defined(Q_CC_INTEL)) || defined(Q_CC_MIPS)
+#if defined(Q_CC_MIPS)
/*
- Proper for-scoping in VC++6 and MIPSpro CC
+ Proper for-scoping in MIPSpro CC
*/
# define Q_FOREACH(variable,container) \
if(0){}else \
@@ -2648,12 +2616,6 @@ QT_LICENSED_MODULE(DBus)
# define QT_NO_QFUTURE
#endif
-// MSVC 6.0 and MSVC .NET 2002, can`t handle the map(), etc templates,
-// but the QFuture class compiles.
-#if (defined(Q_CC_MSVC) && _MSC_VER <= 1300)
-# define QT_NO_CONCURRENT
-#endif
-
// gcc 3 version has problems with some of the
// map/filter overloads.
#if defined(Q_CC_GNU) && (__GNUC__ < 4)
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index d26f0785c4..7f0084c1c2 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -77,18 +77,10 @@ class QObjectUserData;
typedef QList<QObject*> QObjectList;
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template<typename T> inline T qFindChild(const QObject *o, const QString &name = QString(), T = 0);
-template<typename T> inline QList<T> qFindChildren(const QObject *o, const QString &name = QString(), T = 0);
-# ifndef QT_NO_REGEXP
-template<typename T> inline QList<T> qFindChildren(const QObject *o, const QRegExp &re, T = 0);
-# endif
-#else
template<typename T> inline T qFindChild(const QObject *, const QString & = QString());
template<typename T> inline QList<T> qFindChildren(const QObject *, const QString & = QString());
-# ifndef QT_NO_REGEXP
+#ifndef QT_NO_REGEXP
template<typename T> inline QList<T> qFindChildren(const QObject *, const QRegExp &);
-# endif
#endif
class
@@ -342,95 +334,6 @@ Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QString
const QMetaObject &mo, QList<void *> *list);
Q_CORE_EXPORT QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo);
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-
-template<typename T>
-inline T qFindChild(const QObject *o, const QString &name, T)
-{ return static_cast<T>(qt_qFindChild_helper(o, name, ((T)0)->staticMetaObject)); }
-
-template<typename T>
-inline QList<T> qFindChildren(const QObject *o, const QString &name, T)
-{
- QList<T> list;
- union {
- QList<T> *typedList;
- QList<void *> *voidList;
- } u;
- u.typedList = &list;
- qt_qFindChildren_helper(o, name, 0, ((T)0)->staticMetaObject, u.voidList);
- return list;
-}
-
-template<typename T>
-inline T qFindChild(const QObject *o, const QString &name)
-{ return qFindChild<T>(o, name, T(0)); }
-
-template<typename T>
-inline T qFindChild(const QObject *o)
-{ return qFindChild<T>(o, QString(), T(0)); }
-
-template<typename T>
-inline QList<T> qFindChildren(const QObject *o, const QString &name)
-{ return qFindChildren<T>(o, name, T(0)); }
-
-template<typename T>
-inline QList<T> qFindChildren(const QObject *o)
-{ return qFindChildren<T>(o, QString(), T(0)); }
-
-#ifndef QT_NO_REGEXP
-template<typename T>
-inline QList<T> qFindChildren(const QObject *o, const QRegExp &re, T)
-{
- QList<T> list;
- union {
- QList<T> *typedList;
- QList<void *> *voidList;
- } u;
- u.typedList = &list;
- qt_qFindChildren_helper(o, 0, &re, ((T)0)->staticMetaObject, u.voidList);
- return list;
-}
-
-template<typename T>
-inline QList<T> qFindChildren(const QObject *o, const QRegExp &re)
-{ return qFindChildren<T>(o, re, T(0)); }
-
-#endif
-
-#ifdef Q_MOC_RUN
-# define Q_DECLARE_INTERFACE(IFace, IId) Q_DECLARE_INTERFACE(IFace, IId)
-#endif // Q_MOC_RUN
-
-
-template <class T> inline const char * qobject_interface_iid()
-{ return 0; }
-
-template <class T> inline T qobject_cast_helper(QObject *object, T)
-{ return static_cast<T>(((T)0)->staticMetaObject.cast(object)); }
-
-template <class T> inline T qobject_cast_helper(const QObject *object, T)
-{ return static_cast<T>(const_cast<const QObject *>(((T)0)->staticMetaObject.cast(const_cast<QObject *>(object)))); }
-
-template <class T>
-inline T qobject_cast(QObject *object)
-{ return qobject_cast_helper<T>(object, T(0)); }
-
-template <class T>
-inline T qobject_cast(const QObject *object)
-{ return qobject_cast_helper<T>(object, T(0)); }
-
-#ifndef Q_MOC_RUN
-# define Q_DECLARE_INTERFACE(IFace, IId) \
- template <> inline const char *qobject_interface_iid<IFace *>() \
- { return IId; } \
- template <> inline IFace *qobject_cast_helper<IFace *>(QObject *object, IFace *) \
- { return (IFace *)(object ? object->qt_metacast(IId) : 0); } \
- template <> inline IFace *qobject_cast_helper<IFace *>(const QObject *object, IFace *) \
- { return (IFace *)(object ? const_cast<QObject *>(object)->qt_metacast(IId) : 0); }
-#endif // Q_MOC_RUN
-
-#else
-
template<typename T>
inline T qFindChild(const QObject *o, const QString &name)
{ return static_cast<T>(qt_qFindChild_helper(o, name, reinterpret_cast<T>(0)->staticMetaObject)); }
@@ -499,8 +402,6 @@ template <class T> inline const char * qobject_interface_iid()
{ return reinterpret_cast<IFace *>((object ? const_cast<QObject *>(object)->qt_metacast(IId) : 0)); }
#endif // Q_MOC_RUN
-#endif
-
#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
#endif
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index f5d7c0def1..9617e0c997 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -947,11 +947,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
-#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
- *f = (double)(qlonglong)qMetaTypeUNumber(d);
-#else
*f = double(qMetaTypeUNumber(d));
-#endif
break;
default:
*f = 0.0;
@@ -986,11 +982,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
-#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
- *f = (float)(qlonglong)qMetaTypeUNumber(d);
-#else
*f = float(qMetaTypeUNumber(d));
-#endif
break;
default:
*f = 0.0f;
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index e4b73a1aef..d15df0b5b1 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -639,13 +639,13 @@ Q_OUTOFLINE_TEMPLATE void QMap<Key, T>::freeData(QMapData *x)
while (next != x) {
cur = next;
next = cur->forward[0];
-#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#if defined(_MSC_VER)
#pragma warning(disable:4189)
#endif
Node *concreteNode = concrete(reinterpret_cast<QMapData::Node *>(cur));
concreteNode->key.~Key();
concreteNode->value.~T();
-#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#if defined(_MSC_VER)
#pragma warning(default:4189)
#endif
}
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 083c7c2742..dd27f7efad 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -109,7 +109,6 @@ namespace QtSharedPointer {
template <class T> inline void normalDeleter(T *t) { delete t; }
// this uses partial template specialization
- // the only compilers that didn't support this were MSVC 6.0 and 2002
template <class T> struct RemovePointer;
template <class T> struct RemovePointer<T *> { typedef T Type; };
template <class T> struct RemovePointer<QSharedPointer<T> > { typedef T Type; };
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 3068af7f8c..3371b366cf 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -336,11 +336,7 @@ inline char qToLower(char ch)
return ch;
}
-#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
-const QString::Null QString::null;
-#else
const QString::Null QString::null = { };
-#endif
/*!
\macro QT_NO_CAST_FROM_ASCII
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 952c572ef1..7f7e475860 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -51,14 +51,7 @@
#endif
#ifndef QT_NO_STL
-# if defined (Q_CC_MSVC_NET) && _MSC_VER < 1310 // Avoids nasty warning for xlocale, line 450
-# pragma warning (push)
-# pragma warning (disable : 4189)
-# include <string>
-# pragma warning (pop)
-# else
-# include <string>
-# endif
+# include <string>
# ifndef QT_NO_STL_WCHAR
// workaround for some headers not typedef'ing std::wstring
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index c2e24852fe..5613c12d18 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -789,11 +789,8 @@ QT_END_INCLUDE_NAMESPACE
#else
#define Q_TEMPLATE_EXTERN extern
#endif
-# pragma warning(push) /* MSVC 6.0 doesn't care about the disabling in qglobal.h (why?), so do it here */
-# pragma warning(disable: 4231) /* nonstandard extension used : 'extern' before template explicit instantiation */
Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPointF>;
Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPoint>;
-# pragma warning(pop)
#endif
QT_END_NAMESPACE