unchanged:
Index: amarok-kf5-2.9.80+git20210917/src/browsers/CollectionTreeItemModelBase.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/browsers/CollectionTreeItemModelBase.cpp
+++ amarok-kf5-2.9.80+git20210917/src/browsers/CollectionTreeItemModelBase.cpp
@@ -980,7 +980,7 @@ CollectionTreeItemModelBase::populateChi
     // figure out which children of parent have to be removed,
     // which new children have to be added, and preemptively Q_EMIT dataChanged for the rest
     // have to check how that influences performance...
-    const QSet<Meta::DataPtr> dataSet = dataList.toSet();
+    const QSet<Meta::DataPtr> dataSet(dataList.begin(), dataList.end());
     QSet<Meta::DataPtr> childrenSet;
     foreach( CollectionTreeItem *child, parent->children() )
     {
Index: amarok-kf5-2.9.80+git20210917/src/context/applets/labels/LabelsApplet.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/context/applets/labels/LabelsApplet.cpp
+++ amarok-kf5-2.9.80+git20210917/src/context/applets/labels/LabelsApplet.cpp
@@ -322,7 +322,7 @@ LabelsApplet::updateLabels()
     // now make the label cloud nicer by determinating the quality of the web labels
     // a lot of different values (73,68,51) is good, equal values (66,66,33) look suspicious
     // 0.7 / 0.3 is a pretty moderate choice; 0.5 / 0.5 would be more extreme
-    const float qualityFactor = ( webCounts.count() > 0 ) ? 0.7 + 0.3 * webCounts.toSet().count()/webCounts.count() : 1.0;
+    const float qualityFactor = ( webCounts.count() > 0 ) ? 0.7 + 0.3 * (new QSet<int>(webCounts.begin(). webCounts.end())).count()/webCounts.count() : 1.0;
     // delete all unneeded label items
     for( int i=0; i<m_labelItems.count(); i++ )
     {
Index: amarok-kf5-2.9.80+git20210917/src/core-impl/collections/support/CollectionManager.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/core-impl/collections/support/CollectionManager.cpp
+++ amarok-kf5-2.9.80+git20210917/src/core-impl/collections/support/CollectionManager.cpp
@@ -128,12 +128,13 @@ CollectionManager::setFactories( const Q
     using Collections::CollectionFactory;
 
 
-    QSet<QSharedPointer<Plugins::PluginFactory> > newFactories = factories.toSet();
+    QSet<QSharedPointer<Plugins::PluginFactory> > newFactories(factories.begin(), factories.end());
     QSet<QSharedPointer<Plugins::PluginFactory> > oldFactories;
 
     {
         QReadLocker locker( &d->lock );
-        oldFactories = d->factories.toSet();
+        QSet<QSharedPointer<Plugins::PluginFactory> > addFactoriesSet(d->factories.begin(), d->factories.end());
+        oldFactories += addFactoriesSet;
     }
 
     // remove old factories
Index: amarok-kf5-2.9.80+git20210917/src/core-impl/collections/support/MemoryQueryMakerInternal.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/core-impl/collections/support/MemoryQueryMakerInternal.cpp
+++ amarok-kf5-2.9.80+git20210917/src/core-impl/collections/support/MemoryQueryMakerInternal.cpp
@@ -546,7 +546,8 @@ MemoryQueryMakerInternal::handleResult(
             QSet<Meta::LabelPtr> labelSet;
             foreach( const Meta::TrackPtr &track, tracks )
             {
-                labelSet.unite( track->labels().toSet() );
+                QSet<Meta::LabelPtr> addLabelsSet(track->labels().begin(), track->labels().end());
+                labelSet.unite( addLabelsSet );
             }
             Meta::LabelList labels = labelSet.values();
             if( m_orderByField == Meta::valLabel )
Index: amarok-kf5-2.9.80+git20210917/src/core/transcoding/TranscodingController.h
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/core/transcoding/TranscodingController.h
+++ amarok-kf5-2.9.80+git20210917/src/core/transcoding/TranscodingController.h
@@ -47,7 +47,7 @@ public:
     /**
      * Return set of all encoders, available or not.
      */
-    QSet<Encoder> allEncoders() const { return m_formats.uniqueKeys().toSet(); }
+    QSet<Encoder> allEncoders() const { QSet<Encoder> encoderSet(m_formats.uniqueKeys().begin(), m_formats.uniqueKeys().end()); return encoderSet; }
 
     /**
      * Return a set of all available encoders. You can use @see format() to get all
Index: amarok-kf5-2.9.80+git20210917/src/covermanager/CoverFetchUnit.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/covermanager/CoverFetchUnit.cpp
+++ amarok-kf5-2.9.80+git20210917/src/covermanager/CoverFetchUnit.cpp
@@ -602,7 +602,9 @@ CoverFetchArtPayload::prepareLastFmUrls(
             foreach( const Meta::TrackPtr &track, tracks )
                 artistNames << ( track->artist() ? track->artist()->name()
                                                  : i18n( "Unknown Artist" ) );
-            artistSet = normalize( artistNames ).toSet();
+            QStringList artistNamesNormalized = normalize( artistNames );
+            QSet<QString> addArtistSet(artistNamesNormalized.begin(), artistNamesNormalized.end());
+            artistSet += addArtistSet;
         }
     }
     else return;
Index: amarok-kf5-2.9.80+git20210917/src/dialogs/TagDialog.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/dialogs/TagDialog.cpp
+++ amarok-kf5-2.9.80+git20210917/src/dialogs/TagDialog.cpp
@@ -900,8 +900,10 @@ TagDialog::getTagsFromUi( const QVariant
             map.insert( Meta::Field::LYRICS, ui->kRichTextEdit_lyrics->textOrHtml() );
     }
 
-    QSet<QString> uiLabels = m_labelModel->labels().toSet();
-    QSet<QString> oldLabels = tags.value( Meta::Field::LABELS ).toStringList().toSet();
+    QStringList uiLabelsList = m_labelModel->labels();
+    QSet<QString> uiLabels(uiLabelsList.begin(), uiLabelsList.end());
+    QStringList oldLabelsList = tags.value( Meta::Field::LABELS ).toStringList();
+    QSet<QString> oldLabels(oldLabelsList.begin(), oldLabelsList.end());
     if( uiLabels != oldLabels )
         map.insert( Meta::Field::LABELS, QVariant( uiLabels.values() ) );
 
@@ -1023,11 +1025,13 @@ TagDialog::getTagsFromMultipleTracks() c
         // -- figure out which tags do not match.
 
         // - occur not in every file
-        mismatchingTags |= map.keys().toSet() - tags.keys().toSet();
-        mismatchingTags |= tags.keys().toSet() - map.keys().toSet();
+        QSet<QString> mapKeysSet(map.keys().begin(), map.keys().end());
+        QSet<QString> tagsKeysSet(tags.keys().begin(), tags.keys().end());
+        mismatchingTags |= mapKeysSet - tagsKeysSet;
+        mismatchingTags |= tagsKeysSet - mapKeysSet;
 
         // - not the same in every file
-        foreach( const QString &key, (map.keys().toSet() & tags.keys().toSet()) )
+        foreach( const QString &key, (mapKeysSet & tagsKeysSet) )
         {
             if( map.value( key ) != tags.value( key ) )
                 mismatchingTags.insert( key );
@@ -1161,8 +1165,10 @@ TagDialog::setTagsToTrack()
             if( newTags.contains( Meta::Field::LABELS ) )
             {
                 // determine the differences
-                QSet<QString> oldLabelsSet = oldTags.value( Meta::Field::LABELS ).toStringList().toSet();
-                QSet<QString> newLabelsSet = newTags.value( Meta::Field::LABELS ).toStringList().toSet();
+                QStringList oldTagsList = oldTags.value( Meta::Field::LABELS ).toStringList();
+                QSet<QString> oldLabelsSet(oldTagsList.begin(), oldTagsList.end());
+                QStringList newTagsList = newTags.value( Meta::Field::LABELS ).toStringList();
+                QSet<QString> newLabelsSet(newTagsList.begin(), newTagsList.end());
 
                 QSet<QString> labelsToRemove = oldLabelsSet - newLabelsSet;
                 QSet<QString> labelsToAdd = newLabelsSet - oldLabelsSet;
@@ -1170,7 +1176,8 @@ TagDialog::setTagsToTrack()
                 // apply the differences for each track
                 foreach( const Meta::TrackPtr &track, m_tracks )
                 {
-                    QSet<QString> labelsSet = m_storedTags[track].value( Meta::Field::LABELS ).toStringList().toSet();
+                    QStringList labelsList = m_storedTags[track].value( Meta::Field::LABELS ).toStringList();
+                    QSet<QString> labelsSet(labelsList.begin(), labelsList.end());
                     labelsSet += labelsToAdd;
                     labelsSet -= labelsToRemove;
 
@@ -1315,11 +1322,13 @@ TagDialog::saveTags()
                     labelMap.insert( label->name(), label );
 
                 // labels to remove
-                for( const auto &label : labelMap.keys().toSet() - labels.toSet() )
+                QSet<QString> labelMapKeysSet(labelMap.keys().begin(), labelMap.keys().end());
+                QSet<QString> labelsSet(labels.begin(), labels.end());
+                for( const auto &label : labelMapKeysSet - labelsSet )
                     track->removeLabel( labelMap.value( label ) );
 
                 // labels to add
-                for( const auto &label : labels.toSet() - labelMap.keys().toSet() )
+                for( const auto &label : labelsSet - labelMapKeysSet )
                     track->addLabel( label );
 
                 Meta::TrackEditorPtr ec = track->editor();
Index: amarok-kf5-2.9.80+git20210917/src/musicbrainz/MusicBrainzTagsItem.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/musicbrainz/MusicBrainzTagsItem.cpp
+++ amarok-kf5-2.9.80+git20210917/src/musicbrainz/MusicBrainzTagsItem.cpp
@@ -369,15 +369,17 @@ MusicBrainzTagsItem::chooseBestMatchFrom
 
     MusicBrainzTagsItem *bestMatch = 0;
     float maxScore = 0;
-    QSet<QString> idList = releases.toSet();
+    QSet<QString> idList(releases.begin(), releases.end());
     foreach( MusicBrainzTagsItem *item, m_childItems )
     {
         /*
          * Match any of the releases referenced by selected entry. This should guarantee
          * that best results are always chosen when available.
          */
+        QStringList list = item->dataValue( MusicBrainz::RELEASEID ).toStringList();
+        QSet<QString> set(list.begin(), list.end());
         if( item->score() > maxScore &&
-            !item->dataValue( MusicBrainz::RELEASEID ).toStringList().toSet().intersect( idList ).isEmpty() )
+            !set.intersect( idList ).isEmpty() )
         {
             bestMatch = item;
             maxScore = item->score();
Index: amarok-kf5-2.9.80+git20210917/src/network/NetworkAccessManagerProxy.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/network/NetworkAccessManagerProxy.cpp
+++ amarok-kf5-2.9.80+git20210917/src/network/NetworkAccessManagerProxy.cpp
@@ -84,7 +84,7 @@ int
 NetworkAccessManagerProxy::abortGet( const QList<QUrl> &urls )
 {
     int removed = 0;
-    const QSet<QUrl> &urlSet = urls.toSet();
+    const QSet<QUrl> urlSet(urls.begin(), urls.end());
     foreach( const QUrl &url, urlSet )
         removed += abortGet( url );
     return removed;
Index: amarok-kf5-2.9.80+git20210917/src/playlist/PlaylistController.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/playlist/PlaylistController.cpp
+++ amarok-kf5-2.9.80+git20210917/src/playlist/PlaylistController.cpp
@@ -357,7 +357,8 @@ Controller::removeDeadAndDuplicates()
 {
     DEBUG_BLOCK
 
-    QSet<Meta::TrackPtr> uniqueTracks = m_topModel->tracks().toSet();
+    QList<Meta::TrackPtr> uniqueTrackList = m_topModel->tracks();
+    QSet<Meta::TrackPtr> uniqueTracks(uniqueTrackList.begin(), uniqueTrackList.end());
     QList<int> topModelRowsToRemove;
 
     foreach( Meta::TrackPtr unique, uniqueTracks )
@@ -484,8 +485,8 @@ Controller::reorderRows( const QList<int
 
     // validity check: each item should appear exactly once in both lists
     {
-        QSet<int> fromItems( from.toSet() );
-        QSet<int> toItems( to.toSet() );
+        QSet<int> fromItems( from.begin(), from.end() );
+        QSet<int> toItems( to.begin(), to.end() );
 
         if( fromItems.size() != from.size() || toItems.size() != to.size() || fromItems != toItems )
         {
Index: amarok-kf5-2.9.80+git20210917/src/playlist/navigators/AlbumNavigator.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/playlist/navigators/AlbumNavigator.cpp
+++ amarok-kf5-2.9.80+git20210917/src/playlist/navigators/AlbumNavigator.cpp
@@ -36,7 +36,8 @@ Playlist::AlbumNavigator::notifyItemsIns
 {
     DEBUG_BLOCK
 
-    QSet<AlbumId> oldAlbums = m_itemsPerAlbum.uniqueKeys().toSet();
+    QList<AlbumId> oldAlbumList = m_itemsPerAlbum.uniqueKeys();
+    QSet<AlbumId> oldAlbums(oldAlbumList.begin(), oldAlbumList.end());
     QSet<AlbumId> modifiedAlbums;
 
     foreach( quint64 insertedItem, insertedItems )
Index: amarok-kf5-2.9.80+git20210917/src/scripting/scriptengine/AmarokCollectionViewScript.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/scripting/scriptengine/AmarokCollectionViewScript.cpp
+++ amarok-kf5-2.9.80+git20210917/src/scripting/scriptengine/AmarokCollectionViewScript.cpp
@@ -432,5 +432,6 @@ Selection::Selection( const QModelIndexL
 Collections::QueryMaker*
 Selection::queryMaker()
 {
-    return The::mainWindow()->collectionBrowser()->currentView()->createMetaQueryFromItems( selectedItems().toSet(), true );
+    QSet<CollectionTreeItem*> items(selectedItems().begin(), selectedItems().end());
+    return The::mainWindow()->collectionBrowser()->currentView()->createMetaQueryFromItems( items, true );
 }
Index: amarok-kf5-2.9.80+git20210917/src/services/ServicePluginManager.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/services/ServicePluginManager.cpp
+++ amarok-kf5-2.9.80+git20210917/src/services/ServicePluginManager.cpp
@@ -70,8 +70,8 @@ ServicePluginManager::~ServicePluginMana
 void
 ServicePluginManager::setFactories( const QList<QSharedPointer<Plugins::PluginFactory> > &factories )
 {
-    QSet<QSharedPointer<Plugins::PluginFactory> > newFactories = factories.toSet();
-    QSet<QSharedPointer<Plugins::PluginFactory> > oldFactories = m_factories.toSet();
+    QSet<QSharedPointer<Plugins::PluginFactory> > newFactories(factories.begin(), factories.end());
+    QSet<QSharedPointer<Plugins::PluginFactory> > oldFactories(m_factories.begin(), m_factories.end());
 
     // remove old factories
     for( const auto &pFactory : oldFactories - newFactories )
Index: amarok-kf5-2.9.80+git20210917/src/statsyncing/Config.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/statsyncing/Config.cpp
+++ amarok-kf5-2.9.80+git20210917/src/statsyncing/Config.cpp
@@ -297,7 +297,9 @@ Config::read()
             m_checkedFields |= Meta::fieldForName( fieldName );
     }
 
-    m_excludedLabels = group.readEntry( "excludedLabels", QStringList() ).toSet();
+    QStringList list = group.readEntry( "excludedLabels", QStringList() );
+    QSet<QString> addEntrySet(list.begin(), list.end());
+    m_excludedLabels += addEntrySet;
 
     m_hasChanged = false;
 }
Index: amarok-kf5-2.9.80+git20210917/src/widgets/MetaQueryWidget.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/widgets/MetaQueryWidget.cpp
+++ amarok-kf5-2.9.80+git20210917/src/widgets/MetaQueryWidget.cpp
@@ -762,7 +762,7 @@ MetaQueryWidget::populateComboBox( const
     disconnect( combo.data(), 0, this, 0 );
 
     // want the results unique and sorted
-    const QSet<QString> dataSet = results.toSet();
+    const QSet<QString> dataSet(results.begin(), results.end());
     QStringList dataList = dataSet.values();
     dataList.sort();
     combo->addItems( dataList );
Index: amarok-kf5-2.9.80+git20210917/src/context/applets/albums/plugin/AlbumsModel.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/context/applets/albums/plugin/AlbumsModel.cpp
+++ amarok-kf5-2.9.80+git20210917/src/context/applets/albums/plugin/AlbumsModel.cpp
@@ -104,7 +104,8 @@ AlbumsModel::mimeData( const QModelIndex
     Meta::TrackList tracks;
     foreach( const QModelIndex &index, indices )
         tracks << tracksForIndex( index );
-    tracks = tracks.toSet().values();
+    QSet< AmarokSharedPointer<Meta::Track> > tracksSet(tracks.begin(), tracks.end());
+    tracks = tracksSet.values();
 
     // http://doc.trolltech.com/4.4/qabstractitemmodel.html#mimeData
     // If the list of indexes is empty, or there are no supported MIME types,
Index: amarok-kf5-2.9.80+git20210917/src/context/applets/upcomingevents/UpcomingEventsCalendarWidget.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/context/applets/upcomingevents/UpcomingEventsCalendarWidget.cpp
+++ amarok-kf5-2.9.80+git20210917/src/context/applets/upcomingevents/UpcomingEventsCalendarWidget.cpp
@@ -57,7 +57,7 @@ public:
 
     void addEvents( const LastFmEvent::List &e )
     {
-        QSet<LastFmEventPtr> newEvents = e.toSet().subtract( events );
+        QSet<LastFmEventPtr> newEvents(e.begin(), e.end()).subtract( events );
         foreach( const LastFmEventPtr &event, newEvents )
             addEvent( event );
     }
Index: amarok-kf5-2.9.80+git20210917/src/playlist/navigators/NonlinearTrackNavigator.h
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/playlist/navigators/NonlinearTrackNavigator.h
+++ amarok-kf5-2.9.80+git20210917/src/playlist/navigators/NonlinearTrackNavigator.h
@@ -79,7 +79,7 @@ namespace Playlist
              * The QSet variant currently has O(n) performance. (Nothing needs O(1).)
              */
             QList<quint64> allItemsList() { doItemListsMaintenance(); return m_allItemsList; }
-            QSet<quint64> allItemsSet() { doItemListsMaintenance(); return m_allItemsList.toSet(); }
+            QSet<quint64> allItemsSet() { doItemListsMaintenance(); QSet<quint64> r_allItemsSet(m_allItemsList.begin(), m_allItemsList.end()); return r_allItemsSet; }
 
             /**
              * Items that we've played.
Index: amarok-kf5-2.9.80+git20210917/src/scanner/AbstractDirectoryWatcher.cpp
===================================================================
--- amarok-kf5-2.9.80+git20210917.orig/src/scanner/AbstractDirectoryWatcher.cpp
+++ amarok-kf5-2.9.80+git20210917/src/scanner/AbstractDirectoryWatcher.cpp
@@ -88,7 +88,7 @@ AbstractDirectoryWatcher::run(ThreadWeav
 
 
             // -- update the KDirWatch with the current set of directories
-            QSet<QString> dirs = collectionFolders().toSet();
+            QSet<QString> dirs(collectionFolders().begin(), collectionFolders().end());
 
             // - add new
             QSet<QString> newDirs = dirs - oldWatchDirs;
