Implement T4492 by performing some simple api cleanups/renames
ClosedPublic

Authored by piggz on Jan 20 2017, 11:19 PM.

Diff Detail

Repository
R14 KReport
Branch
api_rename
Lint
No Linters Available
Unit
No Unit Test Coverage
piggz updated this revision to Diff 10400.Jan 20 2017, 11:19 PM
piggz retitled this revision from to Implement T4492 by performing some simple api cleanups/renames.
piggz updated this object.
piggz edited the test plan for this revision. (Show Details)
piggz added a reviewer: staniek.
Restricted Application added a project: KReport. · View Herald TranscriptJan 20 2017, 11:19 PM
staniek requested changes to this revision.Jan 20 2017, 11:39 PM
staniek edited edge metadata.
staniek added inline comments.
examples/KReportExampleData.h
28
  • For completeness: KReportExampleData -> KReportExampleDataSource
  • And the files rename
src/common/KReportDataSource.h
90

int -> int pos

106

an expression -> a condition

Previous condition, if there is any, is joined using "AND" operator

107

Perhaps relation would be better const QString& because how can be ">=" supplied otherwise?

133

Why is it needed? Constructor would be enough. The create() does not supply a proper plugin behavior I am afraid...

src/common/KReportItemBase.h
93

data -> source

src/plugins/web/KReportItemWeb.h
25

<KReportDataSource.h> for consistency since it's outside of KReport DLL

src/renderer/KReportOneRecordData_p.h
29

Data -> data source

37
  • -> OneRecordDataSource
  • and the files rename accordingly
src/renderer/KReportPreRenderer.cpp
658

data -> dataSource

src/renderer/KReportPreRenderer.h
52

data -> dataSource

src/renderer/KReportPreRenderer_p.h
62

-> m_dataSource

src/renderer/scripting/KReportScriptHandler.cpp
46

-> reportDataSource

63

kodata -> dataSource

src/wrtembed/KReportDesigner.cpp
185

kordata -> dataSource

444
  • kodata -> source
src/wrtembed/KReportDesigner.h
77
  • -> setDataSource
  • kodata -> source
83
  • -> dataSource
This revision now requires changes to proceed.Jan 20 2017, 11:39 PM
piggz marked 17 inline comments as done.Jan 21 2017, 6:42 PM
piggz added inline comments.
src/common/KReportDataSource.h
133

It is used in the KexiDBReportData implementation. It allows to create an instance of a subclass, without knowing about the implementation. Again, like the dataSourceNames/Captions, it is used in advanced controls like the the chart plugin, to create another datasource given its name. Would you like it implemented differently?

piggz updated this revision to Diff 10422.Jan 21 2017, 6:43 PM
piggz edited edge metadata.
  • Implement review comments
staniek accepted this revision.Feb 5 2017, 1:10 PM
staniek edited edge metadata.

Good job, sorry for the delay.

src/common/KReportDataSource.h
133

It's OK for now! Thanks for the info.

This revision is now accepted and ready to land.Feb 5 2017, 1:10 PM
This revision was automatically updated to reflect the committed changes.