summaryrefslogtreecommitdiffstats
path: root/src/xml/doc/src/external-resources.qdoc
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-11-30 21:23:13 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-12-06 12:28:41 +0100
commit19072a177bf72c28082a377f37ed19cbb06f9740 (patch)
treea101e77d97a2ca2cd5845a6dce4508e4e1a8ffdf /src/xml/doc/src/external-resources.qdoc
parent212b7614e1afce5a3cfc03b481784ff1d2a1aa01 (diff)
QPageLayout: do not calculate an invalid margin
A default constructed QPageLayout has an invalid QPageSize. When asking for its size, an invalid QSize is returned (-1, -1). This size is then used to calculate the maximum margins the page layout can have, resulting in negative margins. I'm not sure if that makes sense for QPageLayout (in principle, a negative margin is acceptable, meaning to "grow" the size), but then this margin is passed as an upper bound to a series of qBound calls in QPageLayoutPrivate::clampMargins. To fix this, change the calculations of the maximum margins by using a lower bound of 0. Change-Id: I429104acfb2296d9eb1ee54c113e9d7e22d9b6ab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/xml/doc/src/external-resources.qdoc')
0 files changed, 0 insertions, 0 deletions