Skip to content

Project functions in editor, save doesn't really save...? #62752

Description

@DelazJ

What is the bug or the crash?

I was writing a custom expression function, created as a project function. I notice that whenever you edit the function there is a furtive "saved" message that appears at the bottom of the code editor box. It wasn't clear to me whether this should prevent me from keeping press the "Save and load functions" so I kept pressing it to test my function in the expression tab.
At some point of my coding experience, QGIS crashed. And I realized that I didn't save the project all this time (it still displayed the * of dirtiness). Upon restarting QGIS and my project, of course, I couldn't find any trace of my supposedly "saved" function in the project.

What do both the "saved" message and the "Save and load functions" actually do, in case of "project function" (I didn't test with project file) if they do not save the function somewhere I could retrieve it? They look IMHO misleading if they are not meant to actually save btw the project.

Steps to reproduce the issue

See above

Versions

QGIS version3.99.0-Master
QGIS code revision6cb80fdcfc8
 
Libraries
Qt version6.8.2
Python version3.13.5
GDAL version3.10.3
PROJ version9.6.0
EPSG Registry database versionv12.004 (2025-03-02)
GEOS version3.13.1-CAPI-1.19.2
SQLite version3.46.1
PDAL version2.9.0
PostgreSQL client version17.5
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionDebian GNU/Linux 12 (bookworm)
This copy of QGIS writes debugging output.
 
Active Python plugins
db_manager0.1.20
grassprovider2.12.99
MetaSearch0.3.6
processing2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Debian GNU/Linux 12 (bookworm)

Weird... Actually my OS is trixie (Debian GNU/Linux 13) --- kernel 6.12.38+deb13-amd64 (64-bit)

Metadata

Metadata

Assignees

Labels

BugEither a bug report, or a bug fix. Let's hope for the latter!ExpressionsRelated to the QGIS expression engine or specific expression functions

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions