From 7060a34d0622b99951cc9836d814a55dcb13a2d6 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sat, 15 Sep 2018 19:41:11 -0400 Subject: [PATCH] registry: Ignore symbols without type (fixes #980) --- src/libs/registry/docset.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/registry/docset.cpp b/src/libs/registry/docset.cpp index 01f510d..b3086dd 100644 --- a/src/libs/registry/docset.cpp +++ b/src/libs/registry/docset.cpp @@ -408,6 +408,13 @@ void Docset::countSymbols() while (m_db->next()) { const QString symbolTypeStr = m_db->value(0).toString(); + + // A workaround for https://github.com/zealdocs/zeal/issues/980. + if (symbolTypeStr.isEmpty()) { + qWarning("Empty symbol type in the '%s' docset, skipping...", qPrintable(m_name)); + continue; + } + const QString symbolType = parseSymbolType(symbolTypeStr); m_symbolStrings.insertMulti(symbolType, symbolTypeStr); m_symbolCounts[symbolType] += m_db->value(1).toInt();