diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2009-11-27 02:27:50.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-01-14 18:10:24.969000000 +0100 @@ -241,7 +241,7 @@ NEVER_INLINE CollectorBlock* Heap::alloc #elif PLATFORM(WINCE) void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); #elif PLATFORM(WIN_OS) -#if COMPILER(MINGW) +#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR) void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE); #else void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE); @@ -327,7 +327,7 @@ NEVER_INLINE void Heap::freeBlock(Collec #elif PLATFORM(WINCE) VirtualFree(block, 0, MEM_RELEASE); #elif PLATFORM(WIN_OS) -#if COMPILER(MINGW) +#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR) __mingw_aligned_free(block); #else _aligned_free(block); @@ -617,7 +617,7 @@ static inline void* currentThreadStackBa MOV pTib, EAX } return static_cast(pTib->StackBase); -#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR)) PNT_TIB64 pTib = reinterpret_cast(NtCurrentTeb()); return reinterpret_cast(pTib->StackBase); #elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(GCC) diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2009-11-27 02:27:48.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-01-14 16:40:07.659000000 +0100 @@ -257,7 +257,7 @@ NEVER_INLINE CollectorBlock* Heap::alloc #elif PLATFORM(WINCE) void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); #elif PLATFORM(WIN_OS) -#if COMPILER(MINGW) +#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR) void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE); #else void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE); @@ -343,7 +343,7 @@ NEVER_INLINE void Heap::freeBlock(Collec #elif PLATFORM(WINCE) VirtualFree(block, 0, MEM_RELEASE); #elif PLATFORM(WIN_OS) -#if COMPILER(MINGW) +#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR) __mingw_aligned_free(block); #else _aligned_free(block); @@ -590,7 +590,7 @@ static inline void* currentThreadStackBa MOV pTib, EAX } return static_cast(pTib->StackBase); -#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR)) PNT_TIB64 pTib = reinterpret_cast(NtCurrentTeb()); return reinterpret_cast(pTib->StackBase); #elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(GCC) diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/Arena.h fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/Arena.h --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/Arena.h 2009-11-27 02:27:50.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/Arena.h 2010-01-14 16:39:59.499000000 +0100 @@ -44,7 +44,11 @@ namespace WebCore { +#if defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64) +typedef qulonglong uword; +#else typedef unsigned long uword; +#endif struct Arena { Arena* next; // next arena diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp 2009-11-27 02:27:50.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp 2010-01-14 16:55:35.002000000 +0100 @@ -101,7 +101,7 @@ String TextStream::release() return String::adopt(m_text); } -#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR)) TextStream& TextStream::operator<<(__int64 i) { char buffer[printBufferSize]; diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.h fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.h --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.h 2009-11-27 02:27:50.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/platform/text/TextStream.h 2010-01-14 16:55:11.053000000 +0100 @@ -44,7 +44,7 @@ public: TextStream& operator<<(double); TextStream& operator<<(const char*); TextStream& operator<<(const String&); -#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR)) TextStream& operator<<(unsigned __int64); TextStream& operator<<(__int64); #endif diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp 2009-11-27 02:27:49.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp 2010-01-14 16:46:55.827000000 +0100 @@ -319,7 +319,7 @@ void PluginView::stop() WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC); if (currentWndProc == PluginViewWndProc) - SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)m_pluginWndProc); + SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (quintptr)m_pluginWndProc); #endif } #endif // XP_WIN diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp 2009-11-27 02:27:49.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp 2010-01-14 17:07:51.059000000 +0100 @@ -526,7 +526,7 @@ void PluginView::paintIntoTransformedCon NPEvent npEvent; npEvent.event = WM_WINDOWPOSCHANGED; - npEvent.lParam = reinterpret_cast(&windowpos); + npEvent.lParam = reinterpret_cast(&windowpos); npEvent.wParam = 0; dispatchNPEvent(npEvent); @@ -534,7 +534,7 @@ void PluginView::paintIntoTransformedCon setNPWindowRect(frameRect()); npEvent.event = WM_PAINT; - npEvent.wParam = reinterpret_cast(hdc); + npEvent.wParam = reinterpret_cast(hdc); // This is supposed to be a pointer to the dirty rect, but it seems that the Flash plugin // ignores it so we just pass null. @@ -803,7 +803,7 @@ void PluginView::setNPWindowRect(const I #else WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC); if (currentWndProc != PluginViewWndProc) - m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)PluginViewWndProc); + m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (quintptr)PluginViewWndProc); #endif } } @@ -1000,7 +1000,7 @@ bool PluginView::platformStart() #elif PLATFORM(WINCE) ::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc); #else - ::SetWindowLongPtrA(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProcA); + ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (quintptr)DefWindowProcA); #endif SetProp(platformPluginWidget(), kWebPluginViewProperty, this); diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxbase.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxbase.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxbase.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxbase.cpp 2010-01-13 21:03:33.266000000 +0100 @@ -1352,8 +1352,8 @@ bool QAxBase::initializeFromFile(IUnknow } -// There seams to be a naming problem in mingw headers -#ifdef Q_CC_GNU +// There seams to be a naming problem in mingw headers, but not in mingw64 +#if defined (Q_CC_GNU) && !defined(__MINGW64_VERSION_MAJOR) #ifndef COAUTHIDENTITY #define COAUTHIDENTITY AUTH_IDENTITY #endif diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxwidget.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxwidget.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxwidget.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/container/qaxwidget.cpp 2010-01-13 21:02:06.522000000 +0100 @@ -76,8 +76,8 @@ // #define QAX_SUPPORT_WINDOWLESS // #define QAX_SUPPORT_BORDERSPACE -// missing interface from win32api -#if defined(Q_CC_GNU) +// missing interface from win32api, but not in mingw64 +#if defined(Q_CC_GNU) && !defined(__MINGW64_VERSION_MAJOR) # if !defined(IOleInPlaceObjectWindowless) # undef INTERFACE # define INTERFACE IOleInPlaceObjectWindowless diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/control/qaxserverbase.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/control/qaxserverbase.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/activeqt/control/qaxserverbase.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/activeqt/control/qaxserverbase.cpp 2010-01-13 21:10:17.673000000 +0100 @@ -1536,7 +1536,7 @@ HWND QAxServerBase::create(HWND hWndPare HINSTANCE hInst = (HINSTANCE)qAxInstance; EnterCriticalSection(&createWindowSection); QString cn(QLatin1String("QAxControl")); - cn += QString::number((int)ActiveXProc); + cn += QString::number((quintptr)ActiveXProc); if (!atom) { WNDCLASS wcTemp; wcTemp.style = CS_DBLCLKS; @@ -1599,10 +1599,10 @@ HMENU QAxServerBase::createPopup(QMenu * ushort itemId; if (flags & MF_POPUP) { itemId = static_cast( - reinterpret_cast(createPopup(action->menu())) + reinterpret_cast(createPopup(action->menu())) ); } else { - itemId = static_cast(reinterpret_cast(action)); + itemId = static_cast(reinterpret_cast(action)); actionMap.remove(itemId); actionMap.insert(itemId, action); } @@ -1646,10 +1646,10 @@ void QAxServerBase::createMenu(QMenuBar ushort itemId; if (flags & MF_POPUP) { itemId = static_cast( - reinterpret_cast(createPopup(action->menu())) + reinterpret_cast(createPopup(action->menu())) ); } else { - itemId = static_cast(reinterpret_cast(action)); + itemId = static_cast(reinterpret_cast(action)); actionMap.insert(itemId, action); } AppendMenu(hmenuShared, flags, itemId, (const wchar_t *)action->text().utf16()); diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/corelib/kernel/qcoreapplication_win.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/corelib/kernel/qcoreapplication_win.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/corelib/kernel/qcoreapplication_win.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/corelib/kernel/qcoreapplication_win.cpp 2010-01-13 17:18:09.310200000 +0100 @@ -1021,14 +1021,14 @@ QString decodeMSG(const MSG& msg) LPWINDOWPOS winPos = (LPWINDOWPOS)lParam; if (!winPos) break; - QString hwndAfter = valueCheck((uint)winPos->hwndInsertAfter, - FLAG_STRING((uint)HWND_BOTTOM, "HWND_BOTTOM"), - FLAG_STRING((int)HWND_NOTOPMOST, "HWND_NOTOPMOST"), - FLAG_STRING((uint)HWND_TOP, "HWND_TOP"), - FLAG_STRING((int)HWND_TOPMOST, "HWND_TOPMOST"), + QString hwndAfter = valueCheck((quintptr)winPos->hwndInsertAfter, + FLAG_STRING((quintptr)HWND_BOTTOM, "HWND_BOTTOM"), + FLAG_STRING((qptrdiff)HWND_NOTOPMOST, "HWND_NOTOPMOST"), + FLAG_STRING((quintptr)HWND_TOP, "HWND_TOP"), + FLAG_STRING((qptrdiff)HWND_TOPMOST, "HWND_TOPMOST"), FLAG_STRING()); if (hwndAfter.size() == 0) - hwndAfter = QString::number((uint)winPos->hwndInsertAfter, 16); + hwndAfter = QString::number((quintptr)winPos->hwndInsertAfter, 16); QString flags = flagCheck(winPos->flags, FLGSTR(SWP_DRAWFRAME), FLGSTR(SWP_FRAMECHANGED), diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/corelib/thread/qmutex.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/corelib/thread/qmutex.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/corelib/thread/qmutex.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/corelib/thread/qmutex.cpp 2010-01-13 16:44:11.834200000 +0100 @@ -160,7 +160,7 @@ void QMutex::lock() #ifndef QT_NO_DEBUG if (d->owner == self) qWarning("QMutex::lock: Deadlock detected in thread %ld", - long(d->owner)); + quintptr(d->owner)); #endif // didn't get the lock, wait for it @@ -198,7 +198,7 @@ void QMutex::lock() #ifndef QT_NO_DEBUG if (d->owner == self) qWarning("QMutex::lock: Deadlock detected in thread %ld", - long(d->owner)); + quintptr(d->owner)); #endif // didn't get the lock, wait for it diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/gui/kernel/qkeymapper_win.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/gui/kernel/qkeymapper_win.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/gui/kernel/qkeymapper_win.cpp 2009-11-27 02:27:53.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/gui/kernel/qkeymapper_win.cpp 2010-01-13 18:28:05.557200000 +0100 @@ -619,7 +619,7 @@ void QKeyMapperPrivate::clearMappings() /* MAKELCID()'s first argument is a WORD, and GetKeyboardLayout() * returns a DWORD. */ - LCID newLCID = MAKELCID((DWORD)GetKeyboardLayout(0), SORT_DEFAULT); + LCID newLCID = MAKELCID((quintptr)GetKeyboardLayout(0), SORT_DEFAULT); // keyboardInputLocale = qt_localeFromLCID(newLCID); bool bidi = false; diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper.cpp 2009-11-27 02:27:53.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper.cpp 2010-01-13 18:38:41.056200000 +0100 @@ -3696,7 +3696,7 @@ template <> Q_STATIC_TEMPLATE_SPECIALIZATION inline quint32 alpha_4(const qargb8555 *src) { - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint8 *src8 = reinterpret_cast(src); return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9]; } @@ -4022,8 +4022,8 @@ template <> inline void interpolate_pixel_4(qargb8565 *dest, const qargb8565 *src, quint32 alpha) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = eff_alpha_4(alpha, dest); const quint32 ia = eff_ialpha_4(alpha, dest); @@ -4118,8 +4118,8 @@ template <> inline void interpolate_pixel_4(qargb8555 *dest, const qargb8555 *src, quint32 alpha) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = eff_alpha_4(alpha, dest); @@ -4214,8 +4214,8 @@ template <> inline void interpolate_pixel_4(qrgb888 *dest, const qrgb888 *src, quint32 alpha) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = eff_alpha_4(alpha, dest); const quint32 ia = eff_ialpha_4(alpha, dest); @@ -4315,8 +4315,8 @@ inline void blend_sourceOver_4(DST *dest template <> inline void blend_sourceOver_4(qargb8565 *dest, const qargb8565 *src) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = alpha_4(src); if (a == 0xffffffff) { @@ -4329,8 +4329,8 @@ inline void blend_sourceOver_4(qargb8565 template <> inline void blend_sourceOver_4(qargb8555 *dest, const qargb8555 *src) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = alpha_4(src); if (a == 0xffffffff) { @@ -4343,8 +4343,8 @@ inline void blend_sourceOver_4(qargb8555 template <> inline void blend_sourceOver_4(qargb6666 *dest, const qargb6666 *src) { - Q_ASSERT((long(dest) & 0x3) == 0); - Q_ASSERT((long(src) & 0x3) == 0); + Q_ASSERT((quintptr(dest) & 0x3) == 0); + Q_ASSERT((quintptr(src) & 0x3) == 0); const quint32 a = alpha_4(src); if (a == 0xffffffff) { diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper_p.h fixed/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper_p.h --- orig/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper_p.h 2009-11-27 02:27:53.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/gui/painting/qdrawhelper_p.h 2010-01-13 17:32:41.081200000 +0100 @@ -1646,7 +1646,7 @@ inline void qt_memconvert(qrgb666 *dest, return; } - const int align = (long(dest) & 3); + const int align = (quintptr(dest) & 3); switch (align) { case 1: *dest++ = qrgb666(*src++); --count; case 2: *dest++ = qrgb666(*src++); --count; diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/gui/text/qfontengine_win.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/gui/text/qfontengine_win.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/gui/text/qfontengine_win.cpp 2009-11-27 02:27:52.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/gui/text/qfontengine_win.cpp 2010-01-13 18:46:43.229200000 +0100 @@ -208,7 +208,7 @@ void QFontEngineWin::getCMap() unitsPerEm = otm->otmEMSquare; x_height = (int)otm->otmsXHeight; loadKerningPairs(designToDevice); - _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFullName)).toLatin1(); + _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1(); lineWidth = otm->otmsUnderscoreSize; fsType = otm->otmfsType; free(otm); @@ -987,8 +987,8 @@ QFontEngine::Properties QFontEngineWin:: Properties p; p.emSquare = unitsPerEm; p.italicAngle = otm->otmItalicAngle; - p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFamilyName)).toLatin1(); - p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpStyleName)).toLatin1(); + p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFamilyName)).toLatin1(); + p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpStyleName)).toLatin1(); #ifndef QT_NO_PRINTER p.postscriptName = QPdf::stripSpecialCharacters(p.postscriptName); #endif diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3richtext.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3richtext.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3richtext.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3richtext.cpp 2010-01-13 19:39:28.492200000 +0100 @@ -6667,7 +6667,7 @@ Q3TextImage::Q3TextImage(Q3TextDocument imageName = attr[QLatin1String("source")]; if (!imageName.isEmpty()) { - imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((ulong)&factory); + imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((quintptr)&factory); if (!pixmap_map) pixmap_map = new QMap; if (pixmap_map->contains(imgId)) { diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3textstream.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3textstream.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3textstream.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/text/q3textstream.cpp 2010-01-13 19:43:47.687200000 +0100 @@ -2084,7 +2084,7 @@ Q3TextStream &Q3TextStream::operator<<( setf( hex, basefield ); setf( showbase ); unsetf( uppercase ); - output_int( I_LONG | I_UNSIGNED, (ulong)ptr, FALSE ); + output_int( I_LONG | I_UNSIGNED, (quintptr)ptr, FALSE ); flags( f ); return *this; } diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gcache.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gcache.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gcache.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gcache.cpp 2010-01-13 19:33:01.935200000 +0100 @@ -226,7 +226,7 @@ public: bool remove_ascii(Q3CacheItem *item) { return Q3GDict::remove_ascii((const char *)item->key,item); } bool remove_int(Q3CacheItem *item) - { return Q3GDict::remove_int((long)item->key,item);} + { return Q3GDict::remove_int((quintptr)item->key,item);} void statistics() { Q3GDict::statistics(); } @@ -426,7 +426,7 @@ bool Q3GCache::insert_other(const char * if (keytype == AsciiKey) dict->insert_ascii(key, ci); else - dict->insert_int((long)key, ci); + dict->insert_int((quintptr)key, ci); tCost += cost; return true; } @@ -486,7 +486,7 @@ Q3PtrCollection::Item Q3GCache::take_oth if (keytype == AsciiKey) ci = dict->take_ascii(key); else - ci = dict->take_int((long)key); + ci = dict->take_int((quintptr)key); Item d; if (ci) { d = ci->data; @@ -563,7 +563,7 @@ Q3PtrCollection::Item Q3GCache::find_str Q3PtrCollection::Item Q3GCache::find_other(const char *key, bool ref) const { Q3CacheItem *ci = keytype == AsciiKey ? dict->find_ascii(key) - : dict->find_int((long)key); + : dict->find_int((quintptr)key); #if defined(QT_DEBUG) lruList->finds++; #endif @@ -811,7 +811,7 @@ const char *Q3GCacheIterator::getKeyAsci long Q3GCacheIterator::getKeyInt() const { Q3CacheItem *item = it->current(); - return item ? (long)item->key : 0; + return item ? (quintptr)item->key : 0; } /*! diff -upr orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gdict.cpp fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gdict.cpp --- orig/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gdict.cpp 2009-11-27 02:27:54.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/src/qt3support/tools/q3gdict.cpp 2010-01-13 19:35:47.263200000 +0100 @@ -437,7 +437,7 @@ Q3PtrCollection::Item Q3GDict::look_int( Q3PtrCollection::Item Q3GDict::look_ptr(void *key, Q3PtrCollection::Item d, int op) { Q3PtrBucket *n; - int index = (int)((ulong)key % vlen); // simple hash + int index = (int)((quintptr)key % vlen); // simple hash if (op == op_find) { // find for (n=(Q3PtrBucket*)vec[index]; n; n=(Q3PtrBucket*)n->getNext()) { @@ -650,7 +650,7 @@ Q3PtrBucket *Q3GDict::unlink_ptr(void *k return 0; Q3PtrBucket *n; Q3PtrBucket *prev = 0; - int index = (int)((ulong)key % vlen); + int index = (int)((quintptr)key % vlen); for (n=(Q3PtrBucket *)vec[index]; n; n=(Q3PtrBucket *)n->getNext()) { bool found = (n->getKey() == key); if (found && d) diff -upr orig/qt-everywhere-opensource-src-4.6.0/tools/assistant/lib/qhelp_global.cpp fixed/qt-everywhere-opensource-src-4.6.0/tools/assistant/lib/qhelp_global.cpp --- orig/qt-everywhere-opensource-src-4.6.0/tools/assistant/lib/qhelp_global.cpp 2009-11-27 02:27:46.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/tools/assistant/lib/qhelp_global.cpp 2010-01-14 18:41:23.454000000 +0100 @@ -55,7 +55,7 @@ QString QHelpGlobal::uniquifyConnectionN counter = 0; return QString::fromLatin1("%1-%2-%3"). - arg(name).arg(long(pointer)).arg(counter); + arg(name).arg(quintptr(pointer)).arg(counter); } QString QHelpGlobal::documentTitle(const QString &content) diff -upr orig/qt-everywhere-opensource-src-4.6.0/tools/qdoc3/codemarker.cpp fixed/qt-everywhere-opensource-src-4.6.0/tools/qdoc3/codemarker.cpp --- orig/qt-everywhere-opensource-src-4.6.0/tools/qdoc3/codemarker.cpp 2009-11-27 02:27:47.000000000 +0100 +++ fixed/qt-everywhere-opensource-src-4.6.0/tools/qdoc3/codemarker.cpp 2010-01-14 21:01:50.411800000 +0100 @@ -177,7 +177,7 @@ const Node *CodeMarker::nodeForString(co QString CodeMarker::stringForNode(const Node *node) { if (sizeof(const Node *) == sizeof(ulong)) { - return QString::number(reinterpret_cast(node)); + return QString::number(reinterpret_cast(node)); } else { return QString::number(reinterpret_cast(node));