diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h index c9b32a72271..37cb3c2de11 100644 --- a/src/corelib/io/qloggingcategory.h +++ b/src/corelib/io/qloggingcategory.h @@ -84,8 +84,12 @@ template struct QLoggingCategoryMacroHolder control = cat.isInfoEnabled(); } else if constexpr (Which == QtWarningMsg) { control = cat.isWarningEnabled(); - } else { + } else if constexpr (Which == QtCriticalMsg) { control = cat.isCriticalEnabled(); + } else if constexpr (Which == QtFatalMsg) { + control = true; + } else { + static_assert(QtPrivate::value_dependent_false(), "Unknown Qt message type"); } } const char *name() const { return category->categoryName(); }