QmlProfiler: Add comments about deliberate fallthroughs

Change-Id: Ia9a7d62f8f3dbc753f2746f3f53f5557d9607d45
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Robert Loehning
2017-03-21 12:40:22 +01:00
parent 1364336254
commit 9a9f1f9cfe

View File

@@ -84,6 +84,7 @@ QVariantMap InputEventsModel::details(int index) const
switch (event.type) { switch (event.type) {
case InputKeyPress: case InputKeyPress:
type = tr("Key Press"); type = tr("Key Press");
// fallthrough
case InputKeyRelease: case InputKeyRelease:
if (type.isEmpty()) if (type.isEmpty())
type = tr("Key Release"); type = tr("Key Release");
@@ -97,9 +98,11 @@ QVariantMap InputEventsModel::details(int index) const
break; break;
case InputMouseDoubleClick: case InputMouseDoubleClick:
type = tr("Double Click"); type = tr("Double Click");
// fallthrough
case InputMousePress: case InputMousePress:
if (type.isEmpty()) if (type.isEmpty())
type = tr("Mouse Press"); type = tr("Mouse Press");
// fallthrough
case InputMouseRelease: case InputMouseRelease:
if (type.isEmpty()) if (type.isEmpty())
type = tr("Mouse Release"); type = tr("Mouse Release");