delete threads

This commit is contained in:
RickyRister 2025-08-10 03:05:52 -07:00
parent 3a42354efd
commit d7000fbcb0
2 changed files with 1 additions and 11 deletions

View file

@ -28,16 +28,7 @@ PictureLoaderWorkerWork::PictureLoaderWorkerWork(const PictureLoaderWorker *work
// Hook up signals to settings
connect(&SettingsCache::instance(), SIGNAL(picDownloadChanged()), this, SLOT(picDownloadChanged()));
pictureLoaderThread = new QThread;
moveToThread(pictureLoaderThread);
connect(pictureLoaderThread, &QThread::started, this, &PictureLoaderWorkerWork::startNextPicDownload);
// clean up threads once loading finishes
connect(this, &QObject::destroyed, pictureLoaderThread, &QThread::quit);
connect(pictureLoaderThread, &QThread::finished, pictureLoaderThread, &QObject::deleteLater);
pictureLoaderThread->start(QThread::LowPriority);
startNextPicDownload();
}
void PictureLoaderWorkerWork::startNextPicDownload()

View file

@ -33,7 +33,6 @@ public slots:
void handleNetworkReply(QNetworkReply *reply);
private:
QThread *pictureLoaderThread;
bool picDownload;
void startNextPicDownload();