Introduce Q_FALLTHROUGH()

Silence g++ 7.X warnings.

Change-Id: I9d06d04b496c9ec060e13e1be6f43d8fbadb1f3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Friedemann Kleint
2018-01-10 16:51:58 +01:00
parent 66488ba0b8
commit f482270432
19 changed files with 71 additions and 43 deletions

View File

@@ -37,6 +37,7 @@
#include <cplusplus/cppmodelmanagerbase.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/qtcfallthrough.h>
#include <utils/runextensions.h>
#include <QDir>
@@ -1391,7 +1392,7 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
break;
case ViewerContext::AddAllPathsAndDefaultSelectors:
res.selectors.append(defaultVCtx.selectors);
// fallthrough
Q_FALLTHROUGH();
case ViewerContext::AddAllPaths:
{
foreach (const QString &path, defaultVCtx.paths)
@@ -1400,10 +1401,10 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
case Dialect::AnyLanguage:
case Dialect::Qml:
res.maybeAddPath(info.qtQmlPath);
// fallthrough
Q_FALLTHROUGH();
case Dialect::QmlQtQuick1:
res.maybeAddPath(info.qtImportsPath);
// fallthrough
Q_FALLTHROUGH();
case Dialect::QmlQtQuick2:
case Dialect::QmlQtQuick2Ui:
{
@@ -1439,7 +1440,7 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
}
case ViewerContext::AddDefaultPathsAndSelectors:
res.selectors.append(defaultVCtx.selectors);
// fallthrough
Q_FALLTHROUGH();
case ViewerContext::AddDefaultPaths:
foreach (const QString &path, defaultVCtx.paths)
res.maybeAddPath(path);