Remove unnecessary QObject::

Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
Yihe Li
2025-06-05 21:40:59 +08:00
parent 4a9b3d2f5f
commit c57ba911cf
24 changed files with 88 additions and 95 deletions

View File

@@ -113,7 +113,7 @@ void ListModel::requestLogo(QString logo, QString url)
job->addNetAction(Net::ApiDownload::makeCached(QUrl(url), entry));
auto fullPath = entry->getFullPath();
QObject::connect(job, &NetJob::succeeded, this, [this, logo, fullPath, job] {
connect(job, &NetJob::succeeded, this, [this, logo, fullPath, job] {
job->deleteLater();
emit logoLoaded(logo, QIcon(fullPath));
if (waitingCallbacks.contains(logo)) {
@@ -121,7 +121,7 @@ void ListModel::requestLogo(QString logo, QString url)
}
});
QObject::connect(job, &NetJob::failed, this, [this, logo, job] {
connect(job, &NetJob::failed, this, [this, logo, job] {
job->deleteLater();
emit logoFailed(logo);
});
@@ -192,8 +192,8 @@ void ListModel::performPaginatedSearch()
netJob->addNetAction(Net::ApiDownload::makeByteArray(QUrl(searchUrl.value()), response));
jobPtr = netJob;
jobPtr->start();
QObject::connect(netJob.get(), &NetJob::succeeded, this, &ListModel::searchRequestFinished);
QObject::connect(netJob.get(), &NetJob::failed, this, &ListModel::searchRequestFailed);
connect(netJob.get(), &NetJob::succeeded, this, &ListModel::searchRequestFinished);
connect(netJob.get(), &NetJob::failed, this, &ListModel::searchRequestFailed);
}
void ListModel::searchWithTerm(const QString& term, int sort, std::shared_ptr<ModFilterWidget::Filter> filter, bool filterChanged)