summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2010-08-03 16:33:07 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-03 16:35:26 (GMT)
commit8435ba93fad9eb799764eb3b66a8a9838db3fea3 (patch)
treef69cbdba60b3a43344e9a518eeddb557606c8186 /src
parent794c7c77f28bb530db017cc25a5e33e00933253b (diff)
downloadQt-8435ba93fad9eb799764eb3b66a8a9838db3fea3.zip
Qt-8435ba93fad9eb799764eb3b66a8a9838db3fea3.tar.gz
Qt-8435ba93fad9eb799764eb3b66a8a9838db3fea3.tar.bz2
Remove obsolete code & workarounds for unsupported versions of MS Visual C++
The minimum supported version of MS Visual C++ 2003, which is _MSC_VER 1310. Merge-request: 756 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src')
-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
-rw-r--r--src/declarative/qml/parser/qdeclarativejsengine_p.h6
-rw-r--r--src/gui/kernel/qwidget.h8
-rw-r--r--src/gui/text/qcssparser.cpp8
-rw-r--r--src/gui/text/qfontdatabase.cpp4
-rw-r--r--src/network/kernel/qhostinfo_win.cpp5
-rw-r--r--src/script/api/qscriptengine.cpp7
-rw-r--r--src/script/api/qscriptengine.h12
-rw-r--r--src/script/api/qscriptvalue.cpp12
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp37
-rw-r--r--src/testlib/qtest_global.h2
20 files changed, 34 insertions, 267 deletions
diff --git a/src/corelib/concurrent/qtconcurrentcompilertest.h b/src/corelib/concurrent/qtconcurrentcompilertest.h
index 982a50c..4fbb3d7 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 d53504a..e0e946b 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 519e6e0..1d78cbd 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 d26f078..7f0084c 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 f5d7c0d..9617e0c 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 e4b73a1..d15df0b 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 083c7c2..dd27f7e 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 3068af7..3371b36 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 952c572..7f7e475 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 c2e2485..5613c12 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
diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.h b/src/declarative/qml/parser/qdeclarativejsengine_p.h
index 1389244..d0b744d 100644
--- a/src/declarative/qml/parser/qdeclarativejsengine_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsengine_p.h
@@ -88,12 +88,6 @@ uint qHash(const QDeclarativeJS::NameId &id);
} // end of namespace QDeclarativeJS
-#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
-//this ensures that code outside QDeclarativeJS can use the hash function
-//it also a workaround for some compilers
-inline uint qHash(const QDeclarativeJS::NameId &nameId) { return QDeclarativeJS::qHash(nameId); }
-#endif
-
namespace QDeclarativeJS {
class Lexer;
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 941bd68..980f40f 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -898,13 +898,6 @@ protected:
Q_DECLARE_OPERATORS_FOR_FLAGS(QWidget::RenderFlags)
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QWidget *qobject_cast_helper<QWidget*>(QObject *o, QWidget *)
-{
- if (!o || !o->isWidgetType()) return 0;
- return (QWidget*)(o);
-}
-#else
template <> inline QWidget *qobject_cast<QWidget*>(QObject *o)
{
if (!o || !o->isWidgetType()) return 0;
@@ -915,7 +908,6 @@ template <> inline const QWidget *qobject_cast<const QWidget*>(const QObject *o)
if (!o || !o->isWidgetType()) return 0;
return static_cast<const QWidget*>(o);
}
-#endif
inline QWidget *QWidget::childAt(int ax, int ay) const
{ return childAt(QPoint(ax, ay)); }
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index b3d2526..39c4053 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1032,15 +1032,7 @@ bool ValueExtractor::extractBackground(QBrush *brush, QString *image, Repeat *re
parseShorthandBackgroundProperty(decl.d->values, &brushData, image, repeat, alignment, pal);
*brush = brushFromData(brushData, pal);
if (brushData.type != BrushData::DependsOnThePalette) {
-#if defined Q_CC_MSVC && _MSC_VER <= 1300
- BackgroundData data;
- data.brush = brushData;
- data.image = *image;
- data.repeat = *repeat;
- data.alignment = *alignment;
-#else
BackgroundData data = { brushData, *image, *repeat, *alignment };
-#endif
decl.d->parsed = qVariantFromValue<BackgroundData>(data);
}
}
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index e6c36a4..2b26638 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -75,10 +75,6 @@
# define FM_DEBUG if (false) qDebug
#endif
-#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
-# define for if(0){}else for
-#endif
-
QT_BEGIN_NAMESPACE
#define SMOOTH_SCALABLE 0xffff
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 65257e8..1671ae4 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -39,11 +39,6 @@
**
****************************************************************************/
-#if defined Q_CC_MSVC && _MSC_VER <=1300
-//VC.net 2002 support for templates doesn't match some PSDK requirements
-#define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
-#endif
-
#include <winsock2.h>
#include "qhostinfo_p.h"
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 4a18c7d..30c197e 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2986,14 +2986,7 @@ JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const
case QMetaType::LongLong:
return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const qlonglong*>(ptr)));
case QMetaType::ULongLong:
-#if defined(Q_OS_WIN) && defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 12008804
-#pragma message("** NOTE: You need the Visual Studio Processor Pack to compile support for 64bit unsigned integers.")
- return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
-#elif defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
- return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
-#else
return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const qulonglong*>(ptr)));
-#endif
case QMetaType::Double:
return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const double*>(ptr)));
case QMetaType::QString:
diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h
index 3212ed5..1fe65db 100644
--- a/src/script/api/qscriptengine.h
+++ b/src/script/api/qscriptengine.h
@@ -349,11 +349,7 @@ inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *
}
template<typename T>
-T qscriptvalue_cast(const QScriptValue &value
-#if !defined qdoc && defined Q_CC_MSVC && _MSC_VER < 1300
-, T * = 0
-#endif
- )
+T qscriptvalue_cast(const QScriptValue &value)
{
T t;
const int id = qMetaTypeId<T>();
@@ -366,13 +362,11 @@ T qscriptvalue_cast(const QScriptValue &value
return T();
}
-#if !defined Q_CC_MSVC || _MSC_VER >= 1300
template <>
inline QVariant qscriptvalue_cast<QVariant>(const QScriptValue &value)
{
return value.toVariant();
}
-#endif
template <typename T>
inline T qScriptValueToValue(const QScriptValue &value)
@@ -428,11 +422,7 @@ void qScriptValueToSequence(const QScriptValue &value, Container &cont)
quint32 len = value.property(QLatin1String("length")).toUInt32();
for (quint32 i = 0; i < len; ++i) {
QScriptValue item = value.property(i);
-#if defined Q_CC_MSVC && !defined Q_CC_MSVC_NET
- cont.push_back(qscriptvalue_cast<Container::value_type>(item));
-#else
cont.push_back(qscriptvalue_cast<typename Container::value_type>(item));
-#endif
}
}
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index f6390bb..fbd5d96 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -688,10 +688,6 @@ static bool LessThan(QScriptValue lhs, QScriptValue rhs)
return false;
case Number:
-#if defined Q_CC_MSVC && !defined Q_CC_MSVC_NET
- if (qIsNaN(lhs.toNumber()) || qIsNaN(rhs.toNumber()))
- return false;
-#endif
return lhs.toNumber() < rhs.toNumber();
case Boolean:
@@ -714,13 +710,7 @@ static bool LessThan(QScriptValue lhs, QScriptValue rhs)
if (lhs.isString() && rhs.isString())
return lhs.toString() < rhs.toString();
- qsreal n1 = lhs.toNumber();
- qsreal n2 = rhs.toNumber();
-#if defined Q_CC_MSVC && !defined Q_CC_MSVC_NET
- if (qIsNaN(n1) || qIsNaN(n2))
- return false;
-#endif
- return n1 < n2;
+ return lhs.toNumber() < rhs.toNumber();
}
static bool Equals(QScriptValue lhs, QScriptValue rhs)
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 9a35ac5..cc73f1b 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -62,15 +62,6 @@ QT_BEGIN_NAMESPACE
// undefine this to prevent initial check of the ODBC driver
#define ODBC_CHECK_DRIVER
-// newer platform SDKs use SQLLEN instead of SQLINTEGER
-#if defined(WIN32) && (_MSC_VER < 1300) && !defined(__MINGW64_VERSION_MAJOR)
-# define QSQLLEN SQLINTEGER
-# define QSQLULEN SQLUINTEGER
-#else
-# define QSQLLEN SQLLEN
-# define QSQLULEN SQLULEN
-#endif
-
static const int COLNAMESIZE = 256;
//Map Qt parameter types to ODBC types
static const SQLSMALLINT qParamType[4] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT };
@@ -360,7 +351,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
{
QString fieldVal;
SQLRETURN r = SQL_ERROR;
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
// NB! colSize must be a multiple of 2 for unicode enabled DBs
if (colSize <= 0) {
@@ -462,10 +453,10 @@ static QVariant qGetBinaryData(SQLHANDLE hStmt, int column)
QByteArray fieldVal;
SQLSMALLINT colNameLen;
SQLSMALLINT colType;
- QSQLULEN colSize;
+ SQLULEN colSize;
SQLSMALLINT colScale;
SQLSMALLINT nullable;
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
SQLRETURN r = SQL_ERROR;
QVarLengthArray<SQLTCHAR> colName(COLNAMESIZE);
@@ -499,7 +490,7 @@ static QVariant qGetBinaryData(SQLHANDLE hStmt, int column)
break;
if (lengthIndicator == SQL_NULL_DATA)
return QVariant(QVariant::ByteArray);
- if (lengthIndicator > QSQLLEN(colSize) || lengthIndicator == SQL_NO_TOTAL) {
+ if (lengthIndicator > SQLLEN(colSize) || lengthIndicator == SQL_NO_TOTAL) {
read += colSize;
colSize = 65536;
} else {
@@ -517,7 +508,7 @@ static QVariant qGetBinaryData(SQLHANDLE hStmt, int column)
static QVariant qGetIntData(SQLHANDLE hStmt, int column, bool isSigned = true)
{
SQLINTEGER intbuf = 0;
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
SQLRETURN r = SQLGetData(hStmt,
column+1,
isSigned ? SQL_C_SLONG : SQL_C_ULONG,
@@ -537,7 +528,7 @@ static QVariant qGetIntData(SQLHANDLE hStmt, int column, bool isSigned = true)
static QVariant qGetDoubleData(SQLHANDLE hStmt, int column)
{
SQLDOUBLE dblbuf;
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
SQLRETURN r = SQLGetData(hStmt,
column+1,
SQL_C_DOUBLE,
@@ -557,7 +548,7 @@ static QVariant qGetDoubleData(SQLHANDLE hStmt, int column)
static QVariant qGetBigIntData(SQLHANDLE hStmt, int column, bool isSigned = true)
{
SQLBIGINT lngbuf = 0;
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
SQLRETURN r = SQLGetData(hStmt,
column+1,
isSigned ? SQL_C_SBIGINT : SQL_C_UBIGINT,
@@ -601,7 +592,7 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
{
SQLSMALLINT colNameLen;
SQLSMALLINT colType;
- QSQLULEN colSize;
+ SQLULEN colSize;
SQLSMALLINT colScale;
SQLSMALLINT nullable;
SQLRETURN r = SQL_ERROR;
@@ -621,7 +612,7 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
return QSqlField();
}
- QSQLLEN unsignedFlag = SQL_FALSE;
+ SQLLEN unsignedFlag = SQL_FALSE;
r = SQLColAttribute (p->hStmt,
i + 1,
SQL_DESC_UNSIGNED,
@@ -1146,7 +1137,7 @@ QVariant QODBCResult::data(int field)
return d->fieldCache.at(field);
SQLRETURN r(0);
- QSQLLEN lengthIndicator = 0;
+ SQLLEN lengthIndicator = 0;
for (int i = d->fieldCacheIdx; i <= field; ++i) {
// some servers do not support fetching column n after we already
@@ -1256,7 +1247,7 @@ int QODBCResult::size()
int QODBCResult::numRowsAffected()
{
- QSQLLEN affectedRowCount = 0;
+ SQLLEN affectedRowCount = 0;
SQLRETURN r = SQLRowCount(d->hStmt, &affectedRowCount);
if (r == SQL_SUCCESS)
return affectedRowCount;
@@ -1343,8 +1334,8 @@ bool QODBCResult::exec()
SQLCloseCursor(d->hStmt);
QList<QByteArray> tmpStorage; // holds temporary buffers
- QVarLengthArray<QSQLLEN, 32> indicators(boundValues().count());
- memset(indicators.data(), 0, indicators.size() * sizeof(QSQLLEN));
+ QVarLengthArray<SQLLEN, 32> indicators(boundValues().count());
+ memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN));
// bind parameters - only positional binding allowed
QVector<QVariant>& values = boundValues();
@@ -1354,7 +1345,7 @@ bool QODBCResult::exec()
if (bindValueType(i) & QSql::Out)
values[i].detach();
const QVariant &val = values.at(i);
- QSQLLEN *ind = &indicators[i];
+ SQLLEN *ind = &indicators[i];
if (val.isNull())
*ind = SQL_NULL_DATA;
switch (val.type()) {
diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h
index a78113a..4dd0cb7 100644
--- a/src/testlib/qtest_global.h
+++ b/src/testlib/qtest_global.h
@@ -62,7 +62,7 @@ QT_MODULE(Test)
# endif
#endif
-#if (defined (Q_CC_MSVC) && _MSC_VER < 1310) || defined (Q_CC_SUN) || defined (Q_CC_XLC) || (defined (Q_CC_GNU) && (__GNUC__ - 0 < 3)) || defined (Q_CC_NOKIAX86)
+#if defined (Q_CC_SUN) || defined (Q_CC_XLC) || (defined (Q_CC_GNU) && (__GNUC__ - 0 < 3)) || defined (Q_CC_NOKIAX86)
# define QTEST_NO_SPECIALIZATIONS
#endif