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 <giuseppe.dangelo@kdab.com>
This commit is contained in:
Edward Welbourne 2020-07-16 17:43:34 +02:00
parent f12132ff23
commit c7f277483a
2 changed files with 5 additions and 10 deletions

View File

@ -2651,13 +2651,6 @@ QDebug operator<<(QDebug debug, QRegularExpression::PatternOptions patternOption
flags.append("DontCaptureOption|"); flags.append("DontCaptureOption|");
if (patternOptions & QRegularExpression::UseUnicodePropertiesOption) if (patternOptions & QRegularExpression::UseUnicodePropertiesOption)
flags.append("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); flags.chop(1);
} }

View File

@ -73,8 +73,9 @@ public:
InvertedGreedinessOption = 0x0010, InvertedGreedinessOption = 0x0010,
DontCaptureOption = 0x0020, DontCaptureOption = 0x0020,
UseUnicodePropertiesOption = 0x0040, UseUnicodePropertiesOption = 0x0040,
OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080, // Formerly (no-ops deprecated in 5.12, removed 6.0):
DontAutomaticallyOptimizeOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0100, // OptimizeOnFirstUsageOption = 0x0080,
// DontAutomaticallyOptimizeOption = 0x0100,
}; };
Q_DECLARE_FLAGS(PatternOptions, PatternOption) Q_DECLARE_FLAGS(PatternOptions, PatternOption)
@ -110,8 +111,9 @@ public:
enum MatchOption { enum MatchOption {
NoMatchOption = 0x0000, NoMatchOption = 0x0000,
AnchoredMatchOption Q_DECL_ENUMERATOR_DEPRECATED_X("Use AnchorAtOffsetMatchOption instead") = 0x0001,
AnchorAtOffsetMatchOption = 0x0001, AnchorAtOffsetMatchOption = 0x0001,
AnchoredMatchOption Q_DECL_ENUMERATOR_DEPRECATED_X(
"Use AnchorAtOffsetMatchOption instead") = AnchorAtOffsetMatchOption, // Rename@Qt6.0
DontCheckSubjectStringMatchOption = 0x0002 DontCheckSubjectStringMatchOption = 0x0002
}; };
Q_DECLARE_FLAGS(MatchOptions, MatchOption) Q_DECLARE_FLAGS(MatchOptions, MatchOption)