--- a/shared/MetaValues.h
+++ b/shared/MetaValues.h
@@ -29,7 +29,7 @@ namespace Meta
     /** This type can be used when a number of fields need to
      *  be given to some functions.
      */
-    typedef QHash<qint64, QVariant> FieldHash;
+    typedef QMultiHash<qint64, QVariant> FieldHash;
 
     // the following constants are used at a number of places,
     // Most importantly the QueryMaker
--- a/src/covermanager/CoverFetchUnit.h
+++ b/src/covermanager/CoverFetchUnit.h
@@ -51,7 +51,7 @@ namespace CoverFetch
     };
 
     typedef QHash<QString, QString> Metadata;
-    typedef QHash<QUrl, Metadata> Urls;
+    typedef QMultiHash<QUrl, Metadata> Urls;
 }
 
 /**
--- a/src/playlist/navigators/AlbumNavigator.h
+++ b/src/playlist/navigators/AlbumNavigator.h
@@ -62,7 +62,7 @@ namespace Playlist
              */
             AlbumId currentAlbum() { return currentItem() ? albumForItem( currentItem() ) : AlbumId(); }
 
-            QHash<AlbumId, ItemList> m_itemsPerAlbum;    //!< For use by child classes. Maintained automatically.
+            QMultiHash<AlbumId, ItemList> m_itemsPerAlbum;    //!< For use by child classes. Maintained automatically.
             QList<AlbumId> m_plannedAlbums;    //!< For use by child classes. Cleared automatically.
 
         private:
--- a/src/playlist/navigators/AlbumNavigator.cpp
+++ b/src/playlist/navigators/AlbumNavigator.cpp
@@ -43,12 +43,18 @@ Playlist::AlbumNavigator::notifyItemsIns
     foreach( quint64 insertedItem, insertedItems )
     {
         AlbumId album = albumForItem( insertedItem );
-        m_itemsPerAlbum[album].append( insertedItem ); // conveniently creates an empty list if none exists
+        ItemList insertedItemList = m_itemsPerAlbum.values(album)[0];
+        insertedItemList.append( insertedItem );
+        m_itemsPerAlbum.replace( album, insertedItemList );
         modifiedAlbums.insert( album );
     }
 
     foreach( AlbumId album, modifiedAlbums )
-        std::stable_sort( m_itemsPerAlbum[album].begin(), m_itemsPerAlbum[album].end(), itemLessThan );
+    {
+        ItemList itemList = m_itemsPerAlbum.values(album)[0];
+        std::stable_sort( itemList.begin(), itemList.end(), itemLessThan );
+        m_itemsPerAlbum.replace( album, itemList );
+    }
 
     notifyAlbumsInserted( ( modifiedAlbums - oldAlbums ).values() );
 }
@@ -85,7 +91,7 @@ Playlist::AlbumNavigator::notifyItemsRem
             m_plannedAlbums.removeAll( album );
         }
         else
-            m_itemsPerAlbum.insert( album, itemsInAlbum );    // Replace old list with the edited copy.
+            m_itemsPerAlbum.replace( album, itemsInAlbum );    // Replace old list with the edited copy.
 
         // Maintain 'm_albumForItem'.
         m_albumForItem.remove( removedItem );
--- a/src/playlistgenerator/ConstraintGroup.h
+++ b/src/playlistgenerator/ConstraintGroup.h
@@ -24,7 +24,7 @@
 #include "core/meta/forward_declarations.h"
 
 #include <QDomElement>
-#include <QHash>
+#include <QMultiHash>
 #include <QList>
 #include <QObject>
 #include <QString>
@@ -64,7 +64,7 @@ class ConstraintGroup : public Constrain
         MatchType m_matchtype;
 
         // internal mathematical functions
-        double combineInterdependentConstraints( const Meta::TrackList&, const double, const QHash<int,int>& ) const;
+        double combineInterdependentConstraints( const Meta::TrackList&, const double, const QMultiHash<int,int>& ) const;
 };
 
 class ConstraintGroupEditWidget : public QWidget {
--- a/src/playlistgenerator/ConstraintGroup.cpp
+++ b/src/playlistgenerator/ConstraintGroup.cpp
@@ -167,7 +167,7 @@ ConstraintGroup::satisfaction( const Met
         return 1.0;
     }
 
-    QHash<int,int> constraintMatchTypes;
+    QMultiHash<int,int> constraintMatchTypes;
 
     // TODO: there's got to be a more efficient way of handling interdependent constraints
     for ( int i = 0; i < m_children.size(); i++ ) {
@@ -217,7 +217,7 @@ ConstraintGroup::suggestPlaylistSize() c
 }
 
 double
-ConstraintGroup::combineInterdependentConstraints( const Meta::TrackList& l, const double s, const QHash<int,int>& cmt ) const
+ConstraintGroup::combineInterdependentConstraints( const Meta::TrackList& l, const double s, const QMultiHash<int,int>& cmt ) const
 {
     /* Handle interdependent constraints properly.
      * See constraints/Matching.h for a description of why this is necessary. */
--- a/src/playlistgenerator/constraints/TrackSpreader.cpp
+++ b/src/playlistgenerator/constraints/TrackSpreader.cpp
@@ -56,7 +56,7 @@ ConstraintTypes::TrackSpreader::toXml( Q
 double
 ConstraintTypes::TrackSpreader::satisfaction( const Meta::TrackList& tl ) const
 {
-    QHash<Meta::TrackPtr, int> locations;
+    QMultiHash<Meta::TrackPtr, int> locations;
     double dist = 0.0;
     for ( int i = 0; i < tl.size(); i++ ) {
         Meta::TrackPtr t = tl.value( i );
--- a/src/scripting/scriptengine/AmarokNetworkScript.h
+++ b/src/scripting/scriptengine/AmarokNetworkScript.h
@@ -75,8 +75,8 @@ namespace AmarokScript
             template<typename Function>
             void newDownload( const QUrl &url, QJSEngine* engine, const QJSValue &obj, Function slot )
             {
-                m_values[ url ] = obj;
-                m_engines[ url ] = engine;
+                m_values.replace( url, obj );
+                m_engines.replace( url, engine );
 
                 The::networkAccessManager()->getData( url, this, slot );
             }
@@ -90,7 +90,7 @@
             * @param sourceUrl The old URL (= the old key).
             * @param targetUrl The new URL (= the new key).
             */
-            template<typename T> void updateUrl( QHash< QUrl, T > &hash, const QUrl &sourceUrl, const QUrl &targetUrl )
+            template<typename T> void updateUrl( QMultiHash< QUrl, T > &hash, const QUrl &sourceUrl, const QUrl &targetUrl )
             {
                 // Get all entries with the source URL as key.
                 QList< T > data = hash.values( sourceUrl );
@@ -99,7 +99,7 @@
                 {
                     // Copy each entry to a new one with the
                     // new URL as key.
-                    hash[ targetUrl ] = entry;
+                    hash.replace( targetUrl, entry );
                 }
 
                 // Remove all entries which are still pointing
@@ -107,9 +107,9 @@
                 hash.remove( sourceUrl );
             };
 
-            QHash<QUrl, QJSEngine *> m_engines;
-            QHash<QUrl, QJSValue> m_values;
-            QHash<QUrl, QString> m_encodings;
+            QMultiHash<QUrl, QJSEngine *> m_engines;
+            QMultiHash<QUrl, QJSValue> m_values;
+            QMultiHash<QUrl, QString> m_encodings;
     };
 }
 
--- a/src/scripting/scriptengine/exporters/MetaTypeExporter.h
+++ b/src/scripting/scriptengine/exporters/MetaTypeExporter.h
@@ -31,7 +31,7 @@ class QJSEngine;
 typedef QMap<QString,QString> StringMap;
 namespace Meta
 {
-    typedef QHash<qint64, QVariant> FieldHash;
+    typedef QMultiHash<qint64, QVariant> FieldHash;
 }
 
 namespace AmarokScript
--- a/src/scripting/scriptengine/AmarokNetworkScript.cpp
+++ b/src/scripting/scriptengine/AmarokNetworkScript.cpp
@@ -103,7 +103,8 @@ AmarokDownloadHelper::AmarokDownloadHelp
 void
 AmarokDownloadHelper::newStringDownload( const QUrl &url, QJSEngine* engine, const QJSValue &obj, const QString &encoding )
 {
-    m_encodings[ url ] = encoding;
+
+    m_encodings.replace( url, encoding );
     newDownload( url, engine, obj, &AmarokDownloadHelper::resultString );
 }
 
--- a/src/scripting/scriptengine/exporters/MetaTypeExporter.cpp
+++ b/src/scripting/scriptengine/exporters/MetaTypeExporter.cpp
@@ -426,7 +426,7 @@ MetaTrackPrototype::fromScriptTagMap( co
     while( it.hasNext() )
     {
         it.next();
-        map[Meta::fieldForName( it.name() )] = it.value().toVariant();
+        map.replace(Meta::fieldForName( it.name() ), it.value().toVariant() );
     }
 }
 
