- fix possible crash when changing data source
- save source class to the report XML
- set "dirty" flag when data source is changed
Extends https://phabricator.kde.org/D764
Extends https://phabricator.kde.org/D764
Pick table A as data source, look at results; pick query A as data source, look at results.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Good improvement, you also found the crash bug i was referring to last night!
One concern I have is the whole concept of allowing different object types share the same name. If Kexi allows this, im not very comfortable with it. How could a query be based on a query that shares a name with a table ... a class of problems would be wiped out if we didnt allow duplicate object names, like all other db engines I assume.
thoughts?
This was something i was thinking about as I stripped out the checking for part/object type in my simple fix .... i thought it just couldnt be a problem as we shouldnt have duplicate names :)
Very good point. Unique identification include class everywhere as you've seen even in this patch. But the only known thing I missed is the grammar of SQL. Without a special syntax like QUERY<name> or so there's no solution.
I checked MSA today and you're right, there cannot be the same table and query name:
However there can be the same name used for:
Example for table and form:
Summing up
Thoughts? Anything I missed?
One more thing.
I think it's good if we have "source-class" attribute in addition to "source" because this makes data source assignment deterministic. Without this behaviour if someone removes table A and adds a new query A, reports with source == "A" would still work. That's not totally expected.
kexi/plugins/reports/kexireportview.cpp | ||
---|---|---|
403 | is there a leak here? who is the owner of reportData and where is it deleted? |