Skip to content

Map Provider and API Key changes no longer require restart#596

Merged
dpaulat merged 13 commits intodevelopfrom
feature/map-provider-and-api-key-hot-change
Mar 8, 2026
Merged

Map Provider and API Key changes no longer require restart#596
dpaulat merged 13 commits intodevelopfrom
feature/map-provider-and-api-key-hot-change

Conversation

@dpaulat
Copy link
Owner

@dpaulat dpaulat commented Mar 8, 2026

No description provided.

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 enables map provider and API key changes to take effect immediately without requiring a restart. It achieves this by upgrading the SettingsVariable<T> signal to carry ChangedEvent<T> (with old/new values), adding a ResetMap/ConfigureMapSettings mechanism to the map layer, and wiring provider/key changes to reactive signal handlers.

Changes:

  • SettingsVariable<T> signals now carry a ChangedEvent<T>{oldValue_, newValue_} struct, and ConnectChanged/ConnectStaged virtual methods are added to SettingsVariableBase for type-erased signal connection
  • map_widget.cpp gains ResetMap() and ResolveMapStyleName() to handle dynamic provider and API key changes, and consolidates signal connections into connections_ vector
  • main_window.cpp wires map_provider and custom style changes to PopulateMapStyles/ConfigureMapStyles; OS name is added to the user agent and startup log

Reviewed changes

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

Show a summary per file
File Description
settings_variable_base.hpp/cpp Removes changed_signal()/staged_signal() from base class; adds ConnectChanged/ConnectStaged pure virtual methods
settings_variable.hpp/cpp Adds ChangedEvent<T> struct and moves typed signals here; updates all mutation paths to pass old/new values
settings_category.cpp Updates ConnectVariable to use new ConnectChanged/ConnectStaged helpers
map_widget.hpp/cpp Adds SetMapStyle force parameter; adds ResetMap/ResolveMapStyleName; connects provider/API key changed signals
map_provider.hpp/cpp Extracts ConfigureMapSettings() from MainWindowImpl
main_window.cpp Dynamically responds to provider changes; uses QSignalBlocker for combobox updates; connects custom style signals
marker_settings_widget.cpp, overlay_layer.cpp Updates lambda signatures to auto&&... to accept new signal arguments
placefile_manager.cpp Adds URL to error messages for placefile load failures
main.cpp Adds OS name to log output and user agent

dpaulat and others added 2 commits March 8, 2026 12:26
- Don't reset map location on map reset
- Ensure "Custom" is re-added to Map Style combobox
Copy link
Contributor

Copilot AI commented Mar 8, 2026

@dpaulat I've opened a new pull request, #597, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: dpaulat <2886605+dpaulat@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@dpaulat dpaulat merged commit 3a8526d into develop Mar 8, 2026
10 checks passed
@dpaulat dpaulat deleted the feature/map-provider-and-api-key-hot-change branch March 8, 2026 20:29
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.

3 participants