QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case label

Move  fallthrough down, fixing:
tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label

Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
Friedemann Kleint 2019-09-03 08:50:13 +02:00
parent 1c55a6caf1
commit db57af5a0d

View File

@ -3009,12 +3009,10 @@ int QRegExpEngine::getEscape()
yyCharClass->addSingleton(0x005f); // '_' yyCharClass->addSingleton(0x005f); // '_'
return Tok_CharClass; return Tok_CharClass;
case 'I': case 'I':
if (xmlSchemaExtensions) { if (!xmlSchemaExtensions)
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
break; break;
} yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'i': case 'i':
if (xmlSchemaExtensions) { if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) | yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@ -3049,12 +3047,10 @@ int QRegExpEngine::getEscape()
break; break;
} }
case 'C': case 'C':
if (xmlSchemaExtensions) { if (!xmlSchemaExtensions)
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
break; break;
} yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'c': case 'c':
if (xmlSchemaExtensions) { if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) | yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@ -3095,12 +3091,10 @@ int QRegExpEngine::getEscape()
break; break;
} }
case 'P': case 'P':
if (xmlSchemaExtensions) { if (!xmlSchemaExtensions)
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
break; break;
} yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'p': case 'p':
if (xmlSchemaExtensions) { if (xmlSchemaExtensions) {
if (yyCh != '{') { if (yyCh != '{') {