Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
953696be
Commit
953696be
authored
Sep 27, 2022
by
Milian Wolff
Browse files
modernize: use [[fallthrough]] instead of Q_FALLTHROUGH
parent
aa3ce1e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
953696be
...
...
@@ -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
)
...
...
kdevplatform/language/duchain/navigation/abstractnavigationcontext.cpp
View file @
953696be
...
...
@@ -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
));
...
...
kdevplatform/language/duchain/stringhelpers.cpp
View file @
953696be
...
...
@@ -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
;
}
...
...
plugins/ghprovider/ghproviderwidget.cpp
View file @
953696be
...
...
@@ -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
;
...
...
plugins/quickopen/quickopenwidget.cpp
View file @
953696be
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment