author | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
commit | 155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff) | |
tree | e6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/include/qmap.h | |
parent | 86703e8a5527ef114facd02c005b6b3a7e62e263 (diff) | |
download | opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2 |
update qmake to 1.05a
-rw-r--r-- | qmake/include/qmap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake/include/qmap.h b/qmake/include/qmap.h index 269bd6b..4bc0a2f 100644 --- a/qmake/include/qmap.h +++ b/qmake/include/qmap.h | |||
@@ -835,49 +835,53 @@ Q_INLINE_TEMPLATES Q_TYPENAME QMap<Key,T>::iterator QMap<Key,T>::insert( const K | |||
835 | if ( overwrite || n < size() ) | 835 | if ( overwrite || n < size() ) |
836 | it.data() = value; | 836 | it.data() = value; |
837 | return it; | 837 | return it; |
838 | } | 838 | } |
839 | 839 | ||
840 | template<class Key, class T> | 840 | template<class Key, class T> |
841 | Q_INLINE_TEMPLATES void QMap<Key,T>::remove( const Key& k ) | 841 | Q_INLINE_TEMPLATES void QMap<Key,T>::remove( const Key& k ) |
842 | { | 842 | { |
843 | detach(); | 843 | detach(); |
844 | iterator it( sh->find( k ).node ); | 844 | iterator it( sh->find( k ).node ); |
845 | if ( it != end() ) | 845 | if ( it != end() ) |
846 | sh->remove( it ); | 846 | sh->remove( it ); |
847 | } | 847 | } |
848 | 848 | ||
849 | template<class Key, class T> | 849 | template<class Key, class T> |
850 | Q_INLINE_TEMPLATES void QMap<Key,T>::detachInternal() | 850 | Q_INLINE_TEMPLATES void QMap<Key,T>::detachInternal() |
851 | { | 851 | { |
852 | sh->deref(); sh = new QMapPrivate<Key,T>( sh ); | 852 | sh->deref(); sh = new QMapPrivate<Key,T>( sh ); |
853 | } | 853 | } |
854 | 854 | ||
855 | 855 | ||
856 | #ifndef QT_NO_DATASTREAM | 856 | #ifndef QT_NO_DATASTREAM |
857 | template<class Key, class T> | 857 | template<class Key, class T> |
858 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) { | 858 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) { |
859 | m.clear(); | 859 | m.clear(); |
860 | Q_UINT32 c; | 860 | Q_UINT32 c; |
861 | s >> c; | 861 | s >> c; |
862 | for( Q_UINT32 i = 0; i < c; ++i ) { | 862 | for( Q_UINT32 i = 0; i < c; ++i ) { |
863 | Key k; T t; | 863 | Key k; T t; |
864 | s >> k >> t; | 864 | s >> k >> t; |
865 | m.insert( k, t ); | 865 | m.insert( k, t ); |
866 | if ( s.atEnd() ) | 866 | if ( s.atEnd() ) |
867 | break; | 867 | break; |
868 | } | 868 | } |
869 | return s; | 869 | return s; |
870 | } | 870 | } |
871 | 871 | ||
872 | 872 | ||
873 | template<class Key, class T> | 873 | template<class Key, class T> |
874 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) { | 874 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) { |
875 | s << (Q_UINT32)m.size(); | 875 | s << (Q_UINT32)m.size(); |
876 | QMapConstIterator<Key,T> it = m.begin(); | 876 | QMapConstIterator<Key,T> it = m.begin(); |
877 | for( ; it != m.end(); ++it ) | 877 | for( ; it != m.end(); ++it ) |
878 | s << it.key() << it.data(); | 878 | s << it.key() << it.data(); |
879 | return s; | 879 | return s; |
880 | } | 880 | } |
881 | #endif | 881 | #endif |
882 | 882 | ||
883 | #ifdef QT_QWINEXPORT | ||
884 | #define Q_DEFINED_QMAP | ||
885 | #include "qwinexport.h" | ||
886 | #endif /* QT_QWINEXPORT */ | ||
883 | #endif // QMAP_H | 887 | #endif // QMAP_H |