Disable automatic conversions from 8-bit strings

This commit is contained in:
Jonas Kvinge
2024-04-11 02:56:01 +02:00
parent 58944993b8
commit 0c6872b352
310 changed files with 2501 additions and 2332 deletions

View File

@@ -28,17 +28,19 @@
#include "lyricssearchrequest.h"
#include "azlyricscomlyricsprovider.h"
const char AzLyricsComLyricsProvider::kUrl[] = "https://www.azlyrics.com/lyrics/";
const char AzLyricsComLyricsProvider::kStartTag[] = "<div>";
const char AzLyricsComLyricsProvider::kEndTag[] = "</div>";
const char AzLyricsComLyricsProvider::kLyricsStart[] = "<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->";
namespace {
constexpr char kUrl[] = "https://www.azlyrics.com/lyrics/";
constexpr char kStartTag[] = "<div>";
constexpr char kEndTag[] = "</div>";
constexpr char kLyricsStart[] = "<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->";
} // namespace
AzLyricsComLyricsProvider::AzLyricsComLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent)
: HtmlLyricsProvider(QStringLiteral("azlyrics.com"), true, kStartTag, kEndTag, kLyricsStart, false, network, parent) {}
: HtmlLyricsProvider(QStringLiteral("azlyrics.com"), true, QLatin1String(kStartTag), QLatin1String(kEndTag), QLatin1String(kLyricsStart), false, network, parent) {}
QUrl AzLyricsComLyricsProvider::Url(const LyricsSearchRequest &request) {
return QUrl(kUrl + StringFixup(request.artist) + "/" + StringFixup(request.title) + ".html");
return QUrl(QLatin1String(kUrl) + StringFixup(request.artist) + QStringLiteral("/") + StringFixup(request.title) + QStringLiteral(".html"));
}