diff --git a/src/plugins/qtsupport/examplesparser.cpp b/src/plugins/qtsupport/examplesparser.cpp index 678a3a3139d..a335773b3ef 100644 --- a/src/plugins/qtsupport/examplesparser.cpp +++ b/src/plugins/qtsupport/examplesparser.cpp @@ -373,9 +373,9 @@ QList>> getCategories(const QList< // order "known" categories as wanted, others come afterwards const int defaultIndex = defaultOrder.indexOf(it->first); const int priority = defaultIndex >= 0 ? defaultIndex : (index + defaultOrderSize); - const std::optional maxRows = restrictRows - ? std::make_optional(index == 0 ? 2 : 1) - : std::nullopt; + const std::optional maxRows = restrictRows ? std::make_optional( + defaultIndex == 0 ? 2 : 1) + : std::nullopt; categories.append({{it->first, priority, maxRows}, it->second}); ++index; }