Commit 953696be authored by Milian Wolff's avatar Milian Wolff
Browse files

modernize: use [[fallthrough]] instead of Q_FALLTHROUGH

parent aa3ce1e8
......@@ -147,7 +147,7 @@ add_compile_flag_if_supported(-Wno-missing-field-initializers)
add_compile_flag_if_supported(-Werror=switch)
add_compile_flag_if_supported(-Werror=undefined-bool-conversion)
add_compile_flag_if_supported(-Werror=tautological-undefined-compare)
add_compile_flag_if_supported(-Werror=implicit-fallthrough) # Use Q_FALLTHROUGH for false positives.
add_compile_flag_if_supported(-Werror=implicit-fallthrough) # Use [[fallthrough]] for false positives.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_flag_if_supported(-Wdocumentation)
add_compile_flag_if_supported(-Wcovered-switch-default)
......
......@@ -194,7 +194,7 @@ NavigationContextPointer AbstractNavigationContext::execute(const NavigationActi
browser->showUses(action.decl);
return NavigationContextPointer(this);
}
Q_FALLTHROUGH();
[[fallthrough]];
}
case NavigationAction::ShowUses: {
return registerChild(new UsesNavigationContext(action.decl.data(), this));
......
......@@ -125,7 +125,7 @@ int findClose(const QString& str, int pos)
case '>':
if (last == QLatin1Char('-'))
break;
Q_FALLTHROUGH();
[[fallthrough]];
case ')':
case ']':
case '}':
......@@ -182,7 +182,7 @@ int findCommaOrEnd(const QString& str, int pos, QChar validEnd)
case '>':
if (validEnd != QLatin1Char(' ') && validEnd != str[a])
continue;
Q_FALLTHROUGH();
[[fallthrough]];
case ',':
return a;
}
......
......@@ -153,7 +153,7 @@ void ProviderWidget::searchRepo()
case 2: /* Known organization */
text = m_combo->currentText();
enabled = false;
Q_FALLTHROUGH();
[[fallthrough]];
default:/* Looking for some organization's repo. */
uri = QStringLiteral("/orgs/%1/repos").arg(text);
break;
......
......@@ -452,7 +452,7 @@ bool QuickOpenWidget::eventFilter(QObject* watched, QEvent* event)
}
break;
}
Q_FALLTHROUGH();
[[fallthrough]];
case Qt::Key_PageUp:
case Qt::Key_PageDown:
if (watched == ui.list) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment