Extended SortedField with methods and a dptr
Details
- Reviewers
staniek - Commits
- R14:2209f06112fa: Add dptr to KReportData and SortedField
Ran kreportexample
Diff Detail
- Repository
- R14 KReport
- Branch
- dptr-final
- Lint
No Linters Available - Unit
No Unit Test Coverage
Thanks.
src/common/KReportDesign.cpp | ||
---|---|---|
33 ↗ | (On Diff #9231) | +Q_DECL_HIDDEN |
36 ↗ | (On Diff #9231) | How about moving these docs to KReportDesign.h for the users? |
43 ↗ | (On Diff #9231) | -> errorLineNumber |
46 ↗ | (On Diff #9231) | -> errorColumnNumber |
49 ↗ | (On Diff #9231) | Minor, for the future: it's enough to use new Private without () |
src/common/KReportDesign.h | ||
45 ↗ | (On Diff #9231) | -> Equivalent of errorLineNumber() >= 0 && errorColumnNumber() >= 0. And let's change implementation accordingly. |
51 ↗ | (On Diff #9231) | In case of methods that return by value non-const overload is not needed. |
53 ↗ | (On Diff #9231) | Symmetry: errorLineNumber |
54 ↗ | (On Diff #9231) | Same here |
56 ↗ | (On Diff #9231) | Symmetry: errorColumnNumber |
57 ↗ | (On Diff #9231) | Same here |
61 ↗ | (On Diff #9231) | setErrorLineNumber (similar to what Qt uses in some XML or DOM APIs) |
62 ↗ | (On Diff #9231) | Symmetry: setErrorColumnNumber |
65 ↗ | (On Diff #9231) | KReportDesignReadingStatus would benefit from a copy ctor and operator=. Actually it's not that hard as the Private class is easily copyable because all its members are values. |
src/common/KReportDesign_p.cpp | ||
455 ↗ | (On Diff #9231) | If we support KReportDesignReadingStatus::operator=() we could just do this here: *status = KReportDesignReadingStatus(); And this would be more maintainable. |
Good job. Almost there!
src/common/KReportDesign.cpp | ||
---|---|---|
53 ↗ | (On Diff #9238) | It's enough to call *this = other |
74 ↗ | (On Diff #9238) | missing && d->errorColumnNumber >= 0 |
161 ↗ | (On Diff #9238) | Unrelated to the port but while we're at this: we're not setting message at all here or removing previous one. Note that the status object is supplied by the user so we don't know what it is. Proposed solution: if d->processDocument(doc, status) fails, set error message to something like tr("Error in XML document."). |
src/common/KReportDesign.h | ||
44 ↗ | (On Diff #9238) | The return value needs to be KReportDesignReadingStatus& |
src/common/KReportDesign.cpp | ||
---|---|---|
160 ↗ | (On Diff #9246) | if (status) { .. } |