[Qgis-psc] QEP 422 - Async refactoring grant report
David Koňařík
dvdkon at konarici.cz
Sat Nov 14 13:41:13 PST 2026
Hi all,
with PR #67115 merged into QGIS, my work on the async refactoring grant
has finished. I reworked QgsChunkLoaders and adjacent classes,
simplifying the code and removing some 750 lines in the process.
The main part of my work was merging QgsChunkLoader with QgsChunkLoader
factory and refactoring all the async methods to return QFutures using
the new Qt6 continuation methods instead of bespoke objects, integer
handles or void.
Most of this was mechanical work, adapting the various
QgsChunkLoaderFactory subclasses. Common logic for terrain generators
and terrain textures was moved into a loader base class and the
DEM/Online terrain loaders deduplicated. I also had to adapt the code
using these classes, mostly in QgsChunkedEntity, where I also took the
opportunity to refactor its job system.
Since Qt6-style QFutures weren't widely used in QGIS, I also added some
basic helper methods in the QgsFutureUtils class.
After merging, two extra issues were found (one with compilation on
older Qt versions and one lifetime issue); I fixed them both in follow-
up PRs (#68029 and #68014).
David Koňařík
More information about the QGIS-PSC
mailing list