Core: Fix build with Qt5

Amends 5b683c53c3.

Change-Id: I80b8b6d1b508e42f81e022fee19117285a4c9687
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Christian Stenger
2022-07-07 15:53:15 +02:00
parent 6003fe9b36
commit b9ceefe918

View File

@@ -1377,7 +1377,11 @@ public:
// with the last pixel visible
if (fmt.property(QTextFormat::HeadingLevel) == 2) {
QTextCharFormat charFmt = currentBlock().charFormat();
#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
charFmt.setVerticalAlignment(QTextCharFormat::AlignSuperScript);
#else
charFmt.setBaselineOffset(15);
#endif
setFormat(0, text.length(), charFmt);
if (h2Brush.style() == Qt::NoBrush) {