-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.1
-
None
-
cf5da3336 (dev), 139e5b55e (6.5), 4df0132ad (6.6)
The following piece of code may cause unreachable code error since the second return may never be reached.
inline typename std::enable_if<!QtPrivate::IsQEnumHelper<T>::Value && !std::is_enum_v<T>, char *>::type toString(const T &t)
{
#ifndef QT_NO_DEBUG_STREAM
if constexpr (QTypeTraits::has_ostream_operator_v<QDebug, T>) {
return qstrdup(QDebug::toString(t).toUtf8().constData());
} else {
static_assert(!QMetaTypeId2<T>::IsBuiltIn,
"Built-in type must implement debug streaming operator "
"or provide QTest::toString specialization");
}
#endif
return nullptr;
}