Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/podcasts/sql/SqlPodcastProvider.cpp
Show First 20 Lines • Show All 1091 Lines • ▼ Show 20 Line(s) | 1049 | { | |||
---|---|---|---|---|---|
1092 | } | 1092 | } | ||
1093 | } | 1093 | } | ||
1094 | 1094 | | |||
1095 | void | 1095 | void | ||
1096 | SqlPodcastProvider::slotStatusBarNewProgressOperation( KIO::TransferJob * job, | 1096 | SqlPodcastProvider::slotStatusBarNewProgressOperation( KIO::TransferJob * job, | ||
1097 | const QString &description, | 1097 | const QString &description, | ||
1098 | Podcasts::PodcastReader* reader ) | 1098 | Podcasts::PodcastReader* reader ) | ||
1099 | { | 1099 | { | ||
1100 | Amarok::Components::logger()->newProgressOperation( job, description, reader, SLOT(slotAbort()) ); | 1100 | Amarok::Components::logger()->newProgressOperation( job, description, reader, &Podcasts::PodcastReader::slotAbort ); | ||
1101 | } | 1101 | } | ||
1102 | 1102 | | |||
1103 | void | 1103 | void | ||
1104 | SqlPodcastProvider::downloadEpisode( Podcasts::SqlPodcastEpisodePtr sqlEpisode ) | 1104 | SqlPodcastProvider::downloadEpisode( Podcasts::SqlPodcastEpisodePtr sqlEpisode ) | ||
1105 | { | 1105 | { | ||
1106 | if( sqlEpisode.isNull() ) | 1106 | if( sqlEpisode.isNull() ) | ||
1107 | { | 1107 | { | ||
1108 | error() << "SqlPodcastProvider::downloadEpisode( Podcasts::SqlPodcastEpisodePtr sqlEpisode ) was called for a non-SqlPodcastEpisode"; | 1108 | error() << "SqlPodcastProvider::downloadEpisode( Podcasts::SqlPodcastEpisodePtr sqlEpisode ) was called for a non-SqlPodcastEpisode"; | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
1163 | debug() << "starting download for " << sqlEpisode->title() | 1163 | debug() << "starting download for " << sqlEpisode->title() | ||
1164 | << " url: " << sqlEpisode->prettyUrl(); | 1164 | << " url: " << sqlEpisode->prettyUrl(); | ||
1165 | Amarok::Components::logger()->newProgressOperation( transferJob | 1165 | Amarok::Components::logger()->newProgressOperation( transferJob | ||
1166 | , sqlEpisode->title().isEmpty() | 1166 | , sqlEpisode->title().isEmpty() | ||
1167 | ? i18n( "Downloading Podcast Media" ) | 1167 | ? i18n( "Downloading Podcast Media" ) | ||
1168 | : i18n( "Downloading Podcast \"%1\"" | 1168 | : i18n( "Downloading Podcast \"%1\"" | ||
1169 | , sqlEpisode->title() ), | 1169 | , sqlEpisode->title() ), | ||
1170 | transferJob, | 1170 | transferJob, | ||
1171 | SLOT(kill()) | 1171 | &KIO::TransferJob::kill, | ||
1172 | Qt::AutoConnection, | ||||
1173 | KJob::Quietly | ||||
1172 | ); | 1174 | ); | ||
1173 | 1175 | | |||
1174 | connect( transferJob, &KIO::TransferJob::data, | 1176 | connect( transferJob, &KIO::TransferJob::data, | ||
1175 | this, &SqlPodcastProvider::addData ); | 1177 | this, &SqlPodcastProvider::addData ); | ||
1176 | //need to connect to finished instead of result because it's always emitted. | 1178 | //need to connect to finished instead of result because it's always emitted. | ||
1177 | //We need to cleanup after a download is cancled regardless of the argument in | 1179 | //We need to cleanup after a download is cancled regardless of the argument in | ||
1178 | //KJob::kill() | 1180 | //KJob::kill() | ||
1179 | connect( transferJob, &KIO::TransferJob::finished, | 1181 | connect( transferJob, &KIO::TransferJob::finished, | ||
▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines |