From fa2e7351245ab7f2050f605978bbaba43bb32c57 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Tue, 23 Oct 2018 11:52:31 +0200
Subject: [PATCH] Fix four switch related warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: If4888c1b170568735953ac715c4a7c40de614dd8
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
---
 src/core/render_widget_host_view_qt.cpp | 9 ++++++---
 src/core/type_conversion.cpp            | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 8439b9cd7..86d5d7118 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1030,7 +1030,8 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
         return false;
     }
     case QEvent::MouseButtonPress:
-        Focus(); // Fall through.
+        Focus();
+        Q_FALLTHROUGH();
     case QEvent::MouseButtonRelease:
     case QEvent::MouseMove:
         // Skip second MouseMove event when a window is being adopted, so that Chromium
@@ -1051,7 +1052,8 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
         handleWheelEvent(static_cast<QWheelEvent*>(event));
         break;
     case QEvent::TouchBegin:
-        Focus(); // Fall through.
+        Focus();
+        Q_FALLTHROUGH();
     case QEvent::TouchUpdate:
     case QEvent::TouchEnd:
     case QEvent::TouchCancel:
@@ -1059,7 +1061,8 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
         break;
 #if QT_CONFIG(tabletevent)
     case QEvent::TabletPress:
-        Focus(); // Fall through.
+        Focus();
+        Q_FALLTHROUGH();
     case QEvent::TabletRelease:
     case QEvent::TabletMove:
         handleTabletEvent(static_cast<QTabletEvent*>(event));
diff --git a/src/core/type_conversion.cpp b/src/core/type_conversion.cpp
index 2a9746660..4aff2cff6 100644
--- a/src/core/type_conversion.cpp
+++ b/src/core/type_conversion.cpp
@@ -52,6 +52,7 @@ QImage toQImage(const SkBitmap &bitmap)
     switch (bitmap.colorType()) {
     case kUnknown_SkColorType:
     case kRGBA_F16_SkColorType:
+    case kRGBA_F32_SkColorType:
         qWarning("Unknown or unsupported skia image format");
         break;
     case kAlpha_8_SkColorType:
-- 
GitLab