Add an interface for script objects that wish to track group data
ClosedPublic

Authored by staniek on Aug 16 2015, 5:52 PM.

Diff Detail

Repository
R14 KReport
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
piggz updated this revision to Diff 553.Aug 16 2015, 5:52 PM
piggz retitled this revision from to Add an interface for script objects that wish to track group data.
piggz added a reviewer: staniek.
piggz updated this revision to Diff 554.Aug 16 2015, 6:02 PM
  • Move to the new API
piggz updated this revision to Diff 556.Aug 16 2015, 6:33 PM
  • Add export visibility
staniek requested changes to this revision.Aug 23 2015, 9:32 PM
staniek edited edge metadata.

Good. Some notes.

src/renderer/KoReportPreRenderer.cpp
508–509

qobject_cast is not an OOP and here it's easy to fix:

I would prefer to handle connection in the opposite way: export KRScriptHandler, have it accesible for Kexi's KRScriptFunctions, where we can perform connection to groupChanged().

Note that KoReportPreRenderer.h is exported and it includes krscripthandler.h already, so we miss KREPORT_EXPORT in krscripthandler.h anyway.

src/renderer/scripting/krscripthandler.cpp
161

@todo KEXI3

src/renderer/scripting/krscripthandler.h
87

@todo KEXI3

This revision now requires changes to proceed.Aug 23 2015, 9:32 PM
staniek edited edge metadata.Aug 30 2015, 9:27 PM
staniek added a project: KReport.

@adam I'll push this code (with minimal proposed fixes). W need the kexi-frameworks9-staniek branch in a compleable state because merge with master is close.

staniek commandeered this revision.Aug 30 2015, 11:58 PM
staniek edited reviewers, added: piggz; removed: staniek.
staniek added inline comments.
src/renderer/KoReportPreRenderer.cpp
508–509

Done: added groupChanged(QMap<QString, QVariant>) signal to the prerenderer. The script handler's signal of the same signature calls it. Kexi connects to prerender's groupChange(), works. Connecting to script handler's groupChange() wouldn't work since handler is created later - inside of generate().

staniek abandoned this revision.Aug 31 2015, 12:00 AM

Already pushed to kreport master 72eebc87b189a5bb3c27e272d4d2b2b4cadee943

This revision was automatically updated to reflect the committed changes.