From bf46cf8eaf9ede90d79d31faeb13df4c4d51af04 Mon Sep 17 00:00:00 2001 From: Nikita Baryshnikov Date: Mon, 21 Aug 2017 11:55:18 +0300 Subject: [PATCH] ScxmlEditor: silent fallthrough warnings Change-Id: I7bd7140f05e8342a2e10713eb1646e0bd3f028ff Reviewed-by: Ulf Hermann --- src/plugins/scxmleditor/common/stateproperties.cpp | 2 ++ src/plugins/scxmleditor/plugin_interface/connectableitem.cpp | 4 +++- src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp | 2 +- .../scxmleditor/plugin_interface/scattributeitemmodel.cpp | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/scxmleditor/common/stateproperties.cpp b/src/plugins/scxmleditor/common/stateproperties.cpp index 32272833b2d..568336295f9 100644 --- a/src/plugins/scxmleditor/common/stateproperties.cpp +++ b/src/plugins/scxmleditor/common/stateproperties.cpp @@ -30,6 +30,7 @@ #include "scxmluifactory.h" #include +#include #include #include @@ -84,6 +85,7 @@ void StateProperties::tagChange(ScxmlDocument::TagChange change, ScxmlTag *tag, case ScxmlDocument::TagContentChanged: if (tag != m_tag) return; + Q_FALLTHROUGH(); case ScxmlDocument::TagCurrentChanged: setTag(tag); break; diff --git a/src/plugins/scxmleditor/plugin_interface/connectableitem.cpp b/src/plugins/scxmleditor/plugin_interface/connectableitem.cpp index 82200f2a57d..130c86bf5c4 100644 --- a/src/plugins/scxmleditor/plugin_interface/connectableitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/connectableitem.cpp @@ -33,6 +33,8 @@ #include "serializer.h" #include "stateitem.h" +#include + #include #include #include @@ -491,7 +493,7 @@ QVariant ConnectableItem::itemChange(GraphicsItemChange change, const QVariant & case ItemParentHasChanged: updateTransitions(true); updateTransitionAttributes(true); - // FIXME: intended fallthrough? + Q_FALLTHROUGH(); case ItemPositionHasChanged: if (!m_releasedFromParent && !blockUpdates()) checkParentBoundingRect(); diff --git a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp index e5681fbc6e6..b1347007bea 100644 --- a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp +++ b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp @@ -541,7 +541,7 @@ void GraphicsScene::endTagChange(ScxmlDocument::TagChange change, ScxmlTag *tag, item->finalizeCreation(); } } - // FIXME: intended fallthrough? + break; case ScxmlDocument::TagAddChild: { ScxmlTag *childTag = tag->child(value.toInt()); if (childTag) { diff --git a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp index 38fe97e6675..7ea007bdff4 100644 --- a/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp +++ b/src/plugins/scxmleditor/plugin_interface/scattributeitemmodel.cpp @@ -26,6 +26,8 @@ #include "scattributeitemmodel.h" #include "mytypes.h" +#include + #include using namespace ScxmlEditor::PluginInterface; @@ -91,6 +93,7 @@ QVariant SCAttributeItemModel::data(const QModelIndex &index, int role) const case Qt::DisplayRole: if (bExtraRow) return index.column() == 0 ? tr("- name -") : tr(" - value -"); + Q_FALLTHROUGH(); case Qt::EditRole: { if (index.column() == 0) { if (bEditable) {