Skip to content

Conversation

@HTRamsey
Copy link
Collaborator

Splits the worker and sql database management for cleaner code

@HTRamsey HTRamsey force-pushed the dev-qtlocationplugin-tilecacheworker-database branch 3 times, most recently from 66e73fb to fd4b6d3 Compare September 2, 2025 01:13
@HTRamsey HTRamsey marked this pull request as ready for review September 2, 2025 01:44
@HTRamsey HTRamsey requested a review from Copilot September 2, 2025 01:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a refactoring of the QtLocationPlugin map cache system to split database and worker functionality for cleaner code organization. The main purpose is to extract database operations into a separate class (QGCTileCacheDatabase) while maintaining the existing worker thread architecture.

Key changes include:

  • Introduction of a new QGCTileCacheDatabase class to handle all SQL operations
  • Refactoring of QGCCacheWorker to use the new database class instead of direct SQL
  • Modernization of code style including enum classes, better error handling, and improved const-correctness

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/UI/AppSettings/MapSettings.qml Updates enum references to use scoped enum syntax
src/QtLocationPlugin/QGCTileCacheDatabase.h Defines new database abstraction class with structured data types
src/QtLocationPlugin/QGCTileCacheDatabase.cpp Implements comprehensive database operations with error handling
src/QtLocationPlugin/QGCTileCacheWorker.h Refactored worker header to use database abstraction
src/QtLocationPlugin/QGCTileCacheWorker.cpp Updated worker implementation to delegate to database class
Various other files Code style improvements, enum updates, and header organization
Comments suppressed due to low confidence (2)

src/QtLocationPlugin/QGCTileCacheDatabase.cpp:1

  • Using std::make_unique followed by release() defeats the purpose of smart pointers. Either use raw new directly or modify the API to accept std::unique_ptr to maintain RAII benefits.
/****************************************************************************

src/QtLocationPlugin/QGCTileCacheWorker.cpp:1

  • Inconsistent member access - mixing direct member access (hash, format, type) with what appears to be a method call (img). All should use consistent accessor patterns.
/****************************************************************************

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HTRamsey HTRamsey force-pushed the dev-qtlocationplugin-tilecacheworker-database branch 3 times, most recently from a428dbb to 646a122 Compare September 3, 2025 11:51
@HTRamsey HTRamsey force-pushed the dev-qtlocationplugin-tilecacheworker-database branch from 646a122 to 88aa368 Compare September 15, 2025 12:21
@github-actions github-actions bot added the stale label Oct 16, 2025
@github-actions github-actions bot removed the stale label Oct 26, 2025
@HTRamsey HTRamsey force-pushed the dev-qtlocationplugin-tilecacheworker-database branch 2 times, most recently from c2bd1bb to 2a1302c Compare November 2, 2025 05:44
@HTRamsey HTRamsey force-pushed the dev-qtlocationplugin-tilecacheworker-database branch from 2a1302c to be2160a Compare November 13, 2025 06:04
@HTRamsey HTRamsey closed this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant