psemiletov / tea-qt

TEA text editor
https://tea.ourproject.org
GNU General Public License v3.0
88 stars 11 forks source link

TEA 60: Wrong Qt version check in `#if QT_VERSION < 0x050500` #40

Closed schragge closed 3 years ago

schragge commented 3 years ago

According to Qt docs, Qt::MatchRegularExpression was added in Qt 5.15, not Qt 5.5. #if QT_VERSION < 0x050500 here and everywhere else in the file tea.cpp should be changed to #if QT_VERSION < 0x050F00 or, even better, to

#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)

Otherwise, TEA 60 fails to build from source on CentOS 8 which includes Qt 5.12. For now, I just sed -i '/QT_VERSION/s/0x050500/0x050F00/' tea.cpp

psemiletov commented 3 years ago

It's not better bacause TEA needs 0x050500 to check availability of QRegularExpression search at QTextDocument, so the global "sed" is a good solution for the CentOS only.

schragge commented 3 years ago

Nope. TEA checks for QRegularExpression presence with

#if QT_VERSION >= 0x050000

That check isn't affected by the proposed change.

schragge commented 3 years ago

The last commits in master fix this. Thank you.