summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant/lib')
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 85bdd75..f94031b 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -712,14 +712,15 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> &keywords,
d->query->exec(QLatin1String("BEGIN"));
QSet<QString> indices;
foreach (const QHelpDataIndexItem &itm, keywords) {
-
- /*
- * Identical ids make no sense and just confuse the Assistant user,
- * so we ignore all repetitions.
- */
+ // Identical ids make no sense and just confuse the Assistant user,
+ // so we ignore all repetitions.
if (indices.contains(itm.identifier))
continue;
- indices.insert(itm.identifier);
+
+ // Still empty ids should be ignored, as otherwise we will include only
+ // the first keyword with an empty id.
+ if (!itm.identifier.isEmpty())
+ indices.insert(itm.identifier);
pos = itm.reference.indexOf(QLatin1Char('#'));
fileName = itm.reference.left(pos);