From 16d88ff91451216cd2299acab56c8753ccd58e64 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 25 Feb 2010 17:47:01 +0000 Subject: [PATCH] qDeleteAll() is awesome --- src/lastfmservice.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lastfmservice.cpp b/src/lastfmservice.cpp index 26f6427e2..3aa8af705 100644 --- a/src/lastfmservice.cpp +++ b/src/lastfmservice.cpp @@ -610,10 +610,9 @@ void LastFMService::FetchMoreTracksFinished() { } void LastFMService::Tune(const lastfm::RadioStation& station) { - foreach (QueuedTrack* t, playlist_) { - delete t; - } + qDeleteAll(playlist_); playlist_.clear(); + QMap params; params["method"] = "radio.tune"; params["station"] = station.url();