From c7f277483aa56e2b33b9ffb42ffe2a28a0e2f4c6 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 16 Jul 2020 17:43:34 +0200 Subject: [PATCH] QRegularExpression: Purge deprecated PatternOption members They've been no-ops since (at least) 5.12. At the same time, save future readers the need to git blame to find out how long the other deprecated enum name is. Change-Id: I2081ba2859c6540651b6f6807cc6bd59890bfce5 Reviewed-by: Giuseppe D'Angelo --- src/corelib/text/qregularexpression.cpp | 7 ------- src/corelib/text/qregularexpression.h | 8 +++++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp index 44bdc2e4638..db0f6907bb3 100644 --- a/src/corelib/text/qregularexpression.cpp +++ b/src/corelib/text/qregularexpression.cpp @@ -2651,13 +2651,6 @@ QDebug operator<<(QDebug debug, QRegularExpression::PatternOptions patternOption flags.append("DontCaptureOption|"); if (patternOptions & QRegularExpression::UseUnicodePropertiesOption) flags.append("UseUnicodePropertiesOption|"); -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - if (patternOptions & QRegularExpression::OptimizeOnFirstUsageOption) - flags.append("OptimizeOnFirstUsageOption|"); - if (patternOptions & QRegularExpression::DontAutomaticallyOptimizeOption) - flags.append("DontAutomaticallyOptimizeOption|"); -QT_WARNING_POP flags.chop(1); } diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index 30bdcdd4de1..abe94ccb9ea 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -73,8 +73,9 @@ public: InvertedGreedinessOption = 0x0010, DontCaptureOption = 0x0020, UseUnicodePropertiesOption = 0x0040, - OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080, - DontAutomaticallyOptimizeOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0100, + // Formerly (no-ops deprecated in 5.12, removed 6.0): + // OptimizeOnFirstUsageOption = 0x0080, + // DontAutomaticallyOptimizeOption = 0x0100, }; Q_DECLARE_FLAGS(PatternOptions, PatternOption) @@ -110,8 +111,9 @@ public: enum MatchOption { NoMatchOption = 0x0000, - AnchoredMatchOption Q_DECL_ENUMERATOR_DEPRECATED_X("Use AnchorAtOffsetMatchOption instead") = 0x0001, AnchorAtOffsetMatchOption = 0x0001, + AnchoredMatchOption Q_DECL_ENUMERATOR_DEPRECATED_X( + "Use AnchorAtOffsetMatchOption instead") = AnchorAtOffsetMatchOption, // Rename@Qt6.0 DontCheckSubjectStringMatchOption = 0x0002 }; Q_DECLARE_FLAGS(MatchOptions, MatchOption)