From b9ceefe918ac0d042866491b4f14b4a4a6091546 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 7 Jul 2022 15:53:15 +0200 Subject: [PATCH] Core: Fix build with Qt5 Amends 5b683c53c37. Change-Id: I80b8b6d1b508e42f81e022fee19117285a4c9687 Reviewed-by: Cristian Adam --- src/plugins/coreplugin/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 431fe4be7d5..ca635537330 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -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) {