Skip to content

Commit

Permalink
#206 fix: settext highlighting for Qt 5.15 below Qt 5.15.14
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
  • Loading branch information
pbek committed Aug 5, 2024
1 parent a9564de commit 48d602b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions markdownhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@

#include "qownlanguagedata.h"

// We enable QStringView with Qt 5.15.1
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1)
// We enable QStringView with Qt 5.15.14
// Note: QStringView::mid wasn't working correctly at least with 5.15.2 and 5.15.3, but 5.15.14 was fine
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 14)
#define MH_SUBSTR(pos, len) text.midRef(pos, len)
#else
#define MH_SUBSTR(pos, len) QStringView(text).mid(pos, len)
Expand Down

0 comments on commit 48d602b

Please sign in to comment.