diff -Naur qt-4.2.2-orig/src/corelib/tools/qhash.h qt-4.2.2/src/corelib/tools/qhash.h --- qt-4.2.2-orig/src/corelib/tools/qhash.h 2006-12-17 03:53:53.406250000 +0900 +++ qt-4.2.2/src/corelib/tools/qhash.h 2006-12-17 05:16:20.921875000 +0900 @@ -848,8 +848,11 @@ QMultiHash() {} QMultiHash(const QHash &other) : QHash(other) {} - inline typename QHash::iterator replace(const Key &key, const T &value); - inline typename QHash::iterator insert(const Key &key, const T &value); + // fix for vs2005 SP1 + // cf. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=987536&SiteID=1 + typedef QHash::iterator QHashItr; + inline typename QHashItr replace(const Key &key, const T &value); + inline typename QHashItr insert(const Key &key, const T &value); inline QMultiHash &operator+=(const QMultiHash &other) { unite(other); return *this; } @@ -862,11 +865,11 @@ }; template -Q_INLINE_TEMPLATE Q_TYPENAME QHash::iterator QMultiHash::replace(const Key &akey, const T &avalue) +Q_INLINE_TEMPLATE Q_TYPENAME QMultiHash::QHashItr QMultiHash::replace(const Key &akey, const T &avalue) { return QHash::insert(akey, avalue); } template -Q_INLINE_TEMPLATE Q_TYPENAME QHash::iterator QMultiHash::insert(const Key &akey, const T &avalue) +Q_INLINE_TEMPLATE Q_TYPENAME QMultiHash::QHashItr QMultiHash::insert(const Key &akey, const T &avalue) { return QHash::insertMulti(akey, avalue); } diff -Naur qt-4.2.2-orig/src/corelib/tools/qmap.h qt-4.2.2/src/corelib/tools/qmap.h --- qt-4.2.2-orig/src/corelib/tools/qmap.h 2006-12-17 03:53:03.437500000 +0900 +++ qt-4.2.2/src/corelib/tools/qmap.h 2006-12-17 05:16:29.984375000 +0900 @@ -890,8 +890,11 @@ QMultiMap() {} QMultiMap(const QMap &other) : QMap(other) {} - inline typename QMap::iterator replace(const Key &key, const T &value); - inline typename QMap::iterator insert(const Key &key, const T &value); + // fix for vs2005 SP1 + // cf. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=987536&SiteID=1 + typedef QMap::iterator QMapItr; + inline typename QMapItr replace( const Key &key, const T &value ); + inline typename QMapItr insert( const Key &key, const T &value ); inline QMultiMap &operator+=(const QMultiMap &other) { unite(other); return *this; } @@ -904,11 +907,11 @@ }; template -Q_INLINE_TEMPLATE Q_TYPENAME QMap::iterator QMultiMap::replace(const Key &akey, const T &avalue) +Q_INLINE_TEMPLATE Q_TYPENAME QMultiMap::QMapItr QMultiMap::replace(const Key &akey, const T &avalue) { return QMap::insert(akey, avalue); } template -Q_INLINE_TEMPLATE Q_TYPENAME QMap::iterator QMultiMap::insert(const Key &akey, const T &avalue) +Q_INLINE_TEMPLATE Q_TYPENAME QMultiMap::QMapItr QMultiMap::insert(const Key &akey, const T &avalue) { return QMap::insertMulti(akey, avalue); }