diff options
Diffstat (limited to 'src/corelib/text/qregexp.cpp')
-rw-r--r-- | src/corelib/text/qregexp.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/corelib/text/qregexp.cpp b/src/corelib/text/qregexp.cpp index 41f3508ff8..ac4d9bbc36 100644 --- a/src/corelib/text/qregexp.cpp +++ b/src/corelib/text/qregexp.cpp @@ -3008,12 +3008,10 @@ int QRegExpEngine::getEscape() yyCharClass->addSingleton(0x005f); // '_' return Tok_CharClass; case 'I': - if (xmlSchemaExtensions) { - yyCharClass->setNegative(!yyCharClass->negative()); - Q_FALLTHROUGH(); - } else { + if (!xmlSchemaExtensions) break; - } + yyCharClass->setNegative(!yyCharClass->negative()); + Q_FALLTHROUGH(); case 'i': if (xmlSchemaExtensions) { yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) | @@ -3048,12 +3046,10 @@ int QRegExpEngine::getEscape() break; } case 'C': - if (xmlSchemaExtensions) { - yyCharClass->setNegative(!yyCharClass->negative()); - Q_FALLTHROUGH(); - } else { + if (!xmlSchemaExtensions) break; - } + yyCharClass->setNegative(!yyCharClass->negative()); + Q_FALLTHROUGH(); case 'c': if (xmlSchemaExtensions) { yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) | @@ -3094,12 +3090,10 @@ int QRegExpEngine::getEscape() break; } case 'P': - if (xmlSchemaExtensions) { - yyCharClass->setNegative(!yyCharClass->negative()); - Q_FALLTHROUGH(); - } else { + if (!xmlSchemaExtensions) break; - } + yyCharClass->setNegative(!yyCharClass->negative()); + Q_FALLTHROUGH(); case 'p': if (xmlSchemaExtensions) { if (yyCh != '{') { |