mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Rename literal operator
Qt 6.4 introduced `QString operator""_s()` and the previous `""_qs` is deprecated since Qt 6.8.
This commit is contained in:
@@ -53,13 +53,13 @@
|
||||
#include "rss_parser.h"
|
||||
#include "rss_session.h"
|
||||
|
||||
const QString KEY_UID = u"uid"_qs;
|
||||
const QString KEY_URL = u"url"_qs;
|
||||
const QString KEY_TITLE = u"title"_qs;
|
||||
const QString KEY_LASTBUILDDATE = u"lastBuildDate"_qs;
|
||||
const QString KEY_ISLOADING = u"isLoading"_qs;
|
||||
const QString KEY_HASERROR = u"hasError"_qs;
|
||||
const QString KEY_ARTICLES = u"articles"_qs;
|
||||
const QString KEY_UID = u"uid"_s;
|
||||
const QString KEY_URL = u"url"_s;
|
||||
const QString KEY_TITLE = u"title"_s;
|
||||
const QString KEY_LASTBUILDDATE = u"lastBuildDate"_s;
|
||||
const QString KEY_ISLOADING = u"isLoading"_s;
|
||||
const QString KEY_HASERROR = u"hasError"_s;
|
||||
const QString KEY_ARTICLES = u"articles"_s;
|
||||
|
||||
using namespace RSS;
|
||||
|
||||
@@ -73,7 +73,7 @@ Feed::Feed(const QUuid &uid, const QString &url, const QString &path, Session *s
|
||||
m_dataFileName = Path(uidHex + u".json");
|
||||
|
||||
// Move to new file naming scheme (since v4.1.2)
|
||||
const QString legacyFilename = Utils::Fs::toValidFileName(m_url, u"_"_qs) + u".json";
|
||||
const QString legacyFilename = Utils::Fs::toValidFileName(m_url, u"_"_s) + u".json";
|
||||
const Path storageDir = m_session->dataFileStorage()->storageDir();
|
||||
const Path dataFilePath = storageDir / m_dataFileName;
|
||||
if (!dataFilePath.exists())
|
||||
@@ -376,7 +376,7 @@ void Feed::downloadIcon()
|
||||
// Download the RSS Feed icon
|
||||
// XXX: This works for most sites but it is not perfect
|
||||
const QUrl url(m_url);
|
||||
const auto iconUrl = u"%1://%2/favicon.ico"_qs.arg(url.scheme(), url.host());
|
||||
const auto iconUrl = u"%1://%2/favicon.ico"_s.arg(url.scheme(), url.host());
|
||||
Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(iconUrl).saveToFile(true).destFileName(m_iconPath)
|
||||
, Preferences::instance()->useProxyForRSS(), this, &Feed::handleIconDownloadFinished);
|
||||
|
||||
Reference in New Issue
Block a user