Q_CC_MSVC conditionals removal

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-09-11 19:17:01 +00:00
parent 07bf6cf9e7
commit 6bebf3ae90
16 changed files with 15 additions and 231 deletions

View file

@ -46,10 +46,6 @@
*/
#include <QtCore/qendian.h>
#ifdef Q_CC_MSVC
# include <stdlib.h>
#endif
QT_BEGIN_NAMESPACE
// Test Vectors (from FIPS PUB 180-1)
@ -91,11 +87,7 @@ typedef union
static inline quint32 rol32(quint32 value, unsigned int shift)
{
#ifdef Q_CC_MSVC
return _rotl(value, shift);
#else
return ((value << shift) | (value >> (32 - shift)));
#endif
}
static inline quint32 sha1Word(Sha1Chunk *chunk, const uint position)

View file

@ -43,43 +43,10 @@
#include "qsystemerror_p.h"
#include "qcorecommon_p.h"
#if !defined(Q_OS_WINCE)
# include <errno.h>
# if defined(Q_CC_MSVC)
# include <crtdbg.h>
# endif
#else
# if (_WIN32_WCE >= 0x700)
# include <errno.h>
# endif
#endif
#ifdef Q_OS_WIN
#include <windows.h>
#endif
#include <errno.h>
QT_BEGIN_NAMESPACE
#ifdef Q_OS_WIN
static QString windowsErrorString(int errorCode)
{
QString ret;
wchar_t *string = 0;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
errorCode,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&string,
0,
NULL);
ret = QString::fromWCharArray(string);
LocalFree((HLOCAL)string);
if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND)
ret = QString::fromLatin1("The specified module could not be found.");
return ret;
}
#endif
static QString standardLibraryErrorString(int errorCode)
{
const char *s = 0;
@ -100,16 +67,12 @@ static QString standardLibraryErrorString(int errorCode)
s = QT_TRANSLATE_NOOP("QIODevice", "No space left on device");
break;
default: {
#ifdef Q_OS_WINCE
ret = windowsErrorString(errorCode);
#else
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX)
QByteArray buf(1024, '\0');
ret = fromstrerror_helper(strerror_r(errorCode, buf.data(), buf.size()), buf);
#else
ret = QString::fromLocal8Bit(strerror(errorCode));
#endif
#endif
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L
QByteArray buf(1024, '\0');
ret = fromstrerror_helper(strerror_r(errorCode, buf.data(), buf.size()), buf);
#else
ret = QString::fromLocal8Bit(strerror(errorCode));
#endif
break; }
}
if (s) {
@ -124,12 +87,8 @@ static QString standardLibraryErrorString(int errorCode)
QString QSystemError::toString()
{
switch(errorScope) {
// native and standard library are the same
case NativeError:
#if defined (Q_OS_WIN)
return windowsErrorString(errorCode);
#else
//unix: fall through as native and standard library are the same
#endif
case StandardLibraryError:
return standardLibraryErrorString(errorCode);
default:

View file

@ -72,24 +72,6 @@ public:
};
Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager")
#if defined(Q_CC_MSVC) && (_MSC_VER < 1300)
template <class T>
inline T qt_extension_helper(QAbstractExtensionManager *, QObject *, T)
{ return 0; }
template <class T>
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
{ return qt_extension_helper(manager, object, T(0)); }
#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \
const char * const IFace##_iid = IId; \
Q_DECLARE_INTERFACE(IFace, IId) \
template <> inline IFace *qt_extension_helper<IFace *>(QAbstractExtensionManager *manager, QObject *object, IFace *) \
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return (IFace *)(extension ? extension->qt_metacast(IFace##_iid) : 0); }
#else
template <class T>
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
{ return 0; }
@ -100,8 +82,6 @@ Q_DECLARE_INTERFACE(IFace, IId) \
template <> inline IFace *qt_extension<IFace *>(QAbstractExtensionManager *manager, QObject *object) \
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return extension ? static_cast<IFace *>(extension->qt_metacast(IFace##_iid)) : static_cast<IFace *>(0); }
#endif
QT_END_NAMESPACE
QT_END_HEADER

View file

@ -313,7 +313,6 @@ template <QImage::Format format>
Q_STATIC_TEMPLATE_FUNCTION uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, int x, const QVector<QRgb> *rgb);
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_Mono>(const uchar *scanLine,
int x, const QVector<QRgb> *rgb)
{
@ -323,7 +322,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_Mono>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_MonoLSB>(const uchar *scanLine,
int x, const QVector<QRgb> *rgb)
{
@ -333,7 +331,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_MonoLSB>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_Indexed8>(const uchar *scanLine,
int x, const QVector<QRgb> *rgb)
{
@ -341,7 +338,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_Indexed8>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB32>(const uchar *scanLine,
int x, const QVector<QRgb> *)
{
@ -349,7 +345,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB32>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB32_Premultiplied>(const uchar *scanLine,
int x, const QVector<QRgb> *)
{
@ -357,7 +352,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB32_Premultiplied>(const uchar
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB16>(const uchar *scanLine,
int x, const QVector<QRgb> *)
{
@ -365,7 +359,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB16>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB8565_Premultiplied>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -375,7 +368,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB8565_Premultiplied>(const ucha
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB666>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -385,7 +377,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB666>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB6666_Premultiplied>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -395,7 +386,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB6666_Premultiplied>(const ucha
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB555>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -405,7 +395,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB555>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB8555_Premultiplied>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -415,7 +404,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB8555_Premultiplied>(const ucha
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB888>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -425,7 +413,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB888>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB444>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -435,7 +422,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_RGB444>(const uchar *scanLine,
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB4444_Premultiplied>(const uchar *scanLine,
int x,
const QVector<QRgb> *)
@ -445,7 +431,6 @@ uint QT_FASTCALL qt_fetchPixel<QImage::Format_ARGB4444_Premultiplied>(const ucha
}
template<>
Q_STATIC_TEMPLATE_SPECIALIZATION
uint QT_FASTCALL qt_fetchPixel<QImage::Format_Invalid>(const uchar *,
int ,
const QVector<QRgb> *)
@ -499,7 +484,7 @@ Q_STATIC_TEMPLATE_FUNCTION const uint * QT_FASTCALL qt_fetchUntransformed(uint *
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION const uint * QT_FASTCALL
const uint * QT_FASTCALL
qt_fetchUntransformed<QImage::Format_ARGB32_Premultiplied>(uint *, const Operator *,
const QSpanData *data,
int y, int x, int)
@ -3347,7 +3332,6 @@ static void blend_untransformed_argb(int count, const QSpan *spans, void *userDa
}
template <class DST, class SRC>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void madd_2(DST *dest, const quint16 alpha, const SRC *src)
{
Q_ASSERT((quintptr(dest) & 0x3) == 0);
@ -3357,7 +3341,6 @@ inline void madd_2(DST *dest, const quint16 alpha, const SRC *src)
}
template <class DST, class SRC>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void madd_4(DST *dest, const quint32 alpha, const SRC *src)
{
Q_ASSERT((quintptr(dest) & 0x3) == 0);
@ -3370,7 +3353,6 @@ inline void madd_4(DST *dest, const quint32 alpha, const SRC *src)
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void madd_4(qargb8565 *dest, const quint32 a, const qargb8565 *src)
{
Q_ASSERT((quintptr(dest) & 0x3) == 0);
@ -3452,7 +3434,6 @@ inline void madd_4(qargb8565 *dest, const quint32 a, const qargb8565 *src)
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void madd_4(qargb8555 *dest, const quint32 a, const qargb8555 *src)
{
Q_ASSERT((quintptr(dest) & 0x3) == 0);
@ -3533,7 +3514,6 @@ inline void madd_4(qargb8555 *dest, const quint32 a, const qargb8555 *src)
#endif
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 alpha_2(const T *src)
{
Q_ASSERT((quintptr(src) & 0x3) == 0);
@ -3545,7 +3525,6 @@ inline quint16 alpha_2(const T *src)
}
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 alpha_4(const T *src)
{
Q_ASSERT((quintptr(src) & 0x3) == 0);
@ -3559,7 +3538,6 @@ inline quint32 alpha_4(const T *src)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 alpha_4(const qargb8565 *src)
{
const quint8 *src8 = reinterpret_cast<const quint8*>(src);
@ -3567,7 +3545,6 @@ inline quint32 alpha_4(const qargb8565 *src)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 alpha_4(const qargb6666 *src)
{
const quint8 *src8 = reinterpret_cast<const quint8*>(src);
@ -3578,7 +3555,6 @@ inline quint32 alpha_4(const qargb6666 *src)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 alpha_4(const qargb8555 *src)
{
Q_ASSERT((quintptr(src) & 0x3) == 0);
@ -3587,7 +3563,6 @@ inline quint32 alpha_4(const qargb8555 *src)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 alpha_2(const qargb4444 *src)
{
const quint32 *src32 = reinterpret_cast<const quint32*>(src);
@ -3597,7 +3572,6 @@ inline quint16 alpha_2(const qargb4444 *src)
}
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_alpha_2(quint16 alpha, const T*)
{
return (T::alpha((alpha >> 8) & 0xff) << 8)
@ -3605,7 +3579,6 @@ inline quint16 eff_alpha_2(quint16 alpha, const T*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_alpha_2(quint16 a, const qrgb565*)
{
return ((((a & 0xff00) + 0x0100) >> 3) & 0xff00)
@ -3613,7 +3586,6 @@ inline quint16 eff_alpha_2(quint16 a, const qrgb565*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_alpha_2(quint16 a, const qrgb444*)
{
return (((a & 0x00ff) + 0x0001) >> 4)
@ -3621,7 +3593,6 @@ inline quint16 eff_alpha_2(quint16 a, const qrgb444*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_alpha_2(quint16 a, const qargb4444*)
{
return (((a & 0x00ff) + 0x0001) >> 4)
@ -3629,7 +3600,6 @@ inline quint16 eff_alpha_2(quint16 a, const qargb4444*)
}
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_ialpha_2(quint16 alpha, const T*)
{
return (T::ialpha((alpha >> 8) & 0xff) << 8)
@ -3637,28 +3607,24 @@ inline quint16 eff_ialpha_2(quint16 alpha, const T*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_ialpha_2(quint16 a, const qrgb565 *dummy)
{
return 0x2020 - eff_alpha_2(a, dummy);
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_ialpha_2(quint16 a, const qargb4444 *dummy)
{
return 0x1010 - eff_alpha_2(a, dummy);
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint16 eff_ialpha_2(quint16 a, const qrgb444 *dummy)
{
return 0x1010 - eff_alpha_2(a, dummy);
}
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 alpha, const T*)
{
return (T::alpha(alpha >> 24) << 24)
@ -3668,14 +3634,12 @@ inline quint32 eff_alpha_4(quint32 alpha, const T*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 a, const qrgb888*)
{
return a;
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 a, const qargb8565*)
{
return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00)
@ -3683,7 +3647,6 @@ inline quint32 eff_alpha_4(quint32 a, const qargb8565*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 a, const qargb6666*)
{
return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00)
@ -3691,7 +3654,6 @@ inline quint32 eff_alpha_4(quint32 a, const qargb6666*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 a, const qrgb666*)
{
return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00)
@ -3699,7 +3661,6 @@ inline quint32 eff_alpha_4(quint32 a, const qrgb666*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_alpha_4(quint32 a, const qargb8555*)
{
return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00)
@ -3707,7 +3668,6 @@ inline quint32 eff_alpha_4(quint32 a, const qargb8555*)
}
template <class T>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 alpha, const T*)
{
return (T::ialpha(alpha >> 24) << 24)
@ -3717,35 +3677,30 @@ inline quint32 eff_ialpha_4(quint32 alpha, const T*)
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 a, const qrgb888*)
{
return ~a;
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 a, const qargb8565 *dummy)
{
return 0x20202020 - eff_alpha_4(a, dummy);
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 a, const qargb6666 *dummy)
{
return 0x40404040 - eff_alpha_4(a, dummy);
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 a, const qrgb666 *dummy)
{
return 0x40404040 - eff_alpha_4(a, dummy);
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 eff_ialpha_4(quint32 a, const qargb8555 *dummy)
{
return 0x20202020 - eff_alpha_4(a, dummy);
@ -4492,7 +4447,6 @@ void QT_FASTCALL blendUntransformed_dest24(DST *dest, const SRC *src,
}
template <class DST, class SRC>
Q_STATIC_TEMPLATE_SPECIALIZATION
void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData*>(userData);

View file

@ -66,12 +66,6 @@
QT_BEGIN_NAMESPACE
#if defined(Q_CC_MSVC) && _MSCVER <= 1300 && !defined(Q_CC_INTEL)
#define Q_STATIC_TEMPLATE_SPECIALIZATION static
#else
#define Q_STATIC_TEMPLATE_SPECIALIZATION
#endif
// RVCT doesn't like static template functions
#if defined(Q_CC_RVCT)
#define Q_STATIC_TEMPLATE_FUNCTION

View file

@ -443,7 +443,6 @@ Q_STATIC_TEMPLATE_FUNCTION inline void qt_memrotate270_template(const SRC *src,
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void qt_memrotate90_template<quint24, quint24>(const quint24 *src,
int srcWidth, int srcHeight, int srcStride,
quint24 *dest, int dstStride)
@ -466,7 +465,6 @@ inline void qt_memrotate90_template<quint24, quint24>(const quint24 *src,
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void qt_memrotate90_template<quint24, quint32>(const quint32 *src,
int srcWidth, int srcHeight, int srcStride,
quint24 *dest, int dstStride)
@ -489,7 +487,6 @@ inline void qt_memrotate90_template<quint24, quint32>(const quint32 *src,
}
template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline void qt_memrotate90_template<quint18, quint32>(const quint32 *src,
int srcWidth, int srcHeight, int srcStride,
quint18 *dest, int dstStride)

View file

@ -547,11 +547,5 @@ _SRC_CLUCENE_CLUCENE_CONFIG_H
*/
#endif
#if defined Q_CC_MSVC && _MSC_VER < 1300
# define LUCENE_NO_STDC_NAMESPACE
#endif
#endif // QCLUCENE_CONFIG_P_H

View file

@ -421,21 +421,6 @@ qsreal ToInteger(qsreal n)
return sign * ::floor(::fabs(n));
}
#ifdef Q_CC_MSVC
// MSVC2008 crashes if these are inlined.
QString ToString(qsreal value)
{
return JSC::UString::from(value);
}
qsreal ToNumber(const QString &value)
{
return ((JSC::UString)value).toDouble();
}
#endif
static const qsreal MsPerSecond = 1000.0;
static inline int MsFromTime(qsreal t)
@ -4537,9 +4522,4 @@ Q_AUTOTEST_EXPORT bool qt_script_isJITEnabled()
}
#endif
#ifdef Q_CC_MSVC
// Try to prevent compiler from crashing.
#pragma optimize("", off)
#endif
QT_END_NAMESPACE

View file

@ -113,14 +113,8 @@ namespace QScript
inline quint32 ToUInt32(const QString &);
inline quint16 ToUInt16(const QString &);
inline qsreal ToInteger(const QString &);
#ifdef Q_CC_MSVC
// MSVC2008 crashes if these are inlined.
qsreal ToNumber(const QString &);
QString ToString(qsreal);
#else
inline qsreal ToNumber(const QString &);
inline QString ToString(qsreal);
#endif
QDateTime MsToDateTime(JSC::ExecState *, qsreal);
qsreal DateTimeToMs(JSC::ExecState *, const QDateTime &);
@ -527,9 +521,6 @@ inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec)
return static_cast<GlobalClientData*>(exec->globalData().clientData)->engine;
}
#ifndef Q_CC_MSVC
// MSVC2008 crashes if these are inlined.
inline QString ToString(qsreal value)
{
return JSC::UString::from(value);
@ -540,8 +531,6 @@ inline qsreal ToNumber(const QString &value)
return ((JSC::UString)value).toDouble();
}
#endif
inline qint32 ToInt32(const QString &value)
{
return ToInt32(ToNumber(value));

View file

@ -640,19 +640,6 @@ static const ClassInfoEntry qclass_lib_map[] = {
{ "QProgressDialog", "QtGui/qprogressdialog.h"},
{ "QWizard", "QtGui/qwizard.h"},
{ "QWizardPage", "QtGui/qwizard.h"},
{ "QAudioDeviceInfo", "QtMultimedia/qaudiodeviceinfo.h"},
{ "QAbstractAudioDeviceInfo", "QtMultimedia/qaudioengine.h"},
{ "QAbstractAudioOutput", "QtMultimedia/qaudioengine.h"},
{ "QAbstractAudioInput", "QtMultimedia/qaudioengine.h"},
{ "QAudioEngineFactoryInterface", "QtMultimedia/qaudioengineplugin.h"},
{ "QAudioEnginePlugin", "QtMultimedia/qaudioengineplugin.h"},
{ "QAudioFormat", "QtMultimedia/qaudioformat.h"},
{ "QAudioInput", "QtMultimedia/qaudioinput.h"},
{ "QAudioOutput", "QtMultimedia/qaudiooutput.h"},
{ "QAbstractVideoBuffer", "QtMultimedia/qabstractvideobuffer.h"},
{ "QAbstractVideoSurface", "QtMultimedia/qabstractvideosurface.h"},
{ "QVideoFrame", "QtMultimedia/qvideoframe.h"},
{ "QVideoSurfaceFormat", "QtMultimedia/qvideosurfaceformat.h"},
{ "QAbstractMessageHandler", "QtXmlPatterns/qabstractmessagehandler.h"},
{ "QAbstractUriResolver", "QtXmlPatterns/qabstracturiresolver.h"},
{ "QXmlNodeModelIndex", "QtXmlPatterns/qabstractxmlnodemodel.h"},
@ -779,6 +766,6 @@ static const ClassInfoEntry qclass_lib_map[] = {
{ "QSslKey", "QtNetwork/qsslkey.h"},
{ "QSslSocket", "QtNetwork/qsslsocket.h"},
};
static const int qclass_lib_count = 773;
static const int qclass_lib_count = 760;
#endif

View file

@ -49,7 +49,7 @@
#include <QtGui/QDateTimeEdit>
#include <QtGui/QHBoxLayout>
#include <QtGui/QMenu>
#include <QtGui/qevent.h>
#include <QtGui/QEvent>
#include <QtGui/QApplication>
#include <QtGui/QLabel>
#include <QtGui/QToolButton>
@ -58,10 +58,6 @@
#include <QtGui/QSpacerItem>
#include <QtCore/QMap>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
QT_BEGIN_NAMESPACE
// Set a hard coded left margin to account for the indentation

View file

@ -44,10 +44,6 @@
#include <QtCore/QMap>
#include <QtGui/QIcon>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
QT_BEGIN_NAMESPACE
class QtPropertyPrivate

View file

@ -57,10 +57,6 @@
#include <limits.h>
#include <float.h>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
QT_BEGIN_NAMESPACE
template <class PrivateData, class Value>

View file

@ -47,10 +47,6 @@
#include <QtCore/qdatetime.h>
#include <QtCore/QLocale>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
QT_BEGIN_NAMESPACE
class QtEnumPropertyType

View file

@ -52,35 +52,29 @@ Symbol::LexemStore Symbol::lexemStore;
static const char *error_msg = 0;
#ifdef Q_CC_MSVC
#define ErrorFormatString "%s(%d): "
#else
#define ErrorFormatString "%s:%d: "
#endif
void Parser::error(int rollback) {
index -= rollback;
error();
}
void Parser::error(const char *msg) {
if (msg || error_msg)
qWarning(ErrorFormatString "Error: %s",
qWarning("%s:%d: Error: %s",
currentFilenames.top().constData(), symbol().lineNum, msg?msg:error_msg);
else
qWarning(ErrorFormatString "Parse error at \"%s\"",
qWarning("%s:%d: Parse error at \"%s\"",
currentFilenames.top().constData(), symbol().lineNum, symbol().lexem().data());
exit(EXIT_FAILURE);
}
void Parser::warning(const char *msg) {
if (displayWarnings && msg)
fprintf(stderr, ErrorFormatString "Warning: %s\n",
fprintf(stderr, "%s:%d: Warning: %s\n",
currentFilenames.top().constData(), qMax(0, index > 0 ? symbol().lineNum : 0), msg);
}
void Parser::note(const char *msg) {
if (displayNotes && msg)
fprintf(stderr, ErrorFormatString "Note: %s\n",
fprintf(stderr, "%s:%d: Note: %s\n",
currentFilenames.top().constData(), qMax(0, index > 0 ? symbol().lineNum : 0), msg);
}

View file

@ -72,24 +72,6 @@ public:
};
Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager")
#if defined(Q_CC_MSVC) && (_MSC_VER < 1300)
template <class T>
inline T qt_extension_helper(QAbstractExtensionManager *, QObject *, T)
{ return 0; }
template <class T>
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
{ return qt_extension_helper(manager, object, T(0)); }
#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \
const char * const IFace##_iid = IId; \
Q_DECLARE_INTERFACE(IFace, IId) \
template <> inline IFace *qt_extension_helper<IFace *>(QAbstractExtensionManager *manager, QObject *object, IFace *) \
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return (IFace *)(extension ? extension->qt_metacast(IFace##_iid) : 0); }
#else
template <class T>
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
{ return 0; }
@ -100,8 +82,6 @@ Q_DECLARE_INTERFACE(IFace, IId) \
template <> inline IFace *qt_extension<IFace *>(QAbstractExtensionManager *manager, QObject *object) \
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return extension ? static_cast<IFace *>(extension->qt_metacast(IFace##_iid)) : static_cast<IFace *>(0); }
#endif
QT_END_NAMESPACE
QT_END_HEADER