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
No known key found for this signature in database
24 changed files with 88 additions and 95 deletions

View file

@ -59,9 +59,9 @@ void PackFetchTask::fetch()
qDebug() << "Downloading thirdparty version info from" << thirdPartyUrl.toString();
jobPtr->addNetAction(Net::Download::makeByteArray(thirdPartyUrl, thirdPartyModpacksXmlFileData));
QObject::connect(jobPtr.get(), &NetJob::succeeded, this, &PackFetchTask::fileDownloadFinished);
QObject::connect(jobPtr.get(), &NetJob::failed, this, &PackFetchTask::fileDownloadFailed);
QObject::connect(jobPtr.get(), &NetJob::aborted, this, &PackFetchTask::fileDownloadAborted);
connect(jobPtr.get(), &NetJob::succeeded, this, &PackFetchTask::fileDownloadFinished);
connect(jobPtr.get(), &NetJob::failed, this, &PackFetchTask::fileDownloadFailed);
connect(jobPtr.get(), &NetJob::aborted, this, &PackFetchTask::fileDownloadAborted);
jobPtr->start();
}
@ -76,7 +76,7 @@ void PackFetchTask::fetchPrivate(const QStringList& toFetch)
job->addNetAction(Net::ApiDownload::makeByteArray(privatePackBaseUrl.arg(packCode), data));
job->setAskRetry(false);
QObject::connect(job, &NetJob::succeeded, this, [this, job, data, packCode] {
connect(job, &NetJob::succeeded, this, [this, job, data, packCode] {
ModpackList packs;
parseAndAddPacks(*data, PackType::Private, packs);
for (auto& currentPack : packs) {
@ -89,14 +89,14 @@ void PackFetchTask::fetchPrivate(const QStringList& toFetch)
data->clear();
});
QObject::connect(job, &NetJob::failed, this, [this, job, packCode, data](QString reason) {
connect(job, &NetJob::failed, this, [this, job, packCode, data](QString reason) {
emit privateFileDownloadFailed(reason, packCode);
job->deleteLater();
data->clear();
});
QObject::connect(job, &NetJob::aborted, this, [this, job, data] {
connect(job, &NetJob::aborted, this, [this, job, data] {
emit aborted();
job->deleteLater();