Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Allow users to save expression functions in QGIS project file #43

Merged
merged 11 commits into from
Sep 18, 2024

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    59ef0e5 View commit details
    Browse the repository at this point in the history
  2. Make sure project functions are correctly loaded from the project (al…

    …ways at the top of the list in the 'Function editor' tab) and never stored in a user profile file
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    72da31b View commit details
    Browse the repository at this point in the history
  3. [gui] Introduce dialog to add function files, allowing users to choos…

    …e whether to store functions in a .py file (current behavior) or in the QGIS project
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    37724a6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c20dd5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c62746d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c7406ec View commit details
    Browse the repository at this point in the history
  7. Address review (don't expose to public API, remove const to a by valu…

    …e param, tr, string literals)
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    939dac9 View commit details
    Browse the repository at this point in the history
  8. Make sure python expression functions from project are only loaded if…

    … users allow it, just like we do with macros
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    8f0ab84 View commit details
    Browse the repository at this point in the history
  9. [expressions] Unload expression functions from project on project clo…

    …se and reload user expressions (from profile) to avoid any potential overwrite from unloaded project functions
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    f91fadf View commit details
    Browse the repository at this point in the history
  10. [tests] Add test for unloading Expression Functions from projects (on…

    … project close) and reloading user ones, specifically to restore overwritten user functions when opening a project with expressions inside
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    053e95e View commit details
    Browse the repository at this point in the history
  11. [core] Address review: Move loadFunctionsFromProject and cleanFunctio…

    …nsFromProject to QgsProject::read and ::clear, respectively. Introduce function pythonEmbeddedInProjectAllowed to ask for permissions to load both macros and expression functions, with a parameter enum and rename existing enum for macros. Sort includes. Drop not needed file. Add python/expressions/ to gitignore, to get rid of files produced by the introduced Python test.
    gacarrillor committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    c5286e4 View commit details
    Browse the repository at this point in the history