aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/mainwindow.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2022-07-07 15:53:15 +0200
committerChristian Stenger <christian.stenger@qt.io>2022-07-07 14:07:09 +0000
commitb9ceefe918ac0d042866491b4f14b4a4a6091546 (patch)
tree1110ccd14fef627acc0c6f7808cdb52d155b6348 /src/plugins/coreplugin/mainwindow.cpp
parent6003fe9b361a5a2aaa16067b510930bf78d93ed7 (diff)
Core: Fix build with Qt5
Amends 5b683c53c37. Change-Id: I80b8b6d1b508e42f81e022fee19117285a4c9687 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/mainwindow.cpp')
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 431fe4be7d..ca63553733 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) {