Skip to content

Commit

Permalink
Fix deprecation warning on Qt 5.12+
Browse files Browse the repository at this point in the history
See https://doc.qt.io/QT-5/qregularexpression.html#PatternOption-enum
about deprecated QRegularExpression enum values.
  • Loading branch information
leha-bot committed Jul 24, 2019
1 parent a2ec3a2 commit 32b342b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Telegram/SourceFiles/base/qthelp_regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ enum class RegExOption {
InvertedGreediness = QRegularExpression::InvertedGreedinessOption,
DontCapture = QRegularExpression::DontCaptureOption,
UseUnicodeProperties = QRegularExpression::UseUnicodePropertiesOption,
#ifndef OS_MAC_OLD
#if (!defined(OS_MAC_OLD) && ((QT_VERSION < QT_VERSION_CHECK(5, 12, 0)) && (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))))
/// @note These flags are introduced since Qt 5.4 and become deprecated in Qt 5.12, so we must
/// drop it conditionally.
/// See https://doc.qt.io/QT-5/qregularexpression.html#PatternOption-enum for details.
OptimizeOnFirstUsage = QRegularExpression::OptimizeOnFirstUsageOption,
DontAutomaticallyOptimize = QRegularExpression::DontAutomaticallyOptimizeOption,
#endif // OS_MAC_OLD
Expand Down

0 comments on commit 32b342b

Please sign in to comment.