From afb7e1db36e80ca1df458ed997e932aa46666a7f Mon Sep 17 00:00:00 2001 From: John Maguire Date: Mon, 5 Sep 2016 14:29:03 +0100 Subject: [PATCH] Add attribution to wikipedia artist biographies --- src/songinfo/artistbiography.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/songinfo/artistbiography.cpp b/src/songinfo/artistbiography.cpp index a08bbe3f7..64d09b817 100644 --- a/src/songinfo/artistbiography.cpp +++ b/src/songinfo/artistbiography.cpp @@ -242,8 +242,8 @@ void ArtistBiography::FetchWikipediaArticle(int id, qLog(Debug) << "Article url:" << url; - NewClosure(reply, SIGNAL(finished()), - [this, id, reply, wikipedia_url, latch]() { + NewClosure(reply, SIGNAL(finished()), [this, id, reply, wikipedia_url, + wiki_title, latch]() { reply->deleteLater(); QJson::Parser parser; @@ -261,6 +261,15 @@ void ArtistBiography::FetchWikipediaArticle(int id, tr("Open in your browser") + "

"; text += html; + + text += tr("

This article uses material from the Wikipedia article " + "%2, which is released under the Creative Commons Attribution-Share-Alike " + "License 3.0.

") + .arg(wikipedia_url) + .arg(wiki_title); + SongInfoTextView* editor = new SongInfoTextView; editor->SetHtml(text); data.contents_ = editor;