Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4b890110 authored by Martin Flöser's avatar Martin Flöser

Fix (incorrect) implicit-fallthrough warnings in gcc7

All cases are annotated that it's an explicit fallthrough, so add
Q_FALLTHROUGH to silence the warning.
parent d39fea1b
......@@ -281,6 +281,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
drawObject(p, HorizontalLine, r.x()+(r.width()-lwMark)/2, r.y()+(r.height()-lwMark)/2, lwMark, lwMark);
// Fall through to OnAllDesktopsIcon intended!
Q_FALLTHROUGH();
}
case OnAllDesktopsIcon:
{
......@@ -306,6 +307,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
drawObject(p, HorizontalLine, center-(lwArrow-2), r.y()+2*lwArrow, (lwArrow-2)*2, lwArrow);
// Fall through to KeepAboveIcon intended!
Q_FALLTHROUGH();
}
case KeepAboveIcon:
{
......@@ -331,6 +333,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
drawObject(p, HorizontalLine, center-(lwArrow-2), r.bottom()-(lwArrow-1)-2*lwArrow, (lwArrow-2)*2, lwArrow);
// Fall through to KeepBelowIcon intended!
Q_FALLTHROUGH();
}
case KeepBelowIcon:
{
......
......@@ -97,6 +97,7 @@ OpenGLBackend *X11StandalonePlatform::createOpenGLBackend()
} else {
qCWarning(KWIN_X11STANDALONE) << "Glx not available, trying EGL instead.";
// no break, needs fall-through
Q_FALLTHROUGH();
}
#endif
case EglPlatformInterface:
......@@ -211,6 +212,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
group.writeEntry(unsafeKey, true);
group.sync();
// Deliberately continue with PreFrame
Q_FALLTHROUGH();
case OpenGLSafePoint::PreFrame:
if (m_openGLFreezeProtectionThread == nullptr) {
Q_ASSERT(m_openGLFreezeProtection == nullptr);
......@@ -239,6 +241,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
group.writeEntry(unsafeKey, false);
group.sync();
// Deliberately continue with PostFrame
Q_FALLTHROUGH();
case OpenGLSafePoint::PostFrame:
QMetaObject::invokeMethod(m_openGLFreezeProtection, "stop", Qt::QueuedConnection);
break;
......
......@@ -525,6 +525,7 @@ void SceneOpenGL::initDebugOutput()
if (strstr(message, "Buffer detailed info:") && strstr(message, "has been updated"))
scheduleVboReInit();
// fall through! for general message printing
Q_FALLTHROUGH();
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
case GL_DEBUG_TYPE_PORTABILITY:
case GL_DEBUG_TYPE_PERFORMANCE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment