Skip to content

feat: Improve performance with QThread workers for download and file processing#34

Open
Pravin-raj-03 wants to merge 2 commits into
Anish-M-code:masterfrom
Pravin-raj-03:feature/qthread-worker-improvement
Open

feat: Improve performance with QThread workers for download and file processing#34
Pravin-raj-03 wants to merge 2 commits into
Anish-M-code:masterfrom
Pravin-raj-03:feature/qthread-worker-improvement

Conversation

@Pravin-raj-03

Copy link
Copy Markdown

Closes #29

Summary

This PR introduces two new QThread worker classes (DownloadWorker and RemovalWorker) that move long-running blocking operations off the main UI thread, preventing the GUI from freezing during:

  • Exiftool download / update checks
    • Metadata removal file processing

New Files

  • Source Code/GUI_Qt6_Source_Code/workerthread.h - Declares DownloadWorker and RemovalWorker QObject-based worker classes
    • Source Code/GUI_Qt6_Source_Code/workerthread.cpp - Implements both workers

How it works

The QObject worker pattern is used (preferred over subclassing QThread):

  • Workers are created with QObject::moveToThread()
    • All cross-thread signals use Qt automatic queued connections for thread-safe UI updates
    • DownloadWorker: Downloads exiftool zip with progress reporting via progress(int) signal
    • RemovalWorker: Iterates files, runs exiftool per-file, emits fileProcessed() and progress() signals

…rker and RemovalWorkerownloading and removal
This file implements DownloadWorker and RemovalWorker classes for handling file downloads and removals using ExifTool. It includes methods for processing downloads, logging, and error handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance of Qt6 GUI code by making use of QThreads

1 participant