summaryrefslogtreecommitdiff
path: root/tools/assistant/lib
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2010-10-12 14:25:24 +0200
committerkh1 <qt-info@nokia.com>2010-10-12 14:25:24 +0200
commit601fc892705c3aeb751f8bec9924200822f1a85d (patch)
treed042e3afc5dd714c4720a13f5710550ed9ccf5bb /tools/assistant/lib
parent52873c02d06492f38f5aad9784e4b11656cc9521 (diff)
downloadqt4-tools-601fc892705c3aeb751f8bec9924200822f1a85d.tar.gz
Assistant: Insert all keywords with empty ids, as ids are not mendatory.
Task-number: QTBUG-14393 Reviewed-by: ck
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 85bdd75e4f..f94031bece 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);