BUG:378561
Details
- Reviewers
staniek - Commits
- R14:38e3041629cc: Fix loading of penstyle data
Create report, insert a label/field/check/text, set linestyle, switch to data view
Diff Detail
- Repository
- R14 KReport
- Branch
- 3.0
- Lint
No Linters Available - Unit
No Unit Test Coverage
I also propose add m_lineWeight->setOption("step", 1.0); just after all occurrences of m_lineWeight = new KProperty("line-weight", 1.0, tr("Line Weight")); so our step is 1.0 and not default (0.01 - inconvenient to use).
src/common/KReportItemLine.cpp | ||
---|---|---|
56 | Why to cast if KReportLineStyle::width is qreal? All our 5 KProperty("line-weight") are double and have correct 1.0 value by default. | |
src/items/check/KReportItemCheck.cpp | ||
58 | Same note | |
src/items/field/KReportItemField.cpp | ||
72 | Same note | |
src/items/label/KReportItemLabel.cpp | ||
64 | Same note | |
src/items/text/KReportItemText.cpp | ||
68 | Same note |
src/common/KReportItemLine.cpp | ||
---|---|---|
56 | in 3.0 m_lineWeight = new KProperty("line-weight", 1, tr("Line Weight")); |
- Fix invalid code loosing information both in 3.0 and in 3.1: ls->setWidth(elemSource.attribute(QLatin1String("report:line-weight"), QLatin1String("0")).toInt()); -- should be ls->setWidth(elemSource.attribute(QLatin1String("report:line-weight"), QLatin1String("0.0")).toDouble()); right?
src/common/KReportItemLine.cpp | ||
---|---|---|
56 | This is true. My question would be: what's better: to suddenly start supporting qreal in 3.1 or "fixing" the support for qreal in 3.0.2 which would be used for a while since its release before 3.1 replaces it. So make the change earlier or later? User that redesigns a report using 3.0.2 loses the precision back to integer. Because we have code like elemSource.attribute(QLatin1String("report:line-weight"), QLatin1String("0")).toInt() in 3.0 though. How about making the change for 3.0.2 calling it a fix. |