mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Add const to a few pointer arguments
This commit is contained in:
@@ -142,7 +142,7 @@ QJsonObject Article::toJsonObject() const
|
||||
return jsonObj;
|
||||
}
|
||||
|
||||
bool Article::articleDateRecentThan(Article *article, const QDateTime &date)
|
||||
bool Article::articleDateRecentThan(const Article *article, const QDateTime &date)
|
||||
{
|
||||
return article->date() > date;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace RSS
|
||||
|
||||
QJsonObject toJsonObject() const;
|
||||
|
||||
static bool articleDateRecentThan(Article *article, const QDateTime &date);
|
||||
static bool articleDateRecentThan(const Article *article, const QDateTime &date);
|
||||
|
||||
signals:
|
||||
void read(Article *article = nullptr);
|
||||
|
||||
@@ -347,7 +347,7 @@ void AutoDownloader::handleTorrentDownloadFailed(const QString &url)
|
||||
// TODO: Re-schedule job here.
|
||||
}
|
||||
|
||||
void AutoDownloader::handleNewArticle(Article *article)
|
||||
void AutoDownloader::handleNewArticle(const Article *article)
|
||||
{
|
||||
if (!article->isRead() && !article->torrentUrl().isEmpty())
|
||||
addJobForArticle(article);
|
||||
@@ -358,7 +358,7 @@ void AutoDownloader::setRule_impl(const AutoDownloadRule &rule)
|
||||
m_rules.insert(rule.name(), rule);
|
||||
}
|
||||
|
||||
void AutoDownloader::addJobForArticle(Article *article)
|
||||
void AutoDownloader::addJobForArticle(const Article *article)
|
||||
{
|
||||
const QString torrentURL = article->torrentUrl();
|
||||
if (m_waitingJobs.contains(torrentURL)) return;
|
||||
|
||||
@@ -110,14 +110,14 @@ namespace RSS
|
||||
void process();
|
||||
void handleTorrentDownloadFinished(const QString &url);
|
||||
void handleTorrentDownloadFailed(const QString &url);
|
||||
void handleNewArticle(Article *article);
|
||||
void handleNewArticle(const Article *article);
|
||||
|
||||
private:
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
void setRule_impl(const AutoDownloadRule &rule);
|
||||
void resetProcessingQueue();
|
||||
void startProcessing();
|
||||
void addJobForArticle(Article *article);
|
||||
void addJobForArticle(const Article *article);
|
||||
void processJob(const QSharedPointer<ProcessingJob> &job);
|
||||
void load();
|
||||
void loadRules(const QByteArray &data);
|
||||
|
||||
Reference in New Issue
Block a user