The ^ is interpretted as bitwise XOR, so 2^(20) evaluated to 22.
Thanks to Riki for the << trick. This way, we do not have to use
pow() and include the <cmath> header for this one expression.
As a consequence of fix e64ea357 to ticket #10797, we draw a bit too
much of the inset background outside of the inset (visible for insets
with colored background). #10797 is a ticket that triggers when the
cursor has a width larger than 1.
This patch limits the problems in two respects
* nothing is done on the left, since the cursor width only expands on
the right.
* on the right, the extra width is limited to cursor width.
Fixes bug #11786.
There is a chance that this code is still useful for Qt 4. We keep
it around just in case.
For the case of Qt 4, this commit restores the code changed in
f8e40f8a, d255339a, and d4ff3a29.
This reverts commit 438f15da21.
Revert "Track whether we have warned about mixing layouts across e.g. branches."
This reverts commit 861c6167ca.
Revert "Track whether title has been issued via OutputParams."
This reverts commit b536759c07.
There are massive complications here, and I don't have time to fix them all
right now.
Use QFontMetrics::boundingRect() instead. QFontMetrics::width() does
not actually calculate the width of the bounding box and is mostly
useful for knowing where to draw text after a string, taking into
account bearings. Indeed, it has been renamed to
QFontMetrics::horizontalAdvance().
For the code touched in this commit, we want to center a string.
Either method would likely be fine, but it is more easy to
understand exactly what QFontMetrics::boundingRect() does.
This commit does change functionality, although it should not be
noticeable.
This commit fixes the following warning:
DeprecationWarning: 'U' mode is deprecated
Removing 'U' has no effect with Python 3 [1]:
There is an additional mode character permitted, 'U', which no
longer has any effect, and is considered deprecated. It previously
enabled universal newlines in text mode, which became the default
behaviour in Python 3.0.
[1] https://docs.python.org/3/library/functions.html?highlight=open#open