Kexi: Further improve retrieval of aggregate report values for queries

Authored by staniek.

Description

Kexi: Further improve retrieval of aggregate report values for queries

  • fix possible crash when changing data source
  • save source class to the report XML
  • set "dirty" flag when data source is changed

(Extends D764)

Differential Revision: https://phabricator.kde.org/D765